Skip to content

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.

CIDR prefix

30 usable hosts

11111111111111111111111111100000
/27
/8/16/24/32
Network bitsHost bits

Drag the line to flip mask bits. The result updates as it moves.

Subnet mask

255.255.255.224

CIDR /27. 27 network bits, 5 host bits.

Wildcard mask

0.0.0.31

Inverse of 255.255.255.224

Total addresses

32

30 usable hosts.

Subnet mask, binary

11111111111111111111111111100000

Wildcard mask, binary

00000000000000000000000000011111

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