Subnet Mask Converter – Mask, CIDR & Hosts

Convert between dotted mask, CIDR prefix and usable host count. Type “need 50 hosts” and get the smallest mask that fits.

Note: this is usable hosts — the network and broadcast addresses are already subtracted.

Enter a mask or prefix; results appear instantly

How it works

Usable hosts = 2^(32 − prefix) − 2, except /31 and /32.

See the full /0–/32 table →