CIDR Calculator

Type a CIDR block and get the full breakdown instantly — plus a one-click way to split it into equal subnets.

CIDR Calculator

Valid

Type any CIDR block — results update instantly, and the block below shows how many /24s, /28s, etc. fit inside it.

Network bits Host bits

Breakdown

Network Address
💾 Save
192.168.0.0
Prefix Length
/31
Subnet Mask
255.255.255.254
Wildcard Mask
0.0.0.1
Total Addresses
2
Usable Hosts
2
First Usable
192.168.0.0
Last Usable
192.168.0.1
Next Adjacent Block
192.168.0.2

Split This Block

Break this CIDR block into equal-sized subnets, either by count or by target prefix.

Resulting subnet blocks from splitting the CIDR block above
# Network Broadcast
1 192.168.0.0/32 192.168.0.0
2 192.168.0.1/32 192.168.0.1

Have an IP and mask instead of a CIDR block? Try the general subnet calculator · Need just the address range? See CIDR to IP range · Combining several blocks into one? Use the supernet calculator

What CIDR notation is

CIDR (Classless Inter-Domain Routing) notation writes a network as an address followed by a slash and a number, like 10.0.0.0/22. The number after the slash is the prefix length: how many of the address's 32 bits are fixed as the network portion. The remaining bits belong to hosts within that network. A larger prefix number means fewer host bits and therefore a smaller block — a /28 is much smaller than a /16, even though 28 is the bigger number.

This is the same information a dotted-decimal subnet mask carries, just expressed as a bit count instead of four octets. /24 and 255.255.255.0 describe the identical boundary. If you're starting from a mask or a wildcard mask instead of a CIDR block, the subnet mask calculator converts between all three formats.

Prefix length to block size

Every prefix length corresponds to a fixed number of addresses: 2^(32 − prefix). Stepping the prefix down by one bit always doubles the block size; stepping it up by one bit always halves it. That's the entire arithmetic behind converting between prefix lengths.

CIDR prefix lengths from /16 to /30 with subnet mask, total, and usable addresses
Prefix Subnet Mask Total Addresses Usable Hosts
/16 255.255.0.0 65,536 65,534
/17 255.255.128.0 32,768 32,766
/18 255.255.192.0 16,384 16,382
/19 255.255.224.0 8,192 8,190
/20 255.255.240.0 4,096 4,094
/21 255.255.248.0 2,048 2,046
/22 255.255.252.0 1,024 1,022
/23 255.255.254.0 512 510
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/29 255.255.255.248 8 6
/30 255.255.255.252 4 2

How splitting a block works

Splitting a CIDR block means carving it into smaller, equal-sized blocks by extending the prefix. Each extra bit of prefix doubles the number of resulting blocks and halves each one's size. A /20 extended by 2 bits becomes four /22s; extended by 4 bits it becomes sixteen /24s. The tool above accepts either target — "I need N subnets" or "I want /24 blocks" — and computes the same result either way, since the two are directly related: the number of blocks is always a power of two.

This matters when planning VLANs, cloud subnets, or point-to-point links from a single allocation: you get the exact list of resulting network addresses without manually adding block sizes in binary. Working the other direction — combining several existing blocks back into one covering range — is what the supernet calculator does, and allocating subnets of genuinely different sizes from one block (rather than equal splits) is what the VLSM calculator handles.

CIDR Calculator FAQ

How many /24 subnets fit in a /16?

256. Each step down in prefix length by one bit doubles the number of blocks, so going from /16 to /24 is 8 extra bits — 2^8 = 256 /24 blocks. The same doubling rule applies between any two prefix lengths: a /20 splits into 16 /24s, and a /22 splits into 4 /24s.

What does the /24 in CIDR mean?

The /24 is the prefix length: it says the first 24 of the 32 bits in the IPv4 address are fixed as the network portion, leaving 8 bits (256 addresses) for hosts. It's shorthand for the subnet mask 255.255.255.0 — both describe the exact same boundary between network and host bits.

How do I split a CIDR block into equal subnets?

Decide either how many subnets you need or how large each one should be, then extend the prefix by enough bits to cover it. Splitting a /20 into 4 equal pieces means adding 2 bits (2^2 = 4), giving four /22 blocks. This calculator's split feature does that arithmetic for you and lists every resulting block.

Is CIDR the same as a subnet mask?

They express the same information in different formats. A CIDR prefix like /24 is a bit count; a subnet mask like 255.255.255.0 is the dotted-decimal form of that same bit count. Converting between them is one of the outputs this calculator shows automatically for whatever block you enter.

Subnet reference

Mask, hosts and a worked example for each prefix, plus the ranges that cause most real-world clashes. Learning? Try the subnetting practice trainer or print a cheat sheet.

More Network Tools

Free tools for network engineers — no signup, no rate-limit walls.

Browse all tools by job →