IP subnet calculator

Calculate network address, host range, and subnet details for IPv4 or IPv6

CIDR quick reference (IPv4)

PrefixSubnet maskAddressesUsable hosts
/32255.255.255.25511 (single host)
/31255.255.255.25422 (point-to-point links)
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254
/23255.255.254.0512510
/22255.255.252.01,0241,022
/16255.255.0.065,53665,534

Network, broadcast and usable hosts

In an IPv4 subnet the first address is the network address and the last is the broadcast address; neither can be given to a device, which is why a /24 has 256 addresses but 254 usable hosts. The exceptions are /31 (two-address point-to-point links, RFC 3021) and /32 (a single host).

Wildcard mask

The wildcard mask is the subnet mask inverted (0.0.0.255 for a /24). Cisco access lists and OSPF use it instead of the subnet mask.

IPv6

IPv6 has no broadcast address and no shortage of space: a single LAN is normally a /64, and a site usually gets a /48 or /56 from its provider to split into many /64 networks.