Network tool
IPv4 subnet calculator
Enter an IPv4 address and prefix to get the network address, mask, broadcast and usable host range.
Worked examples
192.168.1.10/24— 254 usable hosts on 192.168.1.0/24.10.0.0.0/8— a private class A range with 16,777,214 usable addresses.203.0.113.5/32— a single host route.198.51.100.0/31— two addresses, both usable on a point-to-point link.
IPv4 only. IPv6 prefix maths is different enough that a half-hearted version would mislead, so this tool does not pretend to do it.
Why the host count is not 2^(32-prefix)
The all-zeros network address and the all-ones broadcast address cannot be assigned to hosts in a normal subnet, so a /24 gives 256 addresses but 254 usable hosts. The exceptions are /31 (RFC 3021 point-to-point links) and /32 (single hosts), which have no broadcast address to reserve.