First/Last Usable Host Calculator

Find the first and last usable host addresses in a subnet

Input CIDR Addresses

Usable hosts exclude the network address (first) and broadcast address (last), except for /31 (point-to-point) and /32 (single host) networks.

Usable Host Range

Host ranges will appear here

The First and Last Usable Host Calculator determines the actual IP address range that can be assigned to devices within any IPv4 subnet. Enter a CIDR block like 192.168.1.0/24 to find the first usable host, last usable host, and total number of assignable addresses.

Understanding Usable Host Ranges

When you look at a subnet, the total number of addresses and the number of addresses you can actually assign to devices are two different things. Every standard IPv4 subnet reserves two addresses that cannot be given to hosts: the network address (the first address, where all host bits are zero) and the broadcast address (the last address, where all host bits are one). The usable host range is everything in between, and knowing exactly where that range starts and ends is essential for setting up DHCP pools, assigning static IPs, and planning capacity.

For a typical /24 subnet like 192.168.1.0/24, the math is straightforward: the network address is 192.168.1.0, the broadcast is 192.168.1.255, and hosts can use .1 through .254 -- that is 254 usable addresses. But when you move to non-octet-boundary prefixes like /26 or /28, the boundaries become less intuitive. A /26 subnet starting at 192.168.10.64 has its first usable host at .65 and its last at .126, with the broadcast at .127. Getting these boundaries wrong when configuring DHCP means either handing out the network or broadcast address (which will cause connectivity failures) or leaving valid addresses out of the pool (which wastes capacity).

This calculator takes any CIDR block, computes the reserved addresses, and shows you the exact usable range. It handles standard subnets as well as the special cases of /31 (where both addresses are usable per RFC 3021) and /32 (a single host route).

How to Find the First and Last Usable Host in a Subnet

  1. Enter a subnet in CIDR notation (e.g., 192.168.1.0/24)
  2. The calculator finds the network address (first address, all host bits 0)
  3. The first usable host is the network address + 1
  4. The broadcast address (last address, all host bits 1) is calculated
  5. The last usable host is the broadcast address - 1
  6. The usable host count is displayed as 2^(host bits) - 2

Usable Host Range Examples

SubnetNetwork AddressFirst UsableLast UsableBroadcastUsable Hosts
192.168.1.0/24192.168.1.0192.168.1.1192.168.1.254192.168.1.255254
10.0.0.0/810.0.0.010.0.0.110.255.255.25410.255.255.25516,777,214
172.16.0.0/20172.16.0.0172.16.0.1172.16.15.254172.16.15.2554,094
192.168.10.64/26192.168.10.64192.168.10.65192.168.10.126192.168.10.12762
10.0.0.0/2810.0.0.010.0.0.110.0.0.1410.0.0.1514
10.1.1.0/3010.1.1.010.1.1.110.1.1.210.1.1.32
10.1.1.0/3110.1.1.010.1.1.010.1.1.1N/A (RFC 3021)2

When to Use This Tool

  • Configuring DHCP scopes -- define the start and end of the address pool using the first and last usable addresses
  • Assigning default gateways -- the first usable host (e.g., .1) is conventionally assigned to the router
  • Planning static IP assignments -- reserve addresses from the top or bottom of the usable range for servers and infrastructure
  • Capacity planning -- verify that the usable host count exceeds your current device count plus growth margin
  • IP address management (IPAM) -- populate IPAM records with accurate start and end addresses for each subnet
  • Validating cloud subnet configurations -- verify that cloud-reserved addresses do not overlap with your intended host range

How Usable Host Ranges Are Determined

Reserved Addresses in Every IPv4 Subnet

In a standard IPv4 subnet, two addresses cannot be assigned to hosts:

AddressHost BitsPurpose
Network addressAll 0sIdentifies the subnet itself; used in routing tables
Broadcast addressAll 1sDelivers packets to all hosts on the segment

Everything between these two reserved addresses is the usable host range.

Worked Example: 192.168.10.64/26

A /26 prefix leaves 6 host bits (32 - 26 = 6), providing 2^6 = 64 total addresses.

Network address:   192.168.10.64   (host bits: 000000)
First usable host: 192.168.10.65   (host bits: 000001)
Last usable host:  192.168.10.126  (host bits: 111110)
Broadcast address: 192.168.10.127  (host bits: 111111)

Usable hosts: 64 - 2 = 62

Default Gateway Convention

By convention, the first usable host address in a subnet is assigned to the default gateway (router interface). For 192.168.1.0/24, the gateway is typically 192.168.1.1. Some organizations use the last usable host instead (e.g., 192.168.1.254). Either approach works as long as it is documented and consistent.

Special Prefix Lengths

PrefixTotalUsableBehavior
/3042Standard for point-to-point WAN links
/3122RFC 3021: no network/broadcast reservation, both addresses usable
/3211Single host route, used for loopbacks and host-specific routing

/31 subnets are defined by RFC 3021 specifically for point-to-point links where broadcast is unnecessary. Both addresses are usable, saving one address compared to /30.

Planning Host Ranges in Practice

The most critical use of this calculation is DHCP scope configuration. A DHCP pool should start at the first usable host (or after any static reservations) and end at the last usable host (or before any addresses reserved for infrastructure). If you accidentally include the network or broadcast address in your DHCP pool, some DHCP implementations will hand those addresses out to clients, causing intermittent connectivity failures that are notoriously difficult to troubleshoot because only the one device with the reserved address is affected.

A common convention for organizing the usable host range is to split it into zones. The bottom of the range (e.g., .1 through .20) is reserved for infrastructure: the default gateway, switches, access points, and other network devices with static IPs. The top of the range (e.g., .240 through .254) might be reserved for servers or printers. The middle of the range is the DHCP pool for workstations and other dynamic clients. This organization is not enforced by the protocol -- it is a convention -- but following it consistently across your network makes troubleshooting and documentation much easier.

When working with cloud providers, remember that they reserve additional addresses beyond the standard network and broadcast addresses. AWS reserves the first four addresses and the last address in every VPC subnet (network address, VPC router, DNS server, future use, and broadcast). Azure does the same. This means that in a cloud /24, you have 251 usable addresses rather than 254. For smaller subnets like /28 (14 usable in standard IPv4), the cloud overhead reduces usable capacity to around 11, which can be significant. Always check your provider's documentation and use this calculator alongside their specific reservation rules.

Frequently Asked Questions

What is the first usable host in 10.0.0.0/24?

The first usable host is 10.0.0.1. The network address 10.0.0.0 is reserved, so the first assignable address is the network address plus one. This is typically where the default gateway is configured.

Why are two addresses subtracted from the total host count?

The network address and broadcast address are reserved by the IP protocol and cannot be assigned to devices. The network address identifies the subnet in routing tables, and the broadcast address is used to deliver packets to all hosts on the segment. Subtracting these two gives the number of addresses that can actually be assigned.

What is the usable host range for a /28 subnet starting at 172.16.0.48?

For 172.16.0.48/28, the network address is 172.16.0.48 and the broadcast address is 172.16.0.63 (48 + 16 - 1 = 63). The first usable host is 172.16.0.49 and the last usable host is 172.16.0.62, giving 14 usable addresses.

Should I assign the gateway to the first or last usable address?

Either works, but consistency is key. The most common convention is to use the first usable address (e.g., .1 in a /24) for the default gateway. Some organizations prefer the last usable address (e.g., .254). Pick one convention and apply it across all subnets so that engineers and automation tools always know where to find the gateway.

How do /31 subnets work without a broadcast address?

RFC 3021 defines /31 subnets for point-to-point links between exactly two devices. Since there are only two endpoints and no need for broadcast, both addresses are assignable. This saves one address compared to the traditional /30 for WAN links. Most modern router platforms support /31 subnets, though some older firmware may not.

Related Tools

IPparseβ€’Free Network & Subnet Calculator Tools

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

100% Privacy-First β€’ No Data Collected