CIDR Toolkit: IPv4 & IPv6
A subnet calculator plus the jobs that usually need a spreadsheet: spotting overlapping prefixes, turning an IP range into CIDR blocks, and collapsing a messy allow-list into the fewest prefixes.
Subnets
IPv4 subnet cheat sheet
| Prefix | Netmask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point) |
| /32 | 255.255.255.255 | 1 | 1 (host) |
Cloud providers reserve extra addresses in every subnet: AWS and Azure take 5, GCP takes 4. Subtract those when sizing VPC subnets.
FAQ
How do I check whether two subnets overlap?
Two prefixes overlap if the start of each one is no later than the end of the other. Paste all your prefixes into the overlap checker to see every overlapping pair, and whether one contains the other or they're identical.
How do I convert an IP range to CIDR?
Split the range into the largest blocks that are aligned on a power-of-two boundary. 192.168.1.10–192.168.1.200 becomes eight prefixes, starting with 192.168.1.10/31. The Range → CIDR tab does this for IPv4 and IPv6.
What does aggregate (summarize) do?
It merges overlapping and adjacent prefixes into the smallest equivalent set. For example, 10.0.0.0/24 and 10.0.1.0/24 become 10.0.0.0/23. That's useful for shortening firewall rules, allow-lists and route tables without changing what they match.
What is a wildcard mask?
The bitwise inverse of the netmask (0.0.0.255 for a /24). It's used in Cisco ACLs and OSPF network statements.