Inputs

Any host inside the subnet works.
/24 = 256 addrs. /16 = 65,536 addrs. /8 = 16M addrs.
Cheat sheet

/30 = 4 addrs (2 hosts) — point-to-point
/29 = 8 addrs (6 hosts)
/28 = 16 addrs (14 hosts)
/24 = 256 addrs (254 hosts) — class C
/16 = 65,536 addrs — class B
/8 = 16,777,216 addrs — class A

How subnetting actually works

Every IPv4 address is 32 bits. A subnet mask divides those 32 bits into two parts: the network portion (left side, fixed within the subnet) and the host portion (right side, varies per device). CIDR notation is shorthand for "how many of those bits are network."

The math, demystified

Take 192.168.1.50/24. The /24 says the first 24 bits are network — that's the first three octets, 192.168.1. The last 8 bits (.50) identify the specific host on that subnet.

Two specific addresses in every subnet are reserved:

  • Network address — all host bits are 0 (e.g. 192.168.1.0). This identifies the subnet itself; you can't assign it to a device.
  • Broadcast address — all host bits are 1 (e.g. 192.168.1.255). Sending here reaches every host on the subnet.

Everything in between is usable for hosts. So a /24 has 256 total addresses but only 254 usable host addresses.

Full CIDR ↔ subnet mask reference (/0 through /32)

Every valid IPv4 prefix length and its corresponding subnet mask. Common sizes admins actually use are highlighted in teal — the rest are mostly RIR allocations and theoretical edge cases. Click any row to load it into the calculator.

CIDRSubnet MaskTotal addressesUsable hostsTypical use
/32255.255.255.25511Single host (loopback, host route)
/31255.255.255.25422 (RFC 3021)Point-to-point link
/30255.255.255.25242Point-to-point router links
/29255.255.255.24886Small server VLAN
/28255.255.255.2401614Office floor / printer VLAN
/27255.255.255.2243230Mid-size department
/26255.255.255.1926462Larger department
/25255.255.255.128128126Half a /24
/24255.255.255.0256254Standard home / small office
/23255.255.254.0512510Two /24s combined
/22255.255.252.01,0241,022Small ISP block / large LAN
/21255.255.248.02,0482,046Mid ISP allocation
/20255.255.240.04,0964,094Mid-size enterprise
/19255.255.224.08,1928,190Large enterprise
/18255.255.192.016,38416,382Very large enterprise / small ISP
/17255.255.128.032,76832,766Half a /16
/16255.255.0.065,53665,534Large enterprise / Class B
/15255.254.0.0131,072131,070ISP allocation
/14255.252.0.0262,144262,142ISP allocation
/13255.248.0.0524,288524,286ISP allocation
/12255.240.0.01,048,5761,048,574Major ISP allocation
/11255.224.0.02,097,1522,097,150Major ISP allocation
/10255.192.0.04,194,3044,194,302Carrier allocation
/9255.128.0.08,388,6088,388,606Carrier allocation
/8255.0.0.016,777,21616,777,214Class A / RIR sub-allocation
/7254.0.0.033,554,43233,554,430RIR allocation
/6252.0.0.067,108,86467,108,862RIR allocation
/5248.0.0.0134,217,728134,217,726RIR allocation
/4240.0.0.0268,435,456268,435,454RIR allocation
/3224.0.0.0536,870,912536,870,910Theoretical / unused
/2192.0.0.01,073,741,8241,073,741,822Theoretical / unused
/1128.0.0.02,147,483,6482,147,483,646Theoretical / half the IPv4 internet
/00.0.0.04,294,967,296Default route / matches everything
Highlighted = commonly used in production networks
RFC 3021 note

Modern routers allow both addresses in a /31 to be assigned for point-to-point links — useful when you're trying not to waste IPs on inter-router connections. The calculator handles this case.