Hosts per Subnet Calculator

Plan IPv4 subnets with confidence using simple inputs. See total, usable, and reserved addresses fast. Export your report anytime for audits and team sharing.

Calculator
Choose the style you prefer.
Hosts = 2^(32−prefix), with special cases.
Only contiguous masks are accepted.
Used to compute network and usable range.
This calculator applies common IPv4 practice.
Result appears above this form.

Example Data

Example Network CIDR Subnet Mask Total Addresses Usable Hosts
192.168.10.0 /24 255.255.255.0 256 254
10.20.30.0 /26 255.255.255.192 64 62
172.16.5.0 /30 255.255.255.252 4 2
203.0.113.8 /31 255.255.255.254 2 2

Formula Used

Special cases: /31 commonly provides 2 usable addresses for point-to-point links. /32 is a single host route.

How to Use This Calculator

  1. Select CIDR prefix or Subnet mask mode.
  2. Enter a prefix (0–32) or pick a valid mask.
  3. Optionally add a network IP to compute the address range.
  4. Press Calculate Hosts to view the result above.
  5. Use Download CSV or Download PDF for reporting.

FAQs

1) Why do most subnets subtract two addresses?
Typically one address is the network identifier and one is the broadcast address. These are not assigned to hosts on most IPv4 LAN subnets.
2) What makes /31 different?
A /31 creates a two-address block. For point-to-point links, many networks treat both as usable and do not use broadcast behavior.
3) What does /32 mean in practice?
A /32 represents a single IP host route. It is commonly used for loopbacks, host routes, and identifying a single endpoint.
4) Do I need to enter a network IP?
No. If you only need host counts, prefix or mask is enough. Adding a network IP lets the calculator derive network, broadcast, and usable ranges.
5) Why must the subnet mask be contiguous?
Standard IPv4 subnetting uses masks with all 1s followed by all 0s. Non-contiguous masks are unusual and unsupported by most tools and networks.
6) What is a wildcard mask used for?
A wildcard mask is the inverse of the subnet mask. It is commonly used in ACLs and routing filters to match address ranges efficiently.
7) Can this help with VLSM planning?
Yes. Try different prefix lengths to compare usable hosts per subnet. Then select prefixes that meet requirements while keeping your address space efficient.

Related Calculators

ip to binaryusable ip calculatorsubnet plannerip planning toolclassless ip calculatorsubnet range finderip network analyzerbinary ip converter

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.