Subnet calculator

Ranges, masks and host counts for IPv4 and IPv6. Runs entirely in your browser — nothing you type is sent anywhere.

How to read this

What the number after the slash means

The prefix length is how many bits at the front of the address identify the network. Everything left over identifies hosts inside it. A /24 fixes the first 24 bits, leaving 8 bits — 256 addresses. Each step down doubles the block: /23 is 512, /22 is 1024. Each step up halves it. That is the whole of it; the dotted mask, 255.255.255.0, is the same number written the long way round.

Why two addresses are always missing

In every ordinary IPv4 subnet, the first address names the network itself and the last is the broadcast address, so neither can be given to a machine. A /24 has 256 addresses and 254 usable ones. The exception is a /31: RFC 3021 allows both of its addresses to be used, because a point-to-point link has nothing to broadcast to. A /32 is a single host with no network or broadcast at all.

Addresses that will never route

Some blocks are reserved and will not cross the internet whatever you do with them. 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private. 100.64.0.0/10 is carrier-grade NAT — if your router shows one of these on its WAN side, you are behind your ISP’s NAT and no inbound connection will reach you without their help. 169.254.0.0/16 means DHCP failed. The three documentation blocks exist so examples cannot accidentally point at somebody real.

Isometric drawing of a graduated bar divided into equal cells, with an upright divider set into it: the cells before the divider drawn solid, the cells after it drawn as hidden lines

Doing this for a business rather than for yourself? Networking.

The other tools

WhatsApp