Network & DNS

CIDR Calculator

Calculate network, broadcast, usable range and netmask from an IPv4 CIDR.

IPv6 is not calculated in this version.

Results appear here.

What the result means

Enter an IPv4 address and a prefix, such as 192.168.1.10/24, or a network address in the same form. Each octet must be from 0 to 255 and the prefix from 0 to 32. The network is the address with the host bits cleared, which is the address AND the mask. The broadcast is the network OR the inverted mask. For prefixes 0 through 30, usable addresses are the size minus two: the network and broadcast are not counted as hosts. A /31 is the special two-address case, and both addresses are usable. A /32 is a single address and that address is usable. The wildcard is the bit inverse of the mask. IPv6 is out of scope for this version. The page says so instead of producing a wrong answer. Nothing is uploaded.

Related tools

Advertisement

Questions

What is a /24?

A /24 fixes the first 24 bits and leaves 8 bits for the host. That is 256 addresses. After removing the network and broadcast addresses, 254 are usable hosts. The mask is 255.255.255.0.

How many hosts in a /30?

A /30 has four addresses. Two are the network and the broadcast, so two are usable hosts. That is the usual point-to-point subnet before the /31 exception.

Why is IPv6 refused?

This version only does IPv4 masks and the /31 and /32 exceptions. An IPv6 prefix is rejected rather than run through IPv4 math.