IP Subnet Calculator

How many hosts fit in a /26 subnet?

A /26 leaves 6 host bits: 64 total addresses, of which 62 are usable after reserving the network and broadcast addresses. Each step down (/25, /24) doubles the count.

Example: 192.168.1.0/26 → 192.168.1.0–192.168.1.63, 62 usable hosts.

Adjust the values, then select Calculate to see the result.
CIDR prefix (e.g. 24) or dotted mask (255.255.255.0)
Result
Enter your values, then select Calculate.

What subnet size does this network segment need?

  • When: General office or home LAN with mixed devicesPick: /24 (256 addresses, 254 usable)The default everywhere — large enough that you never count, small enough to route simply.
  • When: A department or VLAN that should stay under ~60 devicesPick: /26 (62 usable hosts)Four /26s fit inside one /24 — clean broadcast-domain separation without renumbering.
  • When: A point-to-point link between two routersPick: /30 or /31/30 gives exactly 2 usable hosts; modern gear also supports /31 on transit links (RFC 3021).

What a subnet mask does

An IPv4 address is 32 bits, and the subnet mask decides where the network part ends and the host part begins. In the mask, every 1-bit belongs to the network and every 0-bit to the host. CIDR notation compresses this to a count: /24 means 24 one-bits, the same as the dotted mask 255.255.255.0. AND-ing an address with its mask produces the network address; OR-ing the network with the inverted mask (the wildcard) produces the broadcast address.

Reading the results

The host range is everything between the network and broadcast addresses, and the usable-host count is 2 raised to the number of host bits, minus those two reserved addresses. A /24 therefore holds 254 devices. The class letter is a legacy grouping still useful for a quick size guess, and the scope tells you whether the address is routable on the public internet or reserved for private networks, loopback testing, or link-local self-assignment.

Frequently Asked Questions

What is the difference between /24 and 255.255.255.0?

Nothing — they describe the same mask. /24 counts the 24 leading one-bits, while 255.255.255.0 writes each byte in decimal. This calculator accepts either form in the mask field.

Why does a /31 or /32 break the usual rule?

A normal subnet reserves two addresses, which would leave nothing usable in a /31. RFC 3021 therefore allows both addresses on /31 links for point-to-point connections, and a /32 names exactly one host. The usable-host row reflects those special cases.

Is 192.168.x.x a public address?

No. The ranges 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for private networks by RFC 1918 and are not routed on the public internet. The scope row flags these, along with 127/8 loopback and 169.254/16 link-local addresses.

Formulas used
Usable hosts
2host bits − 2 (network + broadcast)

References

Related Calculators