Daily Figures Edition No Sign-Up • Free Forever Vol. XII — No. 204
“The figures, plainly worked — a standing desk of free, no-nonsense calculators.”
Find a calculator

Subnet Calculator

Enter an IP and CIDR prefix to get the network, mask, hosts and range.

Network
—
IPv4 subnet.
Details
Subnet mask—
Broadcast—
Usable hosts—
Host range—
Show our math
Enter your figures above to see the step-by-step working.
Everything computed client-sideEverything computed client-side — nothing leaves this page

How the Subnet Calculator Works

An IPv4 address paired with a CIDR prefix (like /24) splits into a network part and a host part. The prefix says how many leading bits are the network; the rest identify hosts. From that this calculator works out the subnet mask, the network and broadcast addresses, the usable host range and how many hosts the subnet holds.

A /24, the classic home network, has 256 addresses — 254 usable once you set aside the network and broadcast addresses. Each step smaller in prefix doubles the size; each step larger halves it.

usable hosts = 2^(32 − prefix) − 2

Frequently Asked Questions

What does /24 mean?

The first 24 bits are the network, leaving 8 bits (256 addresses) for hosts — 254 usable. Its mask is 255.255.255.0.

Why subtract 2 from the host count?

One address is the network identifier and one is the broadcast address, so neither can be assigned to a device.

What is the broadcast address?

The last address in the subnet, used to send to every host at once. For 192.168.1.0/24 it’s 192.168.1.255.

More From The Desk

Same plain method, different figures