Subnet Calculator
Work out network, broadcast, usable range and masks for any IPv4 subnet, and split into smaller subnets
About Subnet Calculator
Works out the network address, broadcast address, usable host range, subnet mask, wildcard mask and host count for any IPv4 address and prefix, and can split a network into equal smaller subnets.
Type an address with its prefix, like 192.168.1.10/24, or an address and a mask like 255.255.255.0. Results update as you type. To split a network, enter the longer prefix you want (for example 26 to split a /24 into four).
A /31 has two usable addresses and a /32 has one, which is correct for point-to-point links and single hosts. For other sizes, two addresses (network and broadcast) are not usable by hosts.
- What is the difference between the subnet mask and the wildcard mask?
- The subnet mask has ones for the network part (255.255.255.0 for /24). The wildcard mask is its inverse (0.0.0.255) and is used by some router access lists to say which bits may vary.
- Why are there two fewer usable hosts than addresses?
- The first address identifies the network and the last is the broadcast address, so neither can be given to a device. The exceptions are /31 (two usable, for point-to-point links) and /32 (a single host).
- Can I enter a mask instead of a prefix?
- Yes. Use the address, a slash and a dotted mask like 255.255.240.0, or type the address and the mask. The mask must be contiguous; something like 255.0.255.0 is rejected.
- Does it support IPv6?
- Not yet. This calculator is for IPv4 addresses and prefixes from /0 to /32.
- How does splitting a network work?
- Enter a longer prefix than the current one. A /24 split with 26 gives four /26 subnets, each with its own network, first, last and broadcast address. The tool lists up to 256 subnets at a time.
How to use Subnet Calculator
Type an IPv4 address with a prefix such as 192.168.1.10/24, or with a dotted mask such as 10.0.0.1/255.255.0.0. The network, broadcast, first and last usable address, masks, host counts, class and type update as you type. To split the network, enter a longer prefix in the split box and a table of the smaller subnets appears.
When to use it
Use it when planning a home, office or cloud network, checking whether two addresses are in the same subnet, working out a firewall or access list entry, studying for a networking exam, or choosing how to carve one block into several.
When not to use it
It handles IPv4 only; IPv6 addresses are not accepted. It does not check whether an address is actually in use, reserved in your organisation or allowed by your cloud provider, which holds back a few addresses in each subnet.
Tips for best results
A /24 has 254 usable hosts, a /25 has 126, a /26 has 62 and a /27 has 30. The wildcard mask is the inverse of the subnet mask and is what access lists on some routers expect. Cloud providers often reserve extra addresses per subnet, so keep spare room.
Limitations
Splitting is limited to 256 subnets at a time and the new prefix must be longer than the original. Usable hosts follow the usual rules: a /31 gives two, a /32 gives one and other sizes lose the network and broadcast addresses. The Type label covers private, loopback, link-local, carrier-grade NAT, multicast and reserved ranges.
Privacy
Everything is calculated in your browser from the numbers you type. No address is sent anywhere or stored.
More from Security & Developer: