Subnet / CIDR Calculator

Enter an IPv4 CIDR block to see its network details.

A subnet calculator turns an IP address and a prefix length into the numbers you actually need: which addresses belong to the network, which one is the broadcast address, how many hosts fit, and what the netmask and wildcard mask look like.

Enter an address in CIDR form — for example 192.168.1.0/24 — to see the full breakdown.

What CIDR notation means

The number after the slash is the prefix length: how many bits, counting from the left, are fixed as the network portion of the address. Everything after those bits identifies a host inside that network.

So in 192.168.1.0/24, the first 24 bits (192.168.1) name the network and the remaining 8 bits are free for hosts — 256 addresses in total. Make the prefix shorter and the network gets bigger: a /23 covers 512 addresses, a /16 covers 65,536. Each step down doubles the size.

Why usable hosts is two fewer than total addresses

In a normal IPv4 subnet, two addresses are reserved. The first is the network address, which names the subnet itself, and the last is the broadcast address, which reaches every host at once. Neither can be assigned to a machine, so a /24 with 256 addresses gives you 254 usable ones.

There are two edge cases worth knowing. A /31 has no room for either reserved address and is defined specifically for point-to-point links, where both addresses are usable. A /32 describes exactly one address and is how you refer to a single host in a routing table or firewall rule.

Netmask and wildcard mask

The netmask is the same information as the prefix length, written as four octets — a /24 is 255.255.255.0. Older equipment and most operating system network settings still expect this form.

The wildcard mask is the netmask inverted, and it turns up mainly in access control lists on network hardware. Where a netmask uses 1 bits to mean "this part must match", a wildcard uses 0 bits for the same thing, which is a common source of off-by-one confusion when copying rules between systems.

Private address ranges

Three IPv4 ranges are reserved for private use and are never routed on the public internet. If your device reports one of these, you are behind a router doing network address translation:

  • 10.0.0.0/8 — 10.0.0.0 to 10.255.255.255, common in larger corporate networks
  • 172.16.0.0/12 — 172.16.0.0 to 172.31.255.255, often used by container and VPN software
  • 192.168.0.0/16 — 192.168.0.0 to 192.168.255.255, the default for nearly every home router

Frequently asked questions