CIDR Calculator
Convert CIDR notation to subnet masks, wildcard masks, and calculate usable IP ranges with an interactive slider.
CIDR Calculator
Results
- Network Address
- 192.168.1.0
- Broadcast Address
- 192.168.1.255
- Subnet Mask
- 255.255.255.0
- Wildcard Mask
- 0.0.0.255
- Total IP Addresses
- 256
- Usable Hosts
- 254
- First Host
- 192.168.1.1
- Last Host
- 192.168.1.254
What the CIDR Calculator Does
The CIDR calculator converts CIDR notation (e.g., 192.168.1.0/24) into the full set of subnet parameters: network address, broadcast address, subnet mask, wildcard mask, total IP count, usable hosts, and the first and last usable host addresses. The interactive slider lets you explore how changing the prefix length affects the subnet in real time.
How the Calculation Works
CIDR notation combines the network address and prefix length into a single expression. The prefix length specifies the number of leading 1-bits in the subnet mask. For example, /24 produces a mask of 255.255.255.0 (24 ones followed by 8 zeros). The number of host bits (32 minus the prefix length) determines the total address space: 2 raised to the power of the host bit count.
Example
For 192.168.1.0/24:
- Network: 192.168.1.0
- Broadcast: 192.168.1.255
- Subnet mask: 255.255.255.0
- Wildcard mask: 0.0.0.255
- Total IPs: 256
- Usable hosts: 254
- First host: 192.168.1.1
- Last host: 192.168.1.254
Common Use Cases
- Quickly converting between CIDR notation and subnet masks
- Comparing different prefix lengths to find the right subnet size
- Validating network and broadcast addresses before configuration
- Educational exploration of how prefix length impacts address space
Important Considerations
When choosing a CIDR prefix, balance current needs with future growth. A /24 provides 254 usable hosts, while a /23 provides 510. Over-subnetting wastes addresses; under-subnetting forces painful re-addressing later. For point-to-point links, use /31 per RFC 3021 to conserve addresses. For single-host routes, use /32.
Frequently Asked Questions
What is CIDR notation?
CIDR notation expresses a subnet by appending a slash and prefix length to an IP address, e.g., 192.168.1.0/24. The prefix length indicates how many bits are used for the network portion.
How many usable hosts does a /24 support?
A /24 provides 256 total addresses and 254 usable hosts (excluding the network and broadcast addresses).
What is the difference between /31 and /30?
A /30 provides 2 usable hosts with a dedicated broadcast address. A /31 (RFC 3021) provides 2 usable hosts without a broadcast address, making it ideal for point-to-point links.
Technically Reviewed By
Senior Enterprise Network Engineer — 25+ years of IT and network infrastructure experience, including enterprise Cisco switching, routing, wireless, firewalls, VPN, network access control, SD-WAN, and large-scale network operations.
Last reviewed: 2026-09-04
Calculations are performed using standards-based formulas and verified against known reference values. All computation runs client-side in your browser.
Related Resources
Subnet Calculator
Calculate IPv4 network addresses, broadcast addresses, subnet masks, CIDR ranges, wildcard masks, and usable hosts.
Wildcard Mask Calculator
Convert subnet masks to wildcard masks and inverse masks for ACLs, OSPF, and Cisco access list configuration.
VLSM Calculator & Subnet Planner
Plan VLSM subnets from a parent network. Enter multiple host requirements and automatically allocate non-overlapping, right-sized subnets with largest-first allocation, address-space visualization, CSV export, and print.
IP Subnet Overlap Checker
Detect overlapping, duplicate, and contained IPv4 subnets. Paste multiple CIDR networks to identify every conflicting pair with clear explanations and CSV export.
Route Summarization Calculator
Calculate the smallest CIDR summary or supernet for multiple IPv4 networks. Warns when the summary includes extra addresses and provides a more precise minimal CIDR set.
IP Address Calculator
Analyze any IPv4 address — convert between decimal, binary, and hexadecimal, identify class, and check private/public status.
IPv6 Prefix Calculator
Analyze IPv6 prefix lengths, calculate subnet counts, and convert between compressed and expanded notation.
CIDR Explained
What CIDR notation is, how it replaced classful addressing, and how to read and use slash notation like /24, /23, and /30 in real network configurations.
/24 vs /23: What's the Difference?
A practical comparison of /24 and /23 subnets — address counts, usable hosts, when to use each, and the trade-offs of larger broadcast domains.
How Many Hosts Are in a /24?
The definitive answer to how many usable hosts fit in a /24 subnet, with the math explained and edge cases like /31 and /32 covered.