UK’s trusted IT infrastructure partner since 2003
Servnet
ToolsConfiguratorGet in Touch

Subnet cheat sheet

Every CIDR prefix from /0 to /32 mapped to its subnet mask, wildcard mask, usable hosts and total addresses — generated from our verified engine, so it’s exact (including the /31 and /32 special cases).

CIDRSubnet maskWildcardUsable hostsTotal addresses
/00.0.0.0255.255.255.2554,294,967,2944,294,967,296
/1128.0.0.0127.255.255.2552,147,483,6462,147,483,648
/2192.0.0.063.255.255.2551,073,741,8221,073,741,824
/3224.0.0.031.255.255.255536,870,910536,870,912
/4240.0.0.015.255.255.255268,435,454268,435,456
/5248.0.0.07.255.255.255134,217,726134,217,728
/6252.0.0.03.255.255.25567,108,86267,108,864
/7254.0.0.01.255.255.25533,554,43033,554,432
/8255.0.0.00.255.255.25516,777,21416,777,216
/9255.128.0.00.127.255.2558,388,6068,388,608
/10255.192.0.00.63.255.2554,194,3024,194,304
/11255.224.0.00.31.255.2552,097,1502,097,152
/12255.240.0.00.15.255.2551,048,5741,048,576
/13255.248.0.00.7.255.255524,286524,288
/14255.252.0.00.3.255.255262,142262,144
/15255.254.0.00.1.255.255131,070131,072
/16255.255.0.00.0.255.25565,53465,536
/17255.255.128.00.0.127.25532,76632,768
/18255.255.192.00.0.63.25516,38216,384
/19255.255.224.00.0.31.2558,1908,192
/20255.255.240.00.0.15.2554,0944,096
/21255.255.248.00.0.7.2552,0462,048
/22255.255.252.00.0.3.2551,0221,024
/23255.255.254.00.0.1.255510512
/24255.255.255.00.0.0.255254256
/25255.255.255.1280.0.0.127126128
/26255.255.255.1920.0.0.636264
/27255.255.255.2240.0.0.313032
/28255.255.255.2400.0.0.151416
/29255.255.255.2480.0.0.768
/30255.255.255.2520.0.0.324
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011
Common CIDR prefixes/30255.255.255.2522 hosts/29255.255.255.2486 hosts/28255.255.255.24014 hosts/27255.255.255.22430 hosts/26255.255.255.19262 hosts/25255.255.255.128126 hosts/24255.255.255.0254 hosts/23255.255.254.0510 hosts/22255.255.252.01,022 hosts
Subnet CalculatorVLSM CalculatorCIDR CalculatorIPv6 CalculatorAll networking tools

CIDR & masks — common questions

How do I convert a CIDR prefix to a subnet mask?

The prefix is the number of leading 1-bits in the mask. /24 = 24 ones = 255.255.255.0; /26 = 255.255.255.192; /30 = 255.255.255.252. The table on this page lists every prefix from /0 to /32 with its mask, wildcard, usable hosts and total addresses — or use the live subnet calculator to convert a specific address.

Why does /31 show 2 usable hosts and /32 show 1?

A /31 is reserved for point-to-point links (RFC 3021), where both of the two addresses are usable — there is no network or broadcast address to subtract. A /32 is a single-host route (one address). Every other prefix subtracts the network and broadcast addresses, so usable = total − 2.

What is the wildcard mask used for?

The wildcard mask is the inverse of the subnet mask and is used in Cisco ACLs and OSPF to match address ranges. /24 has wildcard 0.0.0.255. The table includes the wildcard for every prefix.