IPv4 subnet calculator
Type an address and a prefix or a mask. You get everything about the subnet it belongs to, in the form network engineers write it.
What you can type
- An address with a slash prefix:
192.168.1.130/26. - An address with a dotted mask, separated by a space:
10.0.5.9 255.255.255.0. - An address with a wildcard mask (the mask written upside down, common on routers):
10.0.5.9 0.0.0.255. - An address alone, which is treated as a /32, a single host.
Reading the result
Network address. The first address of the block, with all host bits set to zero. It names the subnet and is not given to a device in an ordinary subnet.
Broadcast address. The last address, with all host bits set to one. Messages sent to it reach every device in the subnet.
First and last usable host. The addresses between the two above. In an ordinary subnet of /30 or shorter there are 2 fewer usable hosts than addresses, for these two special ones.
Wildcard mask. The mask with ones and zeros swapped. Cisco-style access lists and some routing commands use it.
Type. The tool looks the address up in the IANA special-purpose address registry, which lists private, loopback, link-local, documentation and other reserved blocks. Addresses that are not in the registry are shown as public. Multicast addresses (224.0.0.0 to 239.255.255.255) are labelled separately.
Historical class. Classes A to E belong to a system that was replaced by CIDR in the 1990s. The tool shows it because old exams and old documents still use it, but real networks are described by the prefix.
Two special sizes
A /31 has two addresses and both are usable. This is the rule for point-to-point links in RFC 3021, so the tool shows 2 usable hosts. A /32 is a single address, shown with 1.
Common mistakes
- Counting the network and broadcast addresses as hosts. A /24 has 256 addresses and 254 hosts.
- Typing a host address and expecting the same address back as the network. The tool shows the network of the block that your address belongs to:
192.168.1.130/26belongs to192.168.1.128/26. - Typing a mask that has gaps (such as 255.0.255.0). A valid mask is a run of ones followed by zeros.
- Confusing the mask with the wildcard. If your mask starts with 0, it is probably a wildcard.
We checked this calculator against Python's ipaddress module on 600 random addresses and prefixes, and the results matched on every field.
Why is the first usable host not the network address plus one in a /31?
In a /31 (RFC 3021) both addresses are hosts, so there is no network or broadcast address to skip.
Is my address public or private?
The Type row tells you. Private blocks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, as in RFC 1918.
This is an independent guide. It is not connected with IANA, the IETF or any network equipment maker. Address and port data come from the IANA registries as fetched on 14 November 2026; RFC texts were read from rfc-editor.org. Check the originals for anything you rely on.