Subnet Calculator
100% CLIENT-SIDE
CIDR Notation (e.g. 192.168.1.0/24)
Subnet Breakdown & Ranges
More from CIDRGen
Subnet Splitter
Split an IPv4 CIDR block into equal smaller subnets: choose the new prefix and get every network with its…
CIDR Overlap Checker & Aggregator
Paste a list of IPv4 CIDR blocks to find overlaps and containment, spot entries that are not network…
Netmask, Prefix and Wildcard Converter
Convert between a prefix length (/26), a dotted netmask (255.255.255.192) and an ACL wildcard (0.0.0.63).
Guides
Frequently Asked Questions
Is my data safe on cidrgen.dev?
Yes. Subnet math is computed locally in your browser, so no address you enter is transmitted or stored.
How many usable hosts are in a /24 network?
254. A /24 has 32-24 = 8 host bits, so 256 addresses, minus the network address and the broadcast address. The calculator lists network, first usable, last usable, and broadcast addresses so you never have to do that subtraction by hand.
Does CIDRGen handle IPv6?
Yes. It accepts IPv6 prefixes alongside IPv4 CIDR notation and reports the network range and address count for each.
🧭 Pro Tips & Gotchas
Reading the output
- Host counts are
2^(32-prefix); usable hosts subtract the network and broadcast addresses, so a/24gives you 254 assignable addresses, not 256. - The private-space check flags RFC 1918 only:
10/8,172.16/12,192.168/16. A100.64/10(carrier-grade NAT) or169.254/16(link-local) block will read as "public" and that is correct, not a bug. - Wildcard mask is the bitwise inverse of the netmask — useful for ACLs that expect it (
0.0.0.255for/24).
Subnetting gotchas
/31and/32break the-2rule: RFC 3021 makes point-to-point/31links have 2 usable addresses, and/32is a single host. Applying "total minus 2" universally reports 0 usable for both.- AWS, GCP, and Azure each reserve extra addresses beyond network/broadcast — typically the first and last plus a couple of hypervisor/VPN reservations — so a
/24in AWS yields 251 or 252 free, not 254. Plan capacity against the cloud's number, not the theoretical one. - A subnet's base address is always a multiple of its size.
10.0.1.128/25is legal;10.0.1.100/25is not a network address even though every cloud console will accept the string and silently re-interpret it. - Prefix arithmetic is on the prefix, not the octet:
10.0.0.0/23spans10.0.0.0 – 10.0.1.255. Assuming boundaries land on.0/.255is how overlap bugs get designed in. - IPv6 ignores all of the above:
64is the default delegation,:1is the router, there is no broadcast, and-2never applies. - CIDR notation is prefix length, not dotted-mask input.
192.168.1.0/255.255.255.0will fail; convert the mask to/24first.
Developer Sponsor / Partner