IPv4 subnet calculatorNetwork, host range, broadcast, mask and wildcard for any IPv4 blockIPv6 subnet calculatorPrefix ranges, /64 counts, splits and a ULA prefix generatorVLSM calculatorSize subnets by host count, with AWS, Azure, GCP and OCI rulesVisual subnet plannerSplit and join blocks, label them, then share or export the planCIDR and IP range calculatorTurn any start and end address into the fewest CIDR blocksSupernet and route summarySummarise networks into one route or merge them exactlyWildcard mask calculatorACL wildcards, matched ranges and ready Cisco linesSubnetting practiceExam-style questions, checked instantly with the working shownSubnet mask cheat sheetEvery prefix from /0 to /32 with mask, wildcard and hostsIPv6 cheat sheetPrefix sizes, address types and the reserved rangesGuidesHow subnetting works, explained with worked examples

Subnet mask cheat sheet

Every IPv4 prefix length with its mask, wildcard and host count on one page, plus the block sizes and powers of two you need to subnet without a calculator.

Updated Nov 20, 2026Checked against Python ipaddress33 prefixes

Quick converter

Pick a prefix or type a host count. The rest of the page is the full reference.

Full subnet mask table

Every IPv4 prefix length from /0 to /32. Usable hosts subtract the network and broadcast addresses, except /31, which RFC 3021 lets you use whole on point-to-point links, and /32, which is a single host. Select a prefix to open it in the calculator.

PrefixSubnet maskWildcardAddressesUsable hostsPer /24
/00.0.0.0255.255.255.2554,294,967,2964,294,967,29416,777,216 × /24
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,6468,388,608 × /24
/2192.0.0.063.255.255.2551,073,741,8241,073,741,8224,194,304 × /24
/3224.0.0.031.255.255.255536,870,912536,870,9102,097,152 × /24
/4240.0.0.015.255.255.255268,435,456268,435,4541,048,576 × /24
/5248.0.0.07.255.255.255134,217,728134,217,726524,288 × /24
/6252.0.0.03.255.255.25567,108,86467,108,862262,144 × /24
/7254.0.0.01.255.255.25533,554,43233,554,430131,072 × /24
/8255.0.0.00.255.255.25516,777,21616,777,21465,536 × /24
/9255.128.0.00.127.255.2558,388,6088,388,60632,768 × /24
/10255.192.0.00.63.255.2554,194,3044,194,30216,384 × /24
/11255.224.0.00.31.255.2552,097,1522,097,1508,192 × /24
/12255.240.0.00.15.255.2551,048,5761,048,5744,096 × /24
/13255.248.0.00.7.255.255524,288524,2862,048 × /24
/14255.252.0.00.3.255.255262,144262,1421,024 × /24
/15255.254.0.00.1.255.255131,072131,070512 × /24
/16255.255.0.00.0.255.25565,53665,534256 × /24
/17255.255.128.00.0.127.25532,76832,766128 × /24
/18255.255.192.00.0.63.25516,38416,38264 × /24
/19255.255.224.00.0.31.2558,1928,19032 × /24
/20255.255.240.00.0.15.2554,0964,09416 × /24
/21255.255.248.00.0.7.2552,0482,0468 × /24
/22255.255.252.00.0.3.2551,0241,0224 × /24
/23255.255.254.00.0.1.2555125102 × /24
/24255.255.255.00.0.0.2552562541
/25255.255.255.1280.0.0.1271281262
/26255.255.255.1920.0.0.6364624
/27255.255.255.2240.0.0.3132308
/28255.255.255.2400.0.0.15161416
/29255.255.255.2480.0.0.78632
/30255.255.255.2520.0.0.34264
/31255.255.255.2540.0.0.122128
/32255.255.255.2550.0.0.011256

Last-octet masks and block sizes

Most exam questions and most office networks live in the last octet. These eight values are worth memorising. The block size is 256 minus the mask value, and subnets always start on a multiple of it.

PrefixMaskLast octetBlock sizeBinary of last octetNetworks start at
/25255.255.255.128128128100000000, 128…
/26255.255.255.19219264110000000, 64, 128, 192…
/27255.255.255.22422432111000000, 32, 64, 96…
/28255.255.255.24024016111100000, 16, 32, 48…
/29255.255.255.2482488111110000, 8, 16, 24…
/30255.255.255.2522524111111000, 4, 8, 12…
/31255.255.255.2542542111111100, 2, 4, 6…
/32255.255.255.255255111111111every address

The same pattern repeats one octet to the left. A /20 has 240 in the third octet, so its block size there is 16: networks begin at 10.0.0.0, 10.0.16.0, 10.0.32.0 and so on.

Powers of two

Host counts are always a power of two, minus two. Knowing the powers up to 216 lets you size any subnet in your head.

Host bitsAddressesUsablePrefix
122 (RFC 3021)/31
242/30
386/29
41614/28
53230/27
66462/26
7128126/25
8256254/24
9512510/23
101,0241,022/22
112,0482,046/21
124,0964,094/20
138,1928,190/19
1416,38416,382/18
1532,76832,766/17
1665,53665,534/16

Classful defaults

Classes were retired by CIDR in 1993 (RFC 1519), but exams and older documentation still refer to them. The class is decided by the first octet only.

ClassFirst octetDefault maskUse
A1 to 126255.0.0.0 (/8)Unicast (127 is loopback)
B128 to 191255.255.0.0 (/16)Unicast
C192 to 223255.255.255.0 (/24)Unicast
D224 to 239NoneMulticast
E240 to 255NoneReserved

Private and special ranges

These ranges are not routed on the public internet. Use them inside networks and behind NAT. The full story is in our guide to private IP ranges.

RangePurposeDefined in
10.0.0.0/8PrivateRFC 1918
172.16.0.0/12PrivateRFC 1918
192.168.0.0/16PrivateRFC 1918
100.64.0.0/10Carrier-grade NATRFC 6598
127.0.0.0/8LoopbackRFC 1122
169.254.0.0/16Link-localRFC 3927
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24DocumentationRFC 5737
How we check this page

Every figure on this site comes from the same calculation engine as the tools, and that engine is tested on each build against more than 6,600 cases generated by Python's standard ipaddress module. Rules are taken from the RFCs and vendor documents listed under Sources. Last reviewed November 20, 2026.