CIDR Subnet Calculator
Break down any IP address and CIDR block instantly, bit by bit
CIDR notation packs a surprising amount of information into a short string like 192.168.1.0/24, and this calculator unpacks every bit of it. Enter an address and a prefix length, and get the network address, broadcast address, usable host range, subnet mask, and a visual breakdown of exactly which bits define the network and which ones are left for hosts.
Step 1 · Your address block
Enter an IP address and CIDR prefix
Type any IPv4 address and slide the prefix to match your CIDR notation. Everything below updates instantly as you adjust either one.
Any IPv4 address in standard dotted decimal notation. It doesn't need to be the network address itself, the calculator works that out for you.
The number after the slash in CIDR notation. A smaller number means a bigger network with more hosts, a larger number means a smaller, more specific block.
Subnet masks and CIDR prefixes describe the exact same thing in two different formats. Changing either one updates the other automatically.
Enter how many usable addresses you need and the calculator suggests the smallest CIDR block that fits, a common step in variable length subnet masking.
Optional. Defaults to seven days out, a common cadence for re-checking IP allocations on an active network. Pick any date that fits your own review schedule.
Step 2 · The full breakdown
Planning ahead
Smallest block that fits your host requirement
If you entered a number of hosts needed above, here's the smallest CIDR block that comfortably fits, plus how much address space you'd have left over.
Quick reference
Common CIDR prefixes and how many hosts they hold
A handy chart for the prefixes that come up most often in real network planning, with your current selection highlighted.
| CIDR prefix | Subnet mask | Total addresses | Usable hosts |
|---|
How this works
The binary math behind every result
This calculator follows Classless Inter Domain Routing exactly as defined in RFC 4632, the Internet Engineering Task Force standard that replaced the older class based addressing system. Private address ranges are identified according to RFC 1918, which reserves specific blocks for internal networks that never appear directly on the public internet.
Finding the network and broadcast address
Every IPv4 address is really just a 32 bit number split into four 8 bit octets. Applying a bitwise AND between the address and the subnet mask zeroes out all the host bits, giving the network address. Flipping the host bits to all ones instead gives the broadcast address, the highest address in that block.
Counting usable hosts
The total number of addresses in a block equals two raised to the power of however many host bits remain, which is 32 minus the prefix length. Two of those addresses, the network address and the broadcast address, aren't assignable to individual devices, so usable hosts equals the total minus two for any prefix shorter than /31.
For example, a /24 block leaves 8 host bits, giving 256 total addresses, of which 254 are usable once the network and broadcast addresses are set aside. Move to a /27 instead and you're down to 5 host bits, 32 total addresses, and 30 usable hosts, which is exactly the kind of trade off this calculator's slider makes easy to explore.
Related tools
Other calculators worth having on hand
Scheduling your next network audit or maintenance window? The add days calculator can pin down that exact future date. Tracking uptime commitments alongside your network documentation? The live date and time tool gives you a precise timestamp to reference. Legal or compliance deadlines tied to infrastructure changes are exactly what the court day calculator is built to track. Comparing where to park operating funds while budgeting for hardware? The 30 day yield calculator or the 91 day treasury bill calculator can help with that side of the planning. Working out what a future budget line is worth in today's terms, or the reverse, is a job for either the present value calculator or its alternate present value tool on this site. Staying hydrated during a long deployment night is a small thing that still matters, and the daily water intake calculator covers that. Managing hardware financing on the side? The 360 day amortization calculator breaks down every payment. Tracking a personal health routine while you're deep in infrastructure work? The ovulation cycle calculator and the refeed day calculator are both worth a look. Splitting work time across countries on a distributed team? The 183 day residency rule calculator is worth keeping close. Building a savings habit on the side of a technical career? The penny a day challenge calculator is a fun place to start. Keeping medication timing steady during a demanding project? The 30 day refill calculator and the medicine dosing schedule calculator both help with that.
Common questions
Frequently asked questions
What does the number after the slash mean in CIDR notation?
It's the prefix length, the number of bits from the left of the 32 bit address that are fixed as the network portion. The remaining bits are available for individual host addresses within that network.
How many usable hosts are in a /24 network?
A /24 has 8 host bits, giving 256 total addresses. Subtracting the network address and the broadcast address leaves 254 usable addresses for actual devices.
What's the difference between a subnet mask and a CIDR prefix?
They describe exactly the same boundary between network bits and host bits, just in different formats. A subnet mask writes it out as four dotted decimal numbers like 255.255.255.0, while CIDR notation writes it as a single number like /24.
How do I know if an IP address is private or public?
Private addresses fall within specific ranges reserved under RFC 1918, covering 10.0.0.0 through 10.255.255.255, 172.16.0.0 through 172.31.255.255, and 192.168.0.0 through 192.168.255.255. Anything outside those ranges is treated as a public, internet routable address.
What is variable length subnet masking and why does it matter?
Variable length subnet masking, often shortened to VLSM, means using different prefix lengths across a network instead of one fixed size everywhere, which avoids wasting addresses on smaller segments that don't need a full block.
Why do the network and broadcast addresses not count as usable hosts?
The network address identifies the subnet itself rather than any individual device, and the broadcast address is reserved for sending a message to every device on that subnet at once, so neither can be assigned to a single host.