Subnet Mask Converter
Convert between dotted-decimal subnet masks, CIDR prefixes, wildcard masks, and binary — with host counts.
Your details
This calculator runs entirely on your device. Nothing you enter is uploaded, stored, or sold. How this works
CIDR prefix
/24
255.255.255.0 — 254 usable hosts per subnet
Includes your inputs, the full breakdown, and every row of the table.
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Total addresses
256
Usable hosts
254
- Dotted decimal
- 255.255.255.0
- CIDR notation
- /24
- Wildcard (inverse) mask
- 0.0.0.255
- Binary
- 11111111.11111111.11111111.00000000
- Hexadecimal
- 0xffffff00
- Network bits
- 24
- Host bits
- 8
| Mask | CIDR | Wildcard | Usable hosts |
|---|---|---|---|
| 255.255.255.252 | /30 | 0.0.0.3 | 2 |
| 255.255.255.248 | /29 | 0.0.0.7 | 6 |
| 255.255.255.240 | /28 | 0.0.0.15 | 14 |
| 255.255.255.224 | /27 | 0.0.0.31 | 30 |
| 255.255.255.192 | /26 | 0.0.0.63 | 62 |
| 255.255.255.128 | /25 | 0.0.0.127 | 126 |
| 255.255.255.0 | /24 | 0.0.0.255 | 254 |
| 255.255.254.0 | /23 | 0.0.1.255 | 510 |
What this means
- Wildcard masks are the bitwise inverse of a subnet mask and appear in Cisco access control lists and OSPF network statements.
- A valid mask always has its one-bits contiguous from the left. 255.255.255.0 is valid; 255.0.255.0 is not.
How the subnet mask converter calculation works
A subnet mask and a CIDR prefix express exactly the same thing in two notations. The mask 255.255.255.0 has 24 leading one-bits, so it is /24. Converting between them is just counting bits.
The wildcard mask is the bitwise inverse and is what Cisco IOS expects in access lists — where a subnet mask says 'these bits must match', a wildcard mask says 'ignore these bits'.
Frequently asked questions
What is 255.255.255.0 in CIDR?
/24. It has 24 network bits and 8 host bits, giving 254 usable addresses.
Why is 255.255.255.240 valid but 255.255.240.255 not?
Masks require the one-bits to be contiguous from the left. The second example has zeros between ones, which no standard IP stack accepts.
Related calculators
Subnet Calculator
Calculate network address, broadcast, usable host range, wildcard mask, and host count from any IPv4 address and CIDR prefix.
Tech & ITCIDR Calculator
Convert between CIDR notation and subnet masks, and see how many addresses each prefix length provides.
Tech & ITIP Range Calculator
Convert a start and end IP address into the CIDR blocks that cover it, and count the addresses in a range.
Tech & ITBandwidth Calculator
Convert between bits and bytes, size a connection for concurrent users, and estimate monthly data transfer.
Tech & ITSpotted a problem, or want this calculator to do more?Corrections are fixed first, and the most-requested features get built next.Tell us →
Disclaimer. This calculator is provided for general information and educational purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Results are estimates based on the inputs you provide and the assumptions described above. Confirm any figure with a qualified professional before acting on it.