Subnet Calculator
Work out the network, broadcast, mask, wildcard and host range for any IPv4 address and CIDR prefix, and split a subnet into equal parts.
mondaytool.com/tools/subnet-calculator ·
Typing a slash in the address box, like 10.0.0.0/8, overrides the prefix field.
Made with MondayTool · mondaytool.com/tools/subnet-calculator
Last updated:
Subnet calculator for IPv4 and CIDR
This subnet calculator takes an IPv4 address and a prefix length and shows the network address, broadcast address, subnet mask, wildcard mask, first and last usable host, total addresses and usable hosts. It also shows the address in binary with network and host bits colored differently, says whether it is private, loopback, link-local or public, and can split the subnet into equal smaller ones.
How to use it
- Type an IPv4 address in the first box, for example
192.168.1.10. You can also type it with the prefix, like192.168.1.10/24, and the slash part overrides the prefix field. - Set the prefix length from 0 to 32 if you did not type it in the address box.
- Read the results table, the usable host range and the binary view.
- To divide the subnet, open Split into equal subnets and choose a longer prefix. The tool lists each subnet with its network, usable range and broadcast address.
CIDR prefix cheat sheet
| Prefix | Subnet mask | Usable hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /20 | 255.255.240.0 | 4,094 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
How it works
An IPv4 address is a 32-bit number. The prefix length is how many of its leading bits identify the network. The rest identify hosts. The tool uses these formulas:
- Total addresses:
2^(32 - prefix) - Usable hosts:
2^(32 - prefix) - 2(the network and broadcast addresses are not assigned to hosts) - Network address:
address AND mask - Wildcard mask:
NOT mask - Broadcast address:
network OR wildcard
Two special cases follow RFC 3021: a /31 has 2 usable addresses (a point-to-point link) and a /32 is a single host.
Worked examples
192.168.1.10/24: network 192.168.1.0, broadcast 192.168.1.255, mask 255.255.255.0, wildcard 0.0.0.255, hosts 192.168.1.1 to 192.168.1.254, 254 usable.172.16.5.9/20: network 172.16.0.0, broadcast 172.16.15.255, mask 255.255.240.0, 4,094 usable hosts.10.0.0.0/8: 16,777,216 addresses, 16,777,214 usable.192.168.1.0/24split into /26 gives 4 subnets that start at 192.168.1.0, .64, .128 and .192, each with 62 usable hosts.
Assumptions and limits
- IPv4 only. No IPv6. Nothing you type is sent anywhere.
- The split tool makes equal-sized subnets. It does not plan variable-length (VLSM) layouts across mixed sizes.
- The subnet list shows at most 256 rows and says so when more exist.
- The address type note covers the private ranges (10/8, 172.16/12, 192.168/16), loopback, link-local, and calls everything else public.
- Addresses with leading zeros, such as 010.1.1.1, are rejected because they are ambiguous.
Frequently asked questions
How many hosts are in a subnet?
Take 2 to the power of (32 minus the prefix length), then subtract 2 for the network and broadcast addresses. A /24 has 256 addresses and 254 usable hosts; a /26 has 64 addresses and 62 usable hosts.
What is a wildcard mask?
It is the subnet mask with every bit flipped. For 255.255.255.0 the wildcard mask is 0.0.0.255. The calculator shows it next to the subnet mask.
Why does a /31 show 2 usable hosts?
RFC 3021 allows /31 networks on point-to-point links, so both addresses can be used and there is no separate broadcast address. A /32 is one single address.
Do I have to enter the network address?
No. You can enter any address inside the subnet, such as 192.168.1.10/24, and the tool works out the network address for you.
Related Network & API
Browse all tools from the same category.
URL Encoder / Decoder
Encode and decode URL components
Open toolURL Parser
Break a URL into scheme, host, path, and params
Open toolShowing 1-2 of 8