Skip to content
subnetcalculator

Methodology

IPv4 math uses unsigned 32-bit values. The network is the address AND the mask. The broadcast is the network OR the wildcard. The wildcard is the inverse of the mask. Prefix 0 and prefix 32 both round-trip.

Usable hosts are total minus 2 for prefixes /0 through /30. RFC 3021 defines /31 as two usable hosts. A /32 is one address. The network and broadcast are still shown for /31 so the block bounds stay visible.

Addresses are strict dotted decimal. Leading zeros are rejected so a value cannot be read as octal. Noncontiguous masks are rejected because they are not CIDR prefixes (RFC 4632).

Special-use labels follow common blocks in the IANA IPv4 Special-Purpose Address Registry, including RFC 1918 private space, loopback, link-local, shared CGNAT space, documentation networks, benchmarking, multicast, and the reserved class E range. The list is not every anycast /32. A label describes the address you entered, and the result says so when the calculated block is wider than that special-use range. Globally routable means the address was not in those blocks. It is not a promise that the address is announced or safe to use.

IPv6 uses 128-bit integers. Text output follows RFC 5952: lowercase hex, no leading zeros, and the longest leftmost run of two or more zero hextets compressed. There is no broadcast and no usable-host subtraction. Embedded IPv4 is accepted and stored as two hextets.

Reviewed against those sources on 8 October 2026.