Subnet Mask Calculator

Convert prefix lengths (/24) to subnet masks and vice versa. Includes wildcard mask, hex, binary, and host count. Full /0–/32 reference table.

Subnet mask255.255.255.0
Prefix length/24
Wildcard mask0.0.0.255
Mask (hex)0xFFFFFF00
Wildcard (hex)0x000000FF
Binary11111111.11111111.11111111.00000000
Total IPs256
Usable hosts254

Subnet mask reference

PrefixSubnet maskWildcardUsable hosts

CIDR Prefix Length vs Subnet Mask

A prefix length like /24 means the first 24 bits of the address are the network portion. The equivalent subnet mask 255.255.255.0 uses 1-bits for network and 0-bits for host portions.