CIDR Calculator
An IPv4 subnet calculator. Enter a CIDR block like 10.0.0.0/24 and instantly see the network address, broadcast address, usable host range, total and usable host counts, the subnet mask and wildcard mask, and the binary breakdown. Handy for planning VPC subnets, firewall rules and route tables — all computed in your browser.
- Network address
- 10.0.0.0
- Broadcast address
- 10.0.0.255
- Usable host range
- 10.0.0.1 – 10.0.0.254
- Total addresses
- 256
- Usable hosts
- 254
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Prefix
- /24
Binary breakdown
Address 00001010.00000000.00000000.00000000 Netmask 11111111.11111111.11111111.00000000 Network 00001010.00000000.00000000.00000000
A subnet is arithmetic, not memorisation. An IPv4 address is 32 bits, and a CIDR block splits those bits into a fixed network part and a variable host part. The /24 in 10.0.0.0/24 says the first 24 bits are the network; the last 8 are free for hosts. That single number determines everything else.
From the prefix you derive the subnet mask (24 ones then 8 zeros = 255.255.255.0), and masking the address with it gives the network address. Flip the host bits all to 1 and you get the broadcast address. The addresses in between — minus those two reserved ends — are your usable hosts: 2^(32−prefix) − 2 of them. Every question about a block is one of these operations, which is why a calculator can answer instantly.
The edge cases are worth knowing. A /31 has no room for a separate network and broadcast, so RFC 3021 reclaims both addresses for point-to-point links — 2 usable, not 0. A /32 is a single host, used for host routes and loopbacks. And in the cloud, providers quietly reserve a handful of addresses in every subnet, so plan with a little slack below the theoretical usable count.
How it works
- Parses an IPv4 CIDR (e.g. 10.0.0.0/24) with pure bitwise math.
- Network, broadcast, first/last usable host and total/usable counts.
- Subnet mask, wildcard mask, and per-octet binary breakdown.
- Handles /31 (RFC 3021) and /32 edge cases correctly.
Frequently asked questions
What does the /number in a CIDR block mean?
The suffix is the prefix length — how many leading bits of the 32-bit IPv4 address are fixed as the network portion. /24 means the first 24 bits identify the network and the remaining 8 bits identify hosts, giving 2^8 = 256 addresses. A smaller number means a bigger block: /16 is 65,536 addresses, /8 is 16,777,216. Every step down doubles the size. The prefix directly sets the subnet mask — /24 is 255.255.255.0.
Why are usable hosts two fewer than the total?
In a normal subnet the first address is the network address (all host bits 0) and the last is the broadcast address (all host bits 1); neither can be assigned to a host, so usable = total − 2. A /24 has 256 total but 254 usable. The exceptions are /31, which by RFC 3021 has 2 usable addresses for point-to-point links (no network/broadcast reserved), and /32, a single host route. This calculator applies those rules automatically.
What is the wildcard mask for?
The wildcard mask is the bitwise inverse of the subnet mask (for /24: mask 255.255.255.0, wildcard 0.0.0.255). It marks which bits are "don’t care." Access control lists and routing protocols like OSPF and older Cisco ACLs match ranges using wildcards instead of subnet masks, so you often need both forms of the same range — the tool shows them side by side.
How do I use this to plan cloud subnets?
When you carve a VPC (say 10.0.0.0/16) into subnets, each subnet is a longer prefix inside it — /24s for 254 hosts each, or /20s for larger tiers. Enter the parent block to see its total space, then plan child prefixes so they don’t overlap and leave room to grow. Remember cloud providers also reserve a few addresses per subnet (commonly the first few and the last), so the usable count in practice is slightly below the RFC figure this tool shows.