Practical guide
How to use the subnet calculator
Subnetting is the part of networking everyone re-derives every few months. This calculator and the explanations below take the guesswork out of the math whether you are sizing a VPC, allocating a customer block, or studying for a certification.
What this tool checks
Enter any IPv4 or IPv6 address in CIDR notation — for example 10.0.0.0/24 or 2001:db8::/32 — and the calculator returns the network address, broadcast address, usable host range, total addresses, and the equivalent subnet mask. It accepts both classful and classless inputs and normalizes them into their canonical form.
When to use it
Use it before assigning a new VPC or VLAN, when planning a network migration, while answering certification practice questions, when troubleshooting a route that is supposed to cover an entire subnet, or when handing a block to a customer and you need the exact host range that fits inside the prefix. It is also useful for sanity-checking an existing setup — paste in the subnet and confirm the broadcast is what you expected.
How to read the result
The network address is the first address in the block and identifies the subnet itself. The broadcast address is the last and is reserved in IPv4. Everything in between is assignable. The mask (or prefix length) tells routers and operating systems how to split incoming addresses into network and host portions. Total addresses is 2^(32 − prefix) for IPv4 and 2^(128 − prefix) for IPv6.
Common errors and what they mean
If the calculator complains that the address does not match the prefix, the host bits are non-zero — for example, 192.168.1.5/24 is really inside 192.168.1.0/24 and the calculator will normalize. A /33 or larger for IPv4 is invalid because IPv4 addresses are 32 bits. For IPv6, you cannot exceed /128. Subnets larger than /24 (smaller prefix number) in IPv4 cross what used to be class-B boundaries and behave the same way today.
IPv4 CIDR quick reference
The prefix lengths you will reach for most often, with their mask and host counts. Usable counts assume standard IPv4 (network and broadcast reserved).
| Prefix | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /24 | 255.255.255.0 | 256 | 254 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
Field notes
Two mistakes account for most subnet confusion. First, host bits set in the input — 192.168.1.5/24 is not a network, it is a host inside 192.168.1.0/24; the calculator normalizes it, but your router config might not. Second, off-by-one on usable hosts: a /30 gives you 2 usable, not 4. When in doubt, size up one prefix rather than running out of addresses a year later.
Example: planning a /28 for a small VLAN
- Example input
10.50.10.0/28- Example result
Network: 10.50.10.0 Broadcast: 10.50.10.15 Host range: 10.50.10.1 — 10.50.10.14 Mask: 255.255.255.240 Total: 16 (14 usable)
A /28 is a common size for a small server VLAN: 14 usable hosts is enough for a rack of appliances plus a gateway and reserved address, without burning a full /24.
Related tools
Related guides
FAQ
What does a /24 mean in CIDR notation?
Why does the calculator subtract two addresses in IPv4 but not in IPv6?
What is the difference between a netmask and a CIDR prefix?
Can I split a /24 into smaller subnets here?
Is /31 really usable for point-to-point links?
How many usable hosts are in a /26?
What is the broadcast address and why can't I assign it?
Last reviewed: 2026-06-25.