IPv4 subnet calculator

Enter an IP address with a CIDR prefix, like 192.168.1.10/24, to see the network, broadcast address, mask and usable host range.

CIDR cheat sheet

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/22255.255.252.01,0241,022
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422 (point-to-point, RFC 3021)
/32255.255.255.25511 (single host)

Private address ranges

  • 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private (RFC 1918) and not routed on the internet.
  • 100.64.0.0/10 is shared address space used by carrier-grade NAT.
  • 127.0.0.0/8 is loopback; 169.254.0.0/16 is link-local, used when DHCP fails.

Questions

Why are two addresses not usable?

In a normal subnet, the first address identifies the network and the last is the broadcast address, so neither can be given to a device. /31 and /32 are special cases.

What is a wildcard mask?

The inverse of the subnet mask (for /24, 0.0.0.255). Cisco access lists and OSPF use it.

Related tools