Subnet Mask Calculator
Translates between the dotted mask and the slash notation.
CIDR prefix
—
Share sends a link that reopens these numbers. Copy details pastes the full breakdown as a list.
Subnet mask —
Wildcard mask —
In binary —
Usable hosts —
Total addresses —
Reading this —
The formula
prefix = count of leading 1 bits wildcard = NOT mask
A wildcard mask is the mask with every bit flipped, used by some router access lists.
What to watch out for
A mask such as 255.0.255.0 is not valid, because the 1 bits must all come first.
Frequently Asked Questions
What prefix is 255.255.255.0?
/24, which gives 254 usable hosts.
What is the mask for a /26?
255.255.255.192.
What is the mask for a /32?
255.255.255.255: a single address.