Modern Reach · Small Projects — IPv4 addressing

Subnet
Calculator

Paste an address in CIDR notation and read back the block it belongs to — the network, the broadcast, the usable host range, and every address in between.

1.2.3.4/12 → 1.0.0.0 – 1.15.255.255 · 1,048,576 addresses
Input
Accepts 10.20.30.40/22, 10.20.30.40 255.255.252.0, or a bare address (treated as /32).
/12
/0/16/32
Drag to widen or tighten the block around the same address.
Address range
The block covers
1.0.0.0→1.15.255.255
Usable hosts
1,048,574
Total addresses
1,048,576
Netmask
255.240.0.0
12 network bits 20 host bits

The block, in full

Everything derived from the address and prefix you entered.

Split it up

Divide the block into equal smaller subnets and see where each one starts and ends.

SubnetNetworkFirst hostLast hostBroadcastUsable

How it works

Where the range comes from

An IPv4 address is 32 bits. The prefix after the slash says how many of those bits are fixed — they identify the network. Everything left over is the host part, and it is free to take any value.

So 1.2.3.4/12 fixes the first 12 bits and lets the remaining 20 vary. Zero the host bits and you get the first address, 1.0.0.0. Set them all to one and you get the last, 1.15.255.255. That is the range.

The block always holds 2^(32 − prefix) addresses, and it always starts on a multiple of its own size — which is why the network address is rarely the address you typed.

Usable hosts

In a normal subnet the first address is the network address and the last is the broadcast address. Neither can be assigned to a machine, so the usable count is two fewer than the total.

Two prefixes break that rule. A /31 has no room for either, so RFC 3021 allows both addresses to be used on a point-to-point link. A /32 is a single host route — one address, itself.

Nothing you type here leaves your browser; the whole calculation is a handful of bitwise operations running locally.

Rule of thumb — every step down in prefix doubles the block. A /24 is 256 addresses, a /23 is 512, a /22 is 1,024. Counting the other way, a /30 gives the 2 usable hosts of a point-to-point link.