Subnet Mask Calculator
Convert a prefix length to dotted decimal, or a dotted mask back to a prefix. This page does not ask for an IP address. It answers the mask question on its own, and it rejects masks whose 1 bits are not contiguous.
Why /27 is 255.255.255.224
Twenty-seven leading 1s fill the first three octets and three bits of the last. Those three bits are 128+64+32, so the last octet is 224. The remaining five bits are the host portion, which is why the block size is 32 addresses.
Questions
Yes. Type it in the mask field and leave the field. It resolves to /27 when the 1 bits are contiguous. 255.255.0.255 does not resolve, because the 1 bits are broken up.
/0 is 0.0.0.0. /32 is 255.255.255.255. Both are contiguous, so both convert.
Sources
Reviewed 8 October 2026. The methodology page records what these labels do not cover.
Related tools
- Wildcard Mask CalculatorInvert a subnet mask into the wildcard bits an ACL checks.
- Subnet CalculatorNetwork, broadcast, mask, and usable hosts for an IPv4 address and prefix.
- CIDR CalculatorStart from CIDR notation and see the exact block it names.
- IP Range CalculatorInclusive block bounds, then the usable host range.
