TinyCalc

CIDR ↔ Netmask

Convert between a /prefix and a dotted netmask, either direction.

Resulttinycalc.net
/n = n leading 1-bits, e.g. /24 = 255.255.255.0

How it works

A CIDR prefix counts the leading one-bits of the netmask: /24 means 24 ones, i.e. 255.255.255.0. The remaining bits address hosts, so a /24 holds 2⁸ − 2 = 254 usable addresses. Type either form and get the other, plus the wildcard mask used in ACLs.

Related calculators