← Blog dev

The subnet math you learned in school says a /31 has zero usable hosts. RFC 3021 says otherwise.

Scan to open this page

The subnet math you learned in school says a /31 has zero usable hosts. RFC 3021 says otherwise.

Before building IP Subnet Calculator, we looked at how a couple of general-purpose calculator sites handle IP input, and dug into a classic subnet-math edge case.

One field, not two

One popular general calculator site we checked splits subnetting into a separate IP address text box and a dropdown of 32 preset subnet masks — you can't just paste 192.168.1.0/24 and go. This tool takes CIDR notation directly in a single field, the way you'd actually see it written in a router config or a cloud console.

The formula everyone memorizes breaks at the edges

Usable hosts = 2^(32 − prefix) − 2 is the formula from every networking course. Try it on a /31 and you get zero. But RFC 3021 formally standardized /31 point-to-point links specifically so router-to-router connections wouldn't burn a whole /30 (which wastes two of its four addresses on network and broadcast) — on a /31, both addresses are usable, full stop. A /32 has its own special case too: it's a single host, not "negative one hosts," which is what the naive formula would otherwise imply. This tool implements both cases explicitly and explains why right in the result.

Try IP Subnet Calculator →

#IpSubnetCalculator#CidrCalculatorOnline#Subnet/31/32UsableHosts#SubnetMaskToCidrConverter#NetworkBroadcastAddressCalculator