Topics Glossary About Privacy Terms Free IP Tools →

Subnet Cheat Sheet: CIDR, Mask, Hosts at a Glance

subnet CIDR cheat sheet networking reference

This subnet cheat sheet gives you everything you need for IPv4 subnetting at a glance. Keep it bookmarked. You’ll come back to it more often than you think. The table below shows every CIDR prefix length from /0 to /32 with the corresponding subnet mask, total addresses, usable hosts, and wildcard mask.

The Complete IPv4 Subnet Table

CIDRSubnet MaskTotal AddressesUsable HostsWildcard MaskClass
/00.0.0.04,294,967,2964,294,967,294255.255.255.255Entire Internet
/1128.0.0.02,147,483,6482,147,483,646127.255.255.255
/2192.0.0.01,073,741,8241,073,741,82263.255.255.255
/3224.0.0.0536,870,912536,870,91031.255.255.255
/4240.0.0.0268,435,456268,435,45415.255.255.255
/5248.0.0.0134,217,728134,217,7267.255.255.255
/6252.0.0.067,108,86467,108,8623.255.255.255
/7254.0.0.033,554,43233,554,4301.255.255.255
/8255.0.0.016,777,21616,777,2140.255.255.255Class A
/9255.128.0.08,388,6088,388,6060.127.255.255
/10255.192.0.04,194,3044,194,3020.63.255.255
/11255.224.0.02,097,1522,097,1500.31.255.255
/12255.240.0.01,048,5761,048,5740.15.255.255
/13255.248.0.0524,288524,2860.7.255.255
/14255.252.0.0262,144262,1420.3.255.255
/15255.254.0.0131,072131,0700.1.255.255
/16255.255.0.065,53665,5340.0.255.255Class B
/17255.255.128.032,76832,7660.0.127.255
/18255.255.192.016,38416,3820.0.63.255
/19255.255.224.08,1928,1900.0.31.255
/20255.255.240.04,0964,0940.0.15.255
/21255.255.248.02,0482,0460.0.7.255
/22255.255.252.01,0241,0220.0.3.255
/23255.255.254.05125100.0.1.255
/24255.255.255.02562540.0.0.255Class C
/25255.255.255.1281281260.0.0.127
/26255.255.255.19264620.0.0.63
/27255.255.255.22432300.0.0.31
/28255.255.255.24016140.0.0.15
/29255.255.255.248860.0.0.7
/30255.255.255.252420.0.0.3Point-to-point
/31255.255.255.254220.0.0.1Point-to-point (RFC 3021)
/32255.255.255.255110.0.0.0Single host

Quick Calculation Method

To calculate usable hosts for any prefix:

  1. Host bits = 32 minus prefix length
  2. Total addresses = 2^(host bits)
  3. Usable hosts = total addresses minus 2 (network + broadcast)

For /26: 32 minus 26 = 6 host bits → 2^6 = 64 total → 62 usable hosts.

Common Scenarios

NeedUseWhy
Home network/24254 hosts, simple
Small office (50 people)/2662 hosts, conserves space
Server subnet/27 or /2830 or 14 hosts
Point-to-point link/30 or /312 hosts (just the two routers)
Single host route/32Exactly 1 address
Cloud VPC/1665,534 hosts, room to subnet further

Private Address Space Summary

RangeCIDRUse
10.0.0.0 to 10.255.255.25510.0.0.0/8Large organizations
172.16.0.0 to 172.31.255.255172.16.0.0/12Medium organizations
192.168.0.0 to 192.168.255.255192.168.0.0/16Home/small office

Test It Yourself

Check Your Network

Look up your IP address and see which subnet and network block you're part of.

Open Tool →

Frequently Asked Questions

A /24 (255.255.255.0) is by far the most common. It provides 254 usable host addresses, which is plenty for most small to medium networks. It's the default allocation for home networks and small offices.
Take 2 to the power of (32 minus prefix length), then subtract 2. The subtracted 2 are the network address (first) and broadcast address (last). So /24 = 2^8 - 2 = 254 usable hosts.