Skip to main content
This table provides a complete reference for IPv4 CIDR notation, including subnet masks, total IP addresses, and usable hosts.

CIDR Reference Table

BitsPrefixSubnet MaskIP AddressesUsable Hosts
0/32255.255.255.2551N/A
1/31255.255.255.25422
2/30255.255.255.25242
3/29255.255.255.24886
4/28255.255.255.2401614
5/27255.255.255.2243230
6/26255.255.255.1926462
7/25255.255.255.128128126
8/24255.255.255.0256254
9/23255.255.254.0512510
10/22255.255.252.01 K1,022
11/21255.255.248.02 K2,046
12/20255.255.240.04 K4,094
13/19255.255.224.08 K8,190
14/18255.255.192.016 K16,382
15/17255.255.128.032 K32,766
16/16255.255.0.064 K65,534
17/15255.254.0.0128 K131,070
18/14255.252.0.0256 K262,142
19/13255.248.0.0512 K524,286
20/12255.240.0.01 M1,048,574
21/11255.224.0.02 M2,097,150
22/10255.192.0.04 M4,194,302
23/9255.128.0.08 M8,388,606
24/8255.0.0.016 M16,777,214
25/7254.0.0.032 M33,554,430
26/6252.0.0.064 M67,108,862
27/5248.0.0.0128 M134,217,726
28/4240.0.0.0256 M268,435,454
29/3224.0.0.0512 M536,870,910
30/2192.0.0.01,024 M1,073,741,822
31/1128.0.0.02,048 M2,147,483,646
32/00.0.0.04,096 M4,294,967,294
K = 1,024 and M = 1,048,576 (binary multiples)

Common Subnet Sizes

/24 Network

256 IPs, 254 usableMost common for small LANs

/30 Network

4 IPs, 2 usablePoint-to-point links

/16 Network

65,536 IPs, 65,534 usableLarge enterprise or AWS VPC

Formula for Usable Hosts

Usable Hosts = 2n - 2 Where:
  • n = number of host bits
  • The -2 accounts for the network and broadcast addresses

Example Calculation

For a /24 network:
  • Host bits = 32 - 24 = 8
  • Total IPs = 28 = 256
  • Usable hosts = 256 - 2 = 254

Practical Examples

Network: 192.168.1.0/24
  • Subnet Mask: 255.255.255.0
  • Network Address: 192.168.1.0
  • First Usable: 192.168.1.1
  • Last Usable: 192.168.1.254
  • Broadcast: 192.168.1.255
  • Usable Hosts: 254

Quick Reference Guide

  • /32 - Single host (1 IP)
  • /31 - Point-to-point link (2 IPs, RFC 3021)
  • /30 - Point-to-point link (2 usable IPs)
  • /29 - Small subnet (6 usable IPs)
  • /28 - Small subnet (14 usable IPs)
  • /27 - Small subnet (30 usable IPs)
  • /26 - Medium subnet (62 usable IPs)
  • /25 - Medium subnet (126 usable IPs)
  • /24 - Standard LAN (254 usable IPs)
  • /23 - Medium LAN (510 usable IPs)
  • /22 - Large LAN (1,022 usable IPs)
  • /21 - Very large LAN (2,046 usable IPs)
  • /20 - Small enterprise (4,094 usable IPs)
  • /16 - Large enterprise/VPC (65,534 usable IPs)
  • /8 - Class A network (16,777,214 usable IPs)
AWS allows VPC CIDR blocks between /16 and /28:
  • /16 - Maximum size VPC (65,536 IPs)
  • /20 - Medium VPC (4,096 IPs)
  • /24 - Small VPC (256 IPs)
  • /28 - Minimum size VPC (16 IPs)
AWS reserves the first 4 IPs and the last IP in each subnet.

VLSM Calculator

Variable-Length Subnet Masking calculator

VPC Basics

Learn about AWS VPC subnetting

Build docs developers (and LLMs) love