Subnet Calculator

CIDR to network, broadcast, host range, netmask and wildcard.

Loading the interactive tool… It runs in your browser — if it doesn't appear, enable JavaScript.

Enter an address and prefix — 192.168.1.0/24 — and get the network address, broadcast address, first and last usable host, subnet mask, wildcard mask, total addresses and usable host count. Everything is computed from the numbers themselves; there's no lookup and no network request.

The two prefixes that break the usual arithmetic are handled and explained rather than silently fudged. A /31 is a point-to-point link under RFC 3021, with both addresses usable and no broadcast; a /32 is a single host. Applying the normal "total minus two" to either gives zero or a negative, which is why so many calculators show nonsense there.

Frequently asked questions

Why is the usable host count two less than the total?

The first address in a block identifies the network itself and the last is the broadcast address, so neither can be assigned to a host. A /24 has 256 addresses and 254 usable ones. The exceptions are /31 and /32, where that convention doesn't apply.

What's a wildcard mask?

The bitwise inverse of the subnet mask — 0.0.0.255 for a /24. Cisco ACLs and OSPF configuration use it instead of a netmask, and getting the two the wrong way round is a classic source of rules that match everything or nothing.

Which ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 under RFC 1918, plus 127.0.0.0/8 for loopback and 169.254.0.0/16 for link-local. The tool labels an address as private or public accordingly. Note 172.16.0.0/12 covers 172.16 through 172.31 — not all of 172.x, which is a common misreading.

Does it support IPv6?

Not currently — this is IPv4 only. IPv6 subnetting works on very different assumptions (a /64 per LAN is the norm, and host counts stop being a useful number), so it warrants a separate tool rather than being bolted on.