CalcToolVault

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

Save these results

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

Breakdown
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
Subnet mask reference
MaskCIDRWildcardUsable hosts
255.255.255.252/300.0.0.32
255.255.255.248/290.0.0.76
255.255.255.240/280.0.0.1514
255.255.255.224/270.0.0.3130
255.255.255.192/260.0.0.6362
255.255.255.128/250.0.0.127126
255.255.255.0/240.0.0.255254
255.255.254.0/230.0.1.255510

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

Spotted 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.