Usable Hosts Calculator

Calculate number of usable host addresses in a subnet

Input CIDR Addresses

Usable hosts = Total - 2 (network & broadcast), except /31 (2 usable) and /32 (1 usable).

Usable Host Counts

Usable host counts will appear here

The Usable Hosts Calculator determines how many IP addresses in a subnet can actually be assigned to devices, excluding the reserved network and broadcast addresses. Enter a CIDR prefix length like /24 to instantly see the usable host count for planning DHCP scopes, capacity, and IP allocation.

Understanding Usable Host Counts

The usable host count is the number that matters most when you are sizing a subnet for real-world use. It answers the practical question: "how many devices can I put on this subnet?" The answer is always two fewer than the total address count, because every standard IPv4 subnet reserves the first address (the network address) and the last address (the broadcast address). Neither can be assigned to a host.

For large subnets, this two-address overhead is negligible. A /24 has 256 total addresses and 254 usable -- you barely notice the difference. But for small subnets, the overhead is significant. A /30 has only 4 total addresses and 2 usable, meaning 50% of the space is reserved. A /29 has 8 total and 6 usable. These small subnets are common for WAN links, DMZ segments, and other scenarios where only a handful of devices need addresses, and choosing the wrong prefix length by even one bit can mean the difference between having enough addresses and falling short.

The calculation is straightforward: 2^(host bits) - 2. But in practice, you also need to account for addresses consumed by infrastructure -- the default gateway, any HSRP/VRRP virtual IPs, management interfaces on switches and access points, and addresses reserved for future use. The true capacity of a subnet for end-user devices is the usable host count minus all these infrastructure reservations, which is why experienced network planners always build in headroom rather than sizing to the exact device count.

How to Calculate Usable Hosts in a Subnet

  1. Enter a prefix length (e.g., /24) or a full CIDR block (e.g., 192.168.1.0/24)
  2. The calculator computes the number of host bits: 32 - prefix length (for IPv4)
  3. The formula 2^(host bits) - 2 is applied to subtract the network and broadcast addresses
  4. The result is the number of addresses available for assignment to hosts

Usable Host Count by Prefix Length

PrefixTotal AddressesUsable HostsFormulaCommon Use
/816,777,21616,777,2142^24 - 2Large enterprise block
/1665,53665,5342^16 - 2Campus / site allocation
/204,0964,0942^12 - 2Large VLAN
/212,0482,0462^11 - 2Medium VLAN
/221,0241,0222^10 - 2Medium VLAN
/235125102^9 - 2Extended LAN
/242562542^8 - 2Standard LAN
/251281262^7 - 2Half LAN
/2664622^6 - 2Small department
/2732302^5 - 2Server cluster
/2816142^4 - 2Small DMZ
/29862^3 - 2Minimal subnet
/30422^2 - 2Point-to-point link
/3122Special (RFC 3021)Point-to-point (no waste)
/3211Single hostLoopback / host route

When to Use This Tool

  • Choosing the right subnet size -- find the smallest prefix that accommodates your device count with room for growth
  • DHCP scope planning -- set pool boundaries based on the exact number of assignable addresses
  • IP address audit -- compare usable capacity against the number of active hosts to measure utilization
  • Cloud VPC design -- AWS, Azure, and GCP subnets each reserve additional addresses beyond the standard two (typically 3-5 extra)
  • Exam preparation -- CCNA and CompTIA Network+ exams frequently test usable host calculations
  • Budget planning -- estimate how many subnets of each size you need to cover your device count across sites

How Usable Host Counting Works

Why Subtract 2?

Every standard IPv4 subnet reserves two addresses:

Network address   β†’ 192.168.1.0     (host bits: 00000000)  ← cannot assign
First usable      β†’ 192.168.1.1     (host bits: 00000001)  ← assignable
...
Last usable       β†’ 192.168.1.254   (host bits: 11111110)  ← assignable
Broadcast address β†’ 192.168.1.255   (host bits: 11111111)  ← cannot assign

The network address identifies the subnet in routing tables. The broadcast address is used for one-to-all communication (ARP, DHCP discovery). Neither can be assigned to a host.

Choosing the Right Prefix for Your Host Count

To determine the correct prefix length, find the smallest subnet where usable hosts >= your requirement:

You needMinimum prefixUsable hostsHeadroom
10 devices/281440%
25 devices/273020%
50 devices/266224%
100 devices/2512626%
200 devices/2425427%
500 devices/235102%
1,000 devices/221,0222.2%

A good rule of thumb is to aim for 20-50% headroom above your current device count to accommodate growth without resubnetting.

Cloud Provider Subnet Reservations

Cloud providers reserve additional addresses beyond the standard two:

ProviderExtra ReservedExample for /24Actual Usable
AWS3 (router, DNS, future use)256 - 5 = 251251
Azure3 (router, DNS x2)256 - 5 = 251251
GCP2 (standard only)256 - 4 = 252252

When planning cloud subnets, account for these extra reservations in addition to the standard network and broadcast addresses.

Edge Cases: /31 and /32

/31 (RFC 3021): Provides exactly 2 usable addresses with no network or broadcast reservation. Designed for point-to-point links between two routers, saving one address compared to the traditional /30.

/32: Represents a single host address. Used for loopback interfaces (interface Loopback0) and host-specific routes. The "usable" count is 1.

Sizing Subnets in Practice

The biggest mistake in subnet sizing is planning for exactly the number of devices you have today. Networks grow. A department that has 45 workstations today will have 50 next quarter after hiring, plus a new printer, a conference room display, and a couple of IoT sensors. If you chose a /26 (62 usable hosts) based on 45 devices, you have just enough room -- but one unexpected growth spurt forces a disruptive re-addressing project. A /25 (126 usable hosts) costs you nothing extra in a private address space and gives you years of growth runway.

The exception to this guideline is small, purpose-built subnets. A /30 or /31 for a WAN link should be exactly that size -- there will never be more than two devices on the link. A /28 for a DMZ with 4 servers and a firewall interface is appropriately sized because DMZ segments are tightly controlled and you do not want unused address space that could be exploited. In security-sensitive segments, right-sizing the subnet limits the number of addresses that could potentially be assigned to rogue devices.

When working in cloud environments, always verify the provider's subnet reservations before sizing. A /28 in standard IPv4 gives you 14 usable hosts, but in AWS it gives you only 11 (14 minus the 3 extra reserved addresses). If you are deploying exactly 11 instances, you have zero headroom. Bumping up to a /27 (32 total, 27 usable in AWS) gives you comfortable space. Cloud subnet sizing requires the same headroom thinking as on-premises, but with the additional overhead of provider reservations factored in.

Frequently Asked Questions

How many usable hosts are in a /24?

A /24 subnet has 8 host bits, giving 2^8 = 256 total addresses. Subtracting the network address and broadcast address leaves 254 usable host addresses. This is the most common subnet size for office LANs and VLANs.

What is the smallest subnet that supports 50 hosts?

You need a /26, which provides 62 usable hosts (2^6 - 2). A /27 only provides 30, which is insufficient. The /26 gives 24% headroom above 50, which is reasonable for moderate growth.

Why does a /31 have 2 usable hosts instead of 0?

RFC 3021 defines /31 as a special case for point-to-point links. Since broadcast is unnecessary between exactly two devices, the standard network and broadcast reservations are waived. Both addresses in the 2-address space are assigned to the link endpoints, saving one address compared to a traditional /30.

How do usable hosts differ between IPv4 and IPv6?

The formula is the same, but the scale is vastly different. An IPv4 /24 gives 254 usable hosts, while an IPv6 /64 gives approximately 18.4 quintillion. In IPv6, address capacity per subnet is effectively unlimited, so the usable host calculation is mainly relevant for IPv4 planning.

How do I account for infrastructure devices when sizing a subnet?

Start with your end-user device count, add infrastructure (gateway, switches, APs, printers, management IPs), add 20-50% growth headroom, then pick the smallest prefix that covers the total. For example: 80 workstations + 15 infrastructure devices + 30% growth = approximately 124 addresses needed, so a /25 (126 usable) fits tightly but a /24 (254 usable) gives comfortable room.

Related Tools

IPparseβ€’Free Network & Subnet Calculator Tools

Β© 2026 IPparse. All tools run locally in your browser.

100% Privacy-First β€’ No Data Collected