Home › Free tools › Subnet Calculator
Free tool

Subnet Calculator

Type an IP with its prefix and get everything you need for that subnet in one place. Works for any IPv4 network, from a /8 down to a single /32 host route.

e.g. 10.20.30.40/22, or an IP with a mask below
Used when the box on the left has no /prefix
Optional: lists every smaller subnet inside this one
Need this done across a whole business network?

The team behind these tools runs CCIE Assure: monitoring, fixes and a monthly security score, led by a 2× CCIE.

See CCIE Assure

How subnetting works, in one minute

An IPv4 address has 32 bits. The prefix (the /24 in 192.168.10.0/24) says how many of those bits name the network; the rest number the devices on it. A /24 leaves 8 bits for devices, which is 256 addresses. The first one is the network address and the last one is the broadcast address, so 254 are usable for hosts.

Every bit you move from the host side to the network side halves the subnet and doubles the number of subnets. That is why a /24 splits into two /25s of 126 hosts, four /26s of 62 hosts, and so on. The split option above lists them all.

Quick reference

PrefixMaskUsable hostsTypical use
/30255.255.255.2522Router-to-router link (or /31)
/27255.255.255.22430Small management or server VLAN
/26255.255.255.19262Cameras or voice for a small site
/24255.255.255.0254Standard office or user VLAN
/23255.255.254.0510Large user or guest Wi-Fi VLAN
/22255.255.252.01,022Campus user VLAN or site summary

Questions

How many usable hosts are in a /24?

254. A /24 has 256 addresses; the network and broadcast addresses can't be given to devices.

What is a wildcard mask?

The inverse of the subnet mask (0.0.0.255 for a /24). Cisco uses it in access lists and OSPF network statements to say which bits must match.

Why does a /31 show two usable hosts?

RFC 3021 lets point-to-point links use both addresses of a /31, since no broadcast address is needed. Most current Cisco and Juniper platforms support it.

Is my data sent anywhere?

No. The calculator runs entirely in your browser; nothing you type leaves your device.

More free tools