IP subnet calculator
Enter an IPv4 address with a prefix (192.168.1.10/24) or a subnet mask, and get the network, broadcast address, wildcard mask and usable host range. Split the network into equal subnets, or paste an IPv6 address for its expanded form and prefix network.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Type an address with a prefix or mask, such as
10.0.5.77/20 or 172.16.5.130 255.255.255.192.
- Read the network and host range. Copy the result with one click.
- To plan subnets, pick a number in Split into subnets.
How the numbers are found
An IPv4 address is a 32-bit number. The mask has the first n bits set (for /24 that is 24 ones, 255.255.255.0).
- Network address = address AND mask.
- Broadcast address = network with all host bits set to 1.
- Total addresses = 2^(32 − prefix); usable hosts = that minus 2 (except /31 and /32).
Example: 172.16.5.130 255.255.255.192 is a /26. Blocks are 64 long, so .130 sits in the block .128–.191: network 172.16.5.128, broadcast 172.16.5.191, hosts .129–.190, 62 usable.
IPv6
The tool shows the full 8-group form and the shortest form (the longest run of zero groups becomes ::, as in RFC 5952), then the network for the prefix, the first and last address and the number of addresses.
Tips
Classes (A, B, C) are shown for reference; routing today is classless and depends only on the prefix. Only the first line you type is used.
Frequently asked questions
What formats can I enter?
An IPv4 address with a prefix length (192.168.1.10/24), with a subnet mask (192.168.1.10 255.255.255.0), or alone (treated as /32). IPv6 works the same way: 2001:db8::1/64, or an address alone for /128.
Why are there two fewer usable hosts than addresses?
In a normal subnet the first address is the network address and the last is the broadcast address, so neither can be given to a host. /31 networks (RFC 3021, point-to-point links) use both addresses, and a /32 is a single host.
What is a wildcard mask?
It is the subnet mask with its bits flipped: 255.255.255.0 becomes 0.0.0.255. Router access lists and OSPF configuration use it to say which bits of an address may vary.
How does the splitting work?
Each extra bit of prefix halves the network. Splitting a /24 into 4 gives four /26 subnets of 64 addresses. Choose how many you want; the list shows each subnet with its first and last address.
Which address types does it recognise?
Private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback, link-local, carrier-grade NAT (100.64.0.0/10), documentation ranges, multicast and reserved space. For IPv6: loopback, link-local, unique local, multicast, documentation, IPv4-mapped, 6to4 and global unicast.