Enter Addressing Details
Example Data Table
| Input IP | Prefix | Network | Broadcast | First Usable | Last Usable | Usable Hosts |
|---|---|---|---|---|---|---|
| 192.168.10.25 | /24 | 192.168.10.0 | 192.168.10.255 | 192.168.10.1 | 192.168.10.254 | 254 |
| 10.10.4.9 | /20 | 10.10.0.0 | 10.10.15.255 | 10.10.0.1 | 10.10.15.254 | 4,094 |
| 203.0.113.10 | /31 | 203.0.113.10 | 203.0.113.11 | 203.0.113.10 | 203.0.113.11 | 2 |
Formula Used
- Subnet mask from prefix: mask = (232 − 1) << (32 − prefix)
- Network address: network = IP AND mask
- Wildcard mask: wildcard = NOT mask
- Broadcast address: broadcast = network OR wildcard
- Total addresses: total = 2(32 − prefix)
- Usable hosts: usually total − 2 (except /31 and /32)
How to Use This Calculator
- Enter an IPv4 address, or paste CIDR notation in the same field.
- Select Prefix Length or Subnet Mask mode.
- Provide the missing value, then click Calculate.
- Review network, broadcast, and usable range in the results table.
- Download CSV or PDF to share results with your team.
Why CIDR Beats Classful Addressing
CIDR treats the prefix as the true boundary, not the old A, B, or C classes. A single /18 can describe 16,384 addresses, while classful blocks would force larger, wasteful allocations. This calculator standardizes planning by converting any IPv4 address and prefix into a complete, auditable report.
It also supports mask-based entry, which is common in legacy documentation. By exporting the computed fields, teams reduce transcription errors and keep consistent network diagrams. Use the chart to compare usable versus reserved addresses at a glance across small subnets and large aggregates quickly.
Prefix Length and Address Capacity
Capacity follows a simple power rule: total addresses equal 2^(32−p), where p is the prefix. A /24 yields 256 total, a /20 yields 4,096 total, and a /16 yields 65,536 total. Practical host counts usually subtract two for network and broadcast, so /24 commonly provides 254 usable hosts.
Network, Broadcast, and Host Range
The network address is the first value in the block and anchors routing. The broadcast address is the last value and targets all hosts in that subnet. For /30, total addresses are 4, with 2 usable hosts, often used for point links. For /31, many networks treat both addresses as usable for point‑to‑point, eliminating broadcast overhead.
Subnet Masks and Wildcards
The dotted mask is the prefix written in decimal. For /27 the mask is 255.255.255.224, leaving 5 host bits and 32 total addresses. The wildcard is the inverse, so /27 uses 0.0.0.31, which is helpful in ACLs and policy rules. Binary views highlight contiguous ones followed by zeros.
Planning Examples for Common Prefixes
If you need about 900 devices, /22 offers 1,024 total and typically 1,022 usable hosts. For a small lab of 40 endpoints, /26 provides 64 total and 62 usable hosts. If you allocate 10.10.4.9/20, the network becomes 10.10.0.0 and the broadcast becomes 10.10.15.255, matching a 16‑subnet span of the third octet.
Operational Checks Before Deployment
After calculating a block, verify gateway placement, DHCP scope, and route summarization. Ensure overlapping ranges are avoided, especially when aggregating like 192.168.8.0/21. Export CSV for change control, and attach the PDF to tickets. For non‑octet prefixes, confirm reverse DNS plans, because delegation may require specific RFC‑style zone formats.
FAQs
Can I enter CIDR notation in the IP field?
Yes. Paste an address like 192.168.10.25/24. The calculator splits the IP and prefix automatically, then computes network, broadcast, and usable range.
What happens for /31 and /32 prefixes?
For /31, both addresses are treated as usable for point‑to‑point links. For /32, the block represents a single host route with one total and one usable address.
Why does usable hosts often equal total minus two?
Most subnets reserve the network address and the broadcast address. Subtracting them gives the typical usable host count used for planning endpoints and DHCP pools.
How do I know a subnet mask is valid?
A valid mask has contiguous 1 bits followed by 0 bits, such as 255.255.255.0. Non‑contiguous masks are rejected because they do not represent standard CIDR prefixes.
What does the wildcard mask indicate?
The wildcard is the bitwise inverse of the subnet mask. It highlights which host bits can vary, and it is commonly used in access lists and matching rules.
What does the graph show?
The chart compares usable addresses versus reserved or non‑usable addresses for the selected prefix. It helps you see waste quickly, especially when choosing between nearby prefix sizes.