Subnet Mask to CIDR Converter
Enter a dotted subnet mask to get its CIDR prefix length.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- 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?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)