Why it matters
Subnets come up everywhere in web work: firewall rules, cloud VPCs, allow-lists for webhooks and CDN origins, SPF records. Working out the host range of a /27 in your head is error-prone, and IPv6 prefixes are too long to do by hand at all.
This calculator does exact maths for both versions, tells you what kind of address it is, splits a block into smaller subnets and merges a messy list of ranges into the fewest CIDR blocks, which keeps firewall rules short.
How it works
- InputAn IPv4 or IPv6 address with a prefix
- In your browserCalculated with exact integer maths
- OutputRange, hosts, masks, subnets and a summary
Where it fits in a designer's workflow
- Plan
- Design
- Build
- Test
- Launch
By the numbers
Show the numbers as a table
| Prefix | Usable hosts |
|---|---|
| /22 | 1,022 |
| /24 | 254 |
| /26 | 62 |
| /28 | 14 |
| /29 | 6 |
| /30 | 2 |
| /31 | 2 |
| /32 | 1 |
How to use it
- Type an address with a prefix, such as 192.168.10.0/24 or 2001:db8::/48.
- Read the network details.
- Split it into smaller subnets if you need to.
- Paste a list of ranges to summarise, or test an address.
FAQ
How many usable hosts are in a /24?
254: 256 addresses minus the network and broadcast addresses. /31 and /32 are special cases for point-to-point links and single hosts.
Does IPv6 have a broadcast address?
No. IPv6 uses multicast instead, so the tool shows the first and last address.
Can I use a netmask instead of a prefix?
Yes, for IPv4: 10.0.0.0 255.255.255.0 works the same as 10.0.0.0/24.
What's 100.64.0.0/10?
Shared address space for carrier-grade NAT (RFC 6598). It's not public and not normal private space either.