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.

Network bits Host bits

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.

/24

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

CIDR notation -
Network address-
Broadcast address-
Subnet mask-
Wildcard mask-
Usable host range-
Total addresses-
Usable hosts-
Address type-
Days until next review-
Enter an IP address to see 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.

Enter a number of hosts needed above to see a suggested block size.

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 prefixSubnet maskTotal addressesUsable 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.

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.