Subnet Mask to CIDR Converter

Enter a dotted subnet mask to get its CIDR prefix length.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

A dotted-decimal subnet mask like 255.255.255.0 and its CIDR notation /24 describe the exact same thing: the mask, converted to binary, is a run of consecutive 1-bits followed by 0-bits, and the CIDR prefix is simply the count of those leading 1-bits. A /24 mask leaves 8 host bits, giving 256 total addresses and 254 usable host addresses after reserving the network and broadcast address.

Network engineers and system administrators convert between the two notations constantly when configuring routers, firewalls, and subnets, since older tools and documentation often use dotted masks while modern configs favor CIDR. This calculator takes a dotted subnet mask and returns its CIDR prefix length, along with the number of usable hosts and the corresponding wildcard mask.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators