Using the calculator
Type an address with its prefix, like 192.168.1.10/24, or with its mask, like 192.168.1.10 255.255.255.0. The calculator gives the network address, the broadcast address, the range of usable host addresses, the subnet and wildcard masks, how many addresses there are, and whether the address is in a private or other special-purpose range.
Show the steps writes the address and mask in binary and ANDs them, the way it's done by hand, and the drawing marks which of the 32 bits are network and which are host. To split a range of addresses into CIDR blocks, use the CIDR calculator.
How subnetting works
An IPv4 address is 32 bits. The prefix says how many of them, from the left, name the network; the rest pick a host on it. In 192.168.1.10/24, the first 24 bits, 192.168.1, are the network and the last 8 are the host.
To find the network address, AND the address with the mask: every host bit becomes 0. To find the broadcast address, set every host bit to 1. With h host bits there are 2ʰ addresses, and two of them, the network and the broadcast, can't be given to a host. A /24 has 8 host bits: 256 addresses and 254 hosts.
Private ranges and the small prefixes
RFC 1918, from February 1996, set aside three blocks for private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Addresses in them aren't routed on the public internet, which is why home networks are usually numbered from one. The calculator also names the other special-purpose ranges in IANA's registry, like 127.0.0.0/8 for loopback.
A /31 has only two addresses. RFC 3021, from December 2000, lets both be used as hosts on a point-to-point link, with no network or broadcast address. A /32 is a single host.
Questions
What's a wildcard mask?
The subnet mask with every bit flipped: 255.255.255.0 becomes 0.0.0.255. Router access lists use it to say which bits of an address are allowed to vary.
How many hosts in a /24?
254. The 8 host bits give 256 addresses, minus the network and broadcast addresses.
Does it work for IPv6?
Not yet. It handles IPv4 addresses, which are the ones subnetting is usually taught with.






