// admin tools · 21
Subnet calculator
Network, broadcast, usable range, mask, wildcard and reverse zone for any IPv4 or IPv6 block — then split it, test membership or collapse a list into the fewest CIDRs.
// runs locally — nothing is uploaded
How it works
What it does
Type a block such as 10.0.0.0/22, an address with a dotted mask (192.168.1.77 255.255.255.0) or any IPv6 prefix, and the calculator shows the network and broadcast addresses, the usable host range and count, netmask, wildcard mask, a binary view with network and host bits coloured, the address type and the reverse DNS zone. Three more tabs split a network into subnets, check whether addresses fall inside a block, and summarise a messy list of CIDRs into the smallest set that covers exactly the same addresses. All maths uses JavaScript BigInt, so a /0 IPv6 block is as exact as a /30. Nothing leaves your browser.
How to use it
- Drag the prefix slider to watch the block grow or shrink around the same address.
- Enter a host address with its prefix to see which network it belongs to and its position in it.
- A Cisco-style wildcard such as
0.0.0.255is detected and read as/24. - --split takes a count (rounded up to a power of two) or a target prefix and lists up to 256 subnets.
- --summarise accepts CIDRs, bare IPs and
start - endranges, merges overlaps and adjacent blocks, and prints the minimal list — handy for firewall rules and allow-lists.
What the fields mean
- network
- The first address, with every host bit zero. It names the subnet.
- broadcast
- IPv4 only: the last address, every host bit one. IPv6 has no broadcast; it uses multicast.
- usable hosts
- For IPv4, total minus network and broadcast. A
/31has two usable addresses for point-to-point links (RFC 3021) and a/32is a single host route. - wildcard
- The inverted mask that Cisco ACLs and OSPF expect.
- reverse zone
- Where PTR records live:
in-addr.arpaon octet boundaries,ip6.arpaon 4-bit nibbles. Blocks off a boundary span several zones; IPv4 blocks smaller than a/24need RFC 2317 classless delegation.
The type badge comes from the IANA special-purpose registries: RFC 1918 private ranges, 100.64.0.0/10 carrier-grade NAT, loopback, link-local, multicast, the documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 2001:db8::/32, 3fff::/20) and IPv6 unique local addresses in fc00::/7.
FAQ
How many hosts are in a /24?
256 addresses, 254 usable — the network (.0) and broadcast (.255) are reserved. Cloud providers often reserve a few more; AWS keeps five per VPC subnet.
Why is a /31 allowed to have two hosts?
On a point-to-point link there is no one else to broadcast to, so RFC 3021 lets both addresses be used. It halves address use on router links compared with a /30.
What size IPv6 subnet should I use?
Use a /64 for any LAN — SLAAC and many features assume it. Sites typically get a /48 or /56, which holds 65,536 or 256 of those /64s.
Does the calculator send my addresses anywhere?
No. Every calculation runs in this page's JavaScript and nothing is uploaded.