How to use the Subnet Calculator
- Enter any IPv4 address inside the subnet — it does not have to be the network address.
- Enter the prefix length, the number after the slash in CIDR notation.
- Read the network address, which is what routing tables and firewall rules reference.
- Use the usable host range when assigning static addresses or setting DHCP pools.
- Check the host count before subnetting further; each split halves the addresses available.
How the calculation works
An IPv4 address is a 32-bit number. The prefix length says how many leading bits identify the network, leaving the rest for hosts. ANDing the address with the mask zeroes the host bits and yields the network address; ORing with the inverted mask sets them all and yields the broadcast address. Everything in between is assignable.
Usable hosts are 2^(32 − prefix) − 2 because two addresses are reserved: all-zeros host bits identify the network itself and all-ones is the subnet broadcast. That is why a /24 offers 254 usable addresses, not 256. The exceptions are /31, which RFC 3021 permits on point-to-point links using both addresses, and /32, a single-host route.
The wildcard mask, the bitwise inverse of the subnet mask, is shown because Cisco access control lists and OSPF network statements use it rather than the subnet mask. The calculator also flags whether the address falls in RFC 1918 private space — 10/8, 172.16/12 or 192.168/16 — which determines whether it is routable on the public internet or needs NAT.
network = address AND mask; broadcast = network OR NOT mask; usable hosts = 2^(32 − prefix) − 2Source: RFC 4632 (Classless Inter-Domain Routing), RFC 1918 (Private Address Allocation), RFC 3021 (/31 prefixes on point-to-point links).
Worked example
192.168.10.37 with a /26 prefix.
- A /26 mask is 255.255.255.192, leaving 6 host bits.
- Block size is 64, so networks start at .0, .64, .128 and .192; .37 falls in the .0 block.
- Network = 192.168.10.0, broadcast = 192.168.10.63.
- Usable hosts = 2⁶ − 2 = 62, from .1 to .62.
Network 192.168.10.0/26, range .1 to .62, broadcast .63, 62 usable addresses.
Frequently asked questions
Why are two addresses unusable?+
The lowest identifies the network and the highest is the broadcast address. Neither can be assigned to a host on a normal subnet.
What is the wildcard mask for?+
Cisco ACLs and OSPF statements take the inverted mask. A /24 has wildcard 0.0.0.255.
Can I use a /31?+
On point-to-point links, yes — RFC 3021 allows both addresses because no broadcast is needed.
How many /26 subnets fit in a /24?+
Four. Each additional prefix bit doubles the subnet count and halves the hosts per subnet.
Last reviewed September 1, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.