Subnet Mask Cheat Sheet: /24, /26, /28, /30 and Host Counts

Use a practical IPv4 subnet mask cheat sheet to understand common CIDR prefixes, address counts, conventional host capacity, block sizes, and network boundaries.

In this article

Subnet Mask Cheat Sheet: /24, /26, /28, /30 and Host Counts

Duck Cloud's Subnet Calculator and CIDR Calculator calculate IPv4 ranges and host capacity.

Common sizes

CIDRSubnet maskTotal addressesConventional usable hosts*
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

*Traditional host counts subtract network and broadcast addresses. Cloud reservations and modern special cases can change practical capacity.

/24

A /24 leaves 8 host bits:

text
2^8 = 256

/26

A /26 leaves 6 host bits and has blocks of 64 in the final octet:

text
0, 64, 128, 192

So 192.0.2.70/26 belongs to 192.0.2.64/26.

/28

A /28 has 16 total addresses. Final-octet boundaries advance in blocks of 16.

/30

A traditional /30 has 4 total addresses and 2 conventional usable host addresses.

Modern point-to-point networks may use /31 where supported, so do not apply the simple “subtract two” rule blindly to every prefix.

Formula

IPv4 total addresses:

text
2^(32 - prefix)

Cloud reservations

Cloud providers may reserve addresses inside subnets. Always size according to the provider's documented behavior.

Overlap

Before allocating a new network, compare against VPCs, VPNs, office networks, partner ranges, and future environments.

A cheat sheet improves speed, but understanding boundaries is what prevents real routing mistakes.

Advertisement
Subnet Mask Cheat Sheet: /24, /26, /28, /30 | Duck Cloud