PB
Available
code
lock Free · Private · In-Browser

CIDR Calculator

Enter a CIDR prefix (0–32) to get its mask, wildcard, and address counts.

From prefix to mask and counts

A CIDR prefix compresses a whole subnet definition into a single number, but you often need the equivalent mask and host counts. Enter a prefix and this expands it into the subnet mask, wildcard mask, total addresses, and usable hosts.

A /24 becomes the mask 255.255.255.0 with 256 addresses and 254 usable hosts; a /30 becomes 255.255.255.252 with just 2 usable hosts, the common size for point-to-point links.

Instant reference, kept private

The conversion is pure bitwise arithmetic done in your browser, so it responds instantly and nothing you enter is uploaded.

Frequently Asked Questions

What is a CIDR prefix?

The /n after an address that says how many leading bits are the network portion. A larger n means a smaller subnet with fewer hosts.

How many hosts does a prefix allow?

2^(32−n) total addresses, minus 2 for the network and broadcast — so /24 gives 254 usable hosts and /30 gives 2.

Does this need an IP address?

No — it works from the prefix alone. Use the subnet calculator when you also want the network and broadcast for a specific address.

Take it further
All Free Tools

Browse the full set of free, private, in-browser tools.

Learn More arrow_forward