IPv4 subnet calculator

Type an address with a prefix (10.20.30.40/22) or a netmask (10.20.30.40 255.255.252.0). Results update as you type, and you can split the network into smaller subnets.

How subnetting works

An IPv4 address is 32 bits. The prefix length (the number after the slash) says how many of those bits identify the network; the rest identify hosts inside it. In 192.168.10.37/24 the first 24 bits are the network (192.168.10.0) and the last 8 bits leave room for 256 addresses.

The first address in a block is the network address and the last is the broadcast address, so a normal subnet has 2(32 − prefix) − 2 usable host addresses. Two exceptions: a /31 has two usable addresses for point-to-point links (RFC 3021), and a /32 is a single host.

Common prefix sizes

PrefixNetmaskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022
/23255.255.254.0512510
/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
/32255.255.255.25511

Wildcard masks

A wildcard mask is the netmask with every bit flipped (255.255.255.0 becomes 0.0.0.255). Cisco access lists and OSPF network statements use wildcard masks instead of netmasks.

Private and special ranges

  • Private (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, for use inside homes, offices and plants.
  • Carrier-grade NAT (RFC 6598): 100.64.0.0/10, used by providers between their network and yours.
  • Link-local: 169.254.0.0/16, which a device gives itself when DHCP fails.
  • Loopback: 127.0.0.0/8, the device talking to itself.

Last reviewed December 2, 2026. Built and maintained by NetKit. Live tests run on third-party services (Globalping, Cloudflare and Google DNS, ipify, ipwho.is, rdap.org) and reflect the moment you run them. Only test systems you own or are allowed to check. Spotted an error? Tell us and we will fix it.