Subnet Calculator (IPv4 and IPv6)
Plan a network or check a firewall rule. Enter an address like 192.168.1.10/24 or 2001:db8::/48 and see the network, the usable addresses, the masks and what kind of address it is.
How to calculate a subnet
- 1Type an address with its prefix, like 10.0.0.5/16, or with a mask, like 10.0.0.5 255.255.0.0.
- 2Read the network, broadcast and host range.
- 3Copy any value.
Hosts in a subnet
A /24 has 256 addresses, of which 254 are usable: the first is the network address and the last the broadcast. /31 links use both of their addresses (RFC 3021), and /32 is a single host.
Address types
The tool tells you whether an address is public, private (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback, link-local, carrier-grade NAT, multicast or reserved for documentation.
IPv6
For IPv6 you get the network, the first and last address and the number of addresses, plus the full and shortest forms of the address (2001:db8::1 is 2001:0db8:0000:0000:0000:0000:0000:0001).
Frequently asked questions
- Is anything sent to a server?
- No. Everything runs in your browser.
- What's a wildcard mask?
- The inverse of the netmask (0.0.0.255 for /24), used by Cisco access lists and some firewalls.
- How many hosts does a /16 have?
- 65,536 addresses, of which 65,534 are usable hosts.