env.dev

CIDR Notation Cheat Sheet — Subnet Masks & Host Counts

Complete CIDR reference table: every prefix from /8 to /32 with subnet mask, total addresses, usable hosts, and common use cases.

Last updated:

CIDR (Classless Inter-Domain Routing) notation is a compact way to specify IP addresses and their associated network masks. Written as an IP address followed by a slash and a prefix length (e.g., 192.168.1.0/24), the prefix length indicates how many leading bits define the network portion, with the remaining bits available for host addresses.

Complete CIDR Reference Table

CIDRSubnet MaskTotal AddressesUsable HostsExample Use
/8255.0.0.016,777,21616,777,214Class A network (10.0.0.0/8)
/9255.128.0.08,388,6088,388,606Large ISP allocation
/10255.192.0.04,194,3044,194,302Large ISP allocation
/11255.224.0.02,097,1522,097,150Large ISP allocation
/12255.240.0.01,048,5761,048,574Private range (172.16.0.0/12)
/13255.248.0.0524,288524,286Regional allocation
/14255.252.0.0262,144262,142Regional allocation
/15255.254.0.0131,072131,070Regional allocation
/16255.255.0.065,53665,534Class B network, AWS VPC default
/17255.255.128.032,76832,766Large campus network
/18255.255.192.016,38416,382Large campus network
/19255.255.224.08,1928,190ISP customer block
/20255.255.240.04,0964,094Large office or data center
/21255.255.248.02,0482,046Medium data center
/22255.255.252.01,0241,022Medium office network
/23255.255.254.0512510Small data center
/24255.255.255.0256254Standard LAN subnet
/25255.255.255.128128126Half of a /24 subnet
/26255.255.255.1926462Small office network
/27255.255.255.2243230Small department or VLAN
/28255.255.255.2401614Small subnet or DMZ
/29255.255.255.24886Small point-of-presence
/30255.255.255.25242Point-to-point link
/31255.255.255.25422Point-to-point link (RFC 3021)
/32255.255.255.25511Single host route

Common Subnet Sizes

/32 -- Single Host

1 address. Used for host routes, loopback addresses, and firewall rules targeting a specific IP.

/31 -- Point-to-Point

2 addresses, both usable (RFC 3021). Designed for point-to-point links between two routers where no broadcast address is needed.

/30 -- Minimal Subnet

4 addresses, 2 usable. The traditional choice for point-to-point router links before /31 became widely supported.

/24 -- Standard LAN

256 addresses, 254 usable. The most common subnet size for local area networks, office floors, and VLANs.

/16 -- Large Network

65,536 addresses. Commonly used for entire VPCs, campus networks, or Class B allocations.

/8 -- Class A Block

16,777,216 addresses. Reserved for the largest private networks (10.0.0.0/8) and legacy Class A assignments.

Private IP Ranges (RFC 1918)

These address ranges are reserved for private networks and are not routable on the public internet. Any organization can use them internally without coordination.

CIDR BlockAddress RangeTotal AddressesClassTypical Use
10.0.0.0/810.0.0.0 -- 10.255.255.25516,777,216Class ALarge enterprises, cloud VPCs
172.16.0.0/12172.16.0.0 -- 172.31.255.2551,048,576Class BMedium networks, Docker default
192.168.0.0/16192.168.0.0 -- 192.168.255.25565,536Class CHome and small office networks

Cloud Provider Defaults

ProviderResourceDefault CIDRNotes
AWSVPC/16 (e.g., 10.0.0.0/16)Supports /16 to /28; /16 is the default and recommended size
AWSSubnet/24 (e.g., 10.0.1.0/24)AWS reserves 5 IPs per subnet (first 4 + last 1)
GCPVPC SubnetVaries by regionAuto-mode VPCs use /20 subnets; custom mode allows /29 to /8
AzureVNet/16 (e.g., 10.0.0.0/16)Supports /8 to /29; Azure reserves 5 IPs per subnet

Quick Mental Math

Doubling rule

Each decrease in prefix length by 1 doubles the number of addresses. A /23 has twice as many addresses as a /24.

Powers of two

Total addresses = 2^(32 - prefix). For /24: 2^(32-24) = 2^8 = 256 addresses.

Usable hosts

For /31 and /32, all addresses are usable. For all other prefixes, subtract 2 from the total (network address + broadcast address).

Subnetting shortcut

To split a /24 into two subnets, use two /25s. To split into four, use four /26s. Each additional bit doubles the number of subnets.

Calculate subnets, host ranges, and CIDR breakdowns with the IP Subnet Calculator tool.

Was this helpful?

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its network prefix in the form 192.168.1.0/24. The number after the slash tells you how many bits identify the network — the remaining bits are available for host addresses.

How many hosts does a /24 subnet have?

A /24 subnet has 256 total addresses (2^8). Two are reserved: one for the network address and one for broadcast. That leaves 254 usable host addresses.