Rule of thumb · ComputersNº 78 / 167

Each subnet bit halves the hosts

Every bit moved from host to network halves the addresses — a /24 has 254 usable.

Why it works

2^(host bits) minus network and broadcast. /25 → 126, /26 → 62, /30 → 2 (the classic point-to-point link).

When it fails

The minus-two for network and broadcast addresses stops applying at the small end: a /31 has two usable addresses, not zero, because RFC 3021 redefined it for point-to-point links. And in IPv6 there is no broadcast address, so the arithmetic is different from the start.

How wrong is it?

At 26 the rule says 64 and the exact answer is 62 — 3.2% high. It holds to within 5% up to 26.6, then drifts.

+5%0−5%242730Subnet prefix length

Two addresses in every subnet are spoken for - the network itself and the broadcast - so the halving is only true while the subnet is big enough for two to be a rounding error. On a /30, the size used for point-to-point links, the rule promises four addresses and you get two.

The rule against the exact answer, computed across the range. Inside the shaded band the shortcut is close enough to use; outside it, reach for the calculator.

Do it exactly

Estimate with the rule, then check it against the calculator that models it properly.

Open Subnet Calculator →

More in Computers

← PreviousEach refresh rate step buys less than the last Next →RAID is not a backup

How many hosts fit in a subnet?

Every bit moved from host to network halves the addresses — a /24 has 254 usable. 2^(host bits) minus network and broadcast.

Browse all 167 rules of thumb →