Loading tool…
About the CIDR / Subnet Calculator
Enter an address in CIDR notation (like 10.0.0.0/24) to get its subnet mask, network and broadcast addresses, the usable host range, and total address count — the numbers you need when carving up a VPC, sizing a Kubernetes pod CIDR, or troubleshooting a subnet.
How to use the CIDR / Subnet Calculator
- Enter an IPv4 address and prefix length, e.g. 192.168.1.0/24.
- The subnet mask, network/broadcast addresses, usable host range, and host count are calculated automatically.
- Adjust the prefix length to see how the range changes.
Step-by-step walkthrough with examples and the errors people hit: CIDR and Subnet Calculation Explained.
Example
192.168.1.0/24
192.168.1.0/24→
Network: 192.168.1.0 · Broadcast: 192.168.1.255 · Usable hosts: 192.168.1.1 – 192.168.1.254 (254 hosts)
Common errors and how to fix them
That is not a valid IPv4 address
Each of the four octets must be 0–255 and the prefix 0–32. 999.1.1.1/40 fails on both counts.
Do two subnets overlap?
Calculate both ranges and compare the first and last addresses. If either range contains the other's network address, they overlap.
More problems and fixes in the tutorial
FAQ
Does this support IPv6?
No, this calculator covers IPv4 CIDR blocks only.
Why is the usable host count 2 less than the block size?
The first address in a block is reserved as the network address and the last as the broadcast address (for blocks /30 and larger), so they’re excluded from the usable host range.
Is my input sent anywhere?
No, all calculations are done in your browser with basic bitwise arithmetic.