Index / Developer
Subnet Calculator
An IPv4 address and a prefix into the network address, the broadcast, the usable range, the mask and its wildcard. The /31 and /32 cases are not exceptions to be ignored: they are how point-to-point links and host routes are written.
Address
192.168.1.130/26, 10.0.0.1 255.255.255.0 and
172.16.5.4 are all read. A prefix or mask typed in this box wins
over the select below.
Used when the box above has no prefix or mask of
its own.
Network
--
Usable hosts
--
Addresses
--
The network
In binary, with the boundary marked
network | hostSplit
not split
The conventions this uses, including the two that are argued about
Usable hosts is 2h − 2 for a prefix of /30 or
shorter, where h is the number of host bits: the all-zeros address is
the network and the all-ones address is the directed broadcast, and
neither is assignable to an interface.
A /31 has two usable addresses, not zero. RFC 3021 defines a /31 as a point-to-point link with no network and no broadcast address, so both addresses are usable. A calculator that reports “0 usable” for a /31 is quoting a rule from before 2000, and modern routers configure them every day. A /32 has one, and it is a host route rather than a network at all.
Class A, B and C are historical and are shown as history. Classful addressing was replaced by CIDR in 1993 (RFC 1519); the class of an address tells you nothing about its mask today. It is printed because equipment documentation still refers to it, not because it is in force.
The wildcard mask is the bitwise complement of the netmask, which is what Cisco access lists and OSPF network statements take. It is not a different kind of mask, and it is not the host mask of a different network.
Special ranges named here are 0.0.0.0/8 (this network), 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (private, RFC 1918), 100.64.0.0/10 (carrier-grade NAT, RFC 6598), 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local), 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 (documentation), 198.18.0.0/15 (benchmarking), 224.0.0.0/4 (multicast), 240.0.0.0/4 (reserved) and 255.255.255.255/32 (limited broadcast). The address is tested against the list in that order and the first match is the one reported.
If the address has bits set below the mask it is not the network address, and the page says so rather than quietly moving it. That is usually exactly what you typed — a host inside the subnet — and both are shown.
A leading zero on an octet is read as decimal here, and flagged.
This is IPv4 only. IPv6 is not a wider version of the same arithmetic: there is no broadcast address, no network-and-broadcast subtraction, and the notation compresses runs of zeros. Doing it here would mean a second set of rules under one heading, which is how a subnet calculator gives a confidently wrong answer.
A /31 has two usable addresses, not zero. RFC 3021 defines a /31 as a point-to-point link with no network and no broadcast address, so both addresses are usable. A calculator that reports “0 usable” for a /31 is quoting a rule from before 2000, and modern routers configure them every day. A /32 has one, and it is a host route rather than a network at all.
Class A, B and C are historical and are shown as history. Classful addressing was replaced by CIDR in 1993 (RFC 1519); the class of an address tells you nothing about its mask today. It is printed because equipment documentation still refers to it, not because it is in force.
The wildcard mask is the bitwise complement of the netmask, which is what Cisco access lists and OSPF network statements take. It is not a different kind of mask, and it is not the host mask of a different network.
Special ranges named here are 0.0.0.0/8 (this network), 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (private, RFC 1918), 100.64.0.0/10 (carrier-grade NAT, RFC 6598), 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local), 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 (documentation), 198.18.0.0/15 (benchmarking), 224.0.0.0/4 (multicast), 240.0.0.0/4 (reserved) and 255.255.255.255/32 (limited broadcast). The address is tested against the list in that order and the first match is the one reported.
If the address has bits set below the mask it is not the network address, and the page says so rather than quietly moving it. That is usually exactly what you typed — a host inside the subnet — and both are shown.
A leading zero on an octet is read as decimal here, and flagged.
inet_aton and several parsing libraries read it as octal, so
010.1.1.1 becomes 8.1.1.1 in one place and stays 10.1.1.1 in another.
That disagreement has been a real source of access-control bugs, so the
page says which reading it used rather than picking one silently.
This is IPv4 only. IPv6 is not a wider version of the same arithmetic: there is no broadcast address, no network-and-broadcast subtraction, and the notation compresses runs of zeros. Doing it here would mean a second set of rules under one heading, which is how a subnet calculator gives a confidently wrong answer.