CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Network
How-to

How do I calculate how many usable hosts are in a subnet?

Short answer

Enter an IP with its CIDR prefix into a browser-based subnet calculator and it shows the total number of usable host addresses in that block. The count excludes the network and broadcast addresses automatically, and everything is computed on your device.

Why the count is not just two to the power of the host bits

A subnet has two to the power of its host bits total addresses, but two of them are reserved: the network address and the broadcast address. So the usable host count is that total minus two. For a /24 that is 256 total and 254 usable. A subnet calculator applies this rule for any prefix so you do not have to remember the off-by-two.

Plan address space without leaking it

Because the calculator runs in your browser, you can size subnets for a private network without sending your plan to any server. Enter the prefix you are considering, read the usable host count, and adjust the prefix until the block is the right size. It is free and needs no sign-up.

Step by step

  1. Open the calculator. Open the subnet and CIDR calculator in your browser.
  2. Enter an IP and prefix. Type any IP with the CIDR prefix you want to test, such as 10.0.0.0/22.
  3. Read the host count. Read the total hosts and the usable host figure it returns.

Frequently asked questions

Why is the usable count two less than the total?

The network and broadcast addresses are reserved, so they are subtracted from the total.

How many usable hosts are in a /24?

A /24 has 256 total addresses and 254 usable host addresses.

Is anything sent to a server?

No. The count is calculated locally in your browser.

Related answers