Skip to content
TR EN
8 min read · · UK Bilişim Network Engineering Team

How Many Usable Hosts in /24, /25, /26, /27, /28, /29, and /30 Subnets?

Whether you are provisioning an AWS VPC subnet, a Kubernetes pod network, or a physical enterprise VLAN, the prefixes between /24 and /30 are the ones you will reach for most often. They are large enough for whole floors of users and small enough for a single router-to-router link. Knowing exactly how many usable hosts each prefix holds prevents two opposite failures: running out of addresses six months after go-live, or burning a /24 on a subnet that will never hold more than a dozen devices.

The Quick Answer: Usable Hosts per Prefix

Here is the reference table network engineers keep coming back to. Total addresses is the raw block size of the subnet; usable hosts subtracts the two addresses that every IPv4 subnet reserves.

CIDR Subnet Mask Wildcard Total Addresses Usable Hosts
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342

Notice the pattern: each step down the list cuts the block exactly in half. A /25 is half of a /24, a /26 is half of a /25, and so on down to a /30 with just four addresses. To see the full address ranges for any network you enter, try the calculator page for a prefix such as /26.

Why Two Addresses Are Never Usable

Every IPv4 subnet, regardless of size, sets aside two addresses for special purposes:

  • Network address — all host bits set to 0. It names the subnet itself and cannot be assigned to a device.
  • Broadcast address — all host bits set to 1. Traffic sent to this address reaches every host in the subnet.

That is why a /24 contains 256 total addresses but only 254 usable hosts, and why a /30 leaves exactly two addresses for devices. The one common exception is the /31 point-to-point link, covered later in this guide.

The Formula Behind the Numbers

You do not need to memorize the table. Every entry derives from one formula:

usable hosts = 2^(32 - prefix length) - 2

The exponent (32 - prefix length) is the number of host bits in the subnet. Work through it step by step:

  1. Subtract the prefix length from 32 to find the host bits. A /26 has 32 - 26 = 6 host bits.
  2. Raise 2 to that power to get the total block size. 2^6 = 64 total addresses.
  3. Subtract 2 for the network and broadcast addresses. 64 - 2 = 62 usable hosts.

A second shortcut works straight from the mask: subtract the last octet of the mask from 256 to get the block size. 256 - 192 = 64 for a /26, and 256 - 240 = 16 for a /28. For more background on masks and prefix notation, read the guide to subnet masks and CIDR notation, and for full worked exercises, the step-by-step subnetting tutorial.

Worked Example: Splitting 192.168.10.0/24 into Four /26 Subnets

Suppose one floor of an office building needs four VLANs, each able to hold about 60 devices. You start with the private address block 192.168.10.0/24 and carve it into /26s. Because a /26 covers 64 addresses, the subnets must begin at multiples of 64 in the last octet: 0, 64, 128, and 192.

Subnet Network Address Usable Range Broadcast Address
192.168.10.0/26192.168.10.0192.168.10.1 – 192.168.10.62192.168.10.63
192.168.10.64/26192.168.10.64192.168.10.65 – 192.168.10.126192.168.10.127
192.168.10.128/26192.168.10.128192.168.10.129 – 192.168.10.190192.168.10.191
192.168.10.192/26192.168.10.192192.168.10.193 – 192.168.10.254192.168.10.255

Each VLAN now has 62 usable host addresses. One of them must go to the default gateway, leaving 61 for end devices — comfortably above the 60-device target. The same alignment rule applies to every prefix: /27 blocks start at multiples of 32, /28 at multiples of 16, /29 at multiples of 8, and /30 at multiples of 4.

Now a smaller case. A firewall DMZ segment must host five servers. A /29 provides 6 usable addresses: in the block 10.20.30.0/29, the network address is 10.20.30.0, the usable range is 10.20.30.1 – 10.20.30.6, and 10.20.30.7 is the broadcast. Assign 10.20.30.1 to the firewall interface and 10.20.30.2 through 10.20.30.6 to the servers.

Real-World Use Cases for Each Prefix

The right prefix depends on what lives inside the subnet. These pairings reflect how prefixes are typically allocated in enterprise and cloud networks:

  • /24 — 254 usable hosts. The default choice for office and floor VLANs, large wireless segments, and general-purpose server farms.
  • /25 — 126 usable hosts. Large departments, call centers, or splitting a /24 into two halves.
  • /26 — 62 usable hosts. Mid-sized business units, branch LANs, and per-rack segments in data centers.
  • /27 — 30 usable hosts. Small branches, out-of-band management networks, and small server clusters.
  • /28 — 14 usable hosts. Management VLANs, printer networks, and camera segments with a stable device count.
  • /29 — 6 usable hosts. DMZ blocks, firewall outside legs, and small high-availability clusters.
  • /30 — 2 usable hosts. Point-to-point WAN links between routers, with one address at each end.

Cloud Subnets Reserve Extra Addresses

Cloud providers add their own reservations on top of the standard two. In an AWS VPC, every subnet reserves five addresses — the first four and the last — for the VPC router, DNS, and future use, so a /24 subnet there offers 251 assignable addresses instead of 254. Size cloud subnets one step larger than an on-premises equivalent would need, and remember that a subnet's CIDR generally cannot be changed after creation; the usual fix is migrating to a new subnet.

Common Mistakes to Avoid

  • Planning for the total instead of the usable count. A rollout that assumes 256 addresses in a /24 will collide with the network and broadcast addresses. Always plan against 254.
  • Forgetting the default gateway. In a /29 with 6 usable addresses, the gateway consumes one, leaving 5 for devices. In small subnets that single address matters.
  • Misaligned subnet boundaries. A /26 must start at a multiple of 64, so 192.168.10.96/26 is not a valid network — the block containing .96 is 192.168.10.64/26. Misalignment is a classic cause of overlapping subnets in router configurations.
  • Wasting /30s on modern point-to-point links. RFC 3021 permits /31 links, which use both addresses for the endpoints. Keep /30s for equipment that does not support /31.
  • Ignoring growth. A /28 that is nearly full on day one leaves no room for a second gateway, a load balancer, or a spare management address. Size for what the subnet will hold in two or three years, not just today.

What About /31 and /32?

Two prefixes just outside this range appear constantly next to it in real configurations:

  • /31 — 2 total addresses, 2 usable. After removing a network and a broadcast address, a subnet this small would normally have nothing left. RFC 3021 makes an exception for point-to-point links: both addresses are assigned to the two endpoints, halving the address consumption of routed links.
  • /32 — 1 address. Not a subnet in the usual sense: a /32 identifies a single host and appears as a loopback address on a router, a host route, or one address in a firewall rule.

IPv6 changes the question entirely. A standard /64 subnet holds a vast address space and reserves no network or broadcast address, so nothing is subtracted. The differences are covered in the comparison of IPv4 versus IPv6 subnetting.

How to Choose the Right Prefix

Before you allocate anything, run through a simple sizing procedure:

  1. Count the devices that will live in the subnet today, including servers, printers, cameras, and appliances.
  2. Add infrastructure addresses — at minimum the default gateway, plus any VRRP virtual address, load balancer, or management address.
  3. Add headroom for growth. A common approach is to leave roughly half the subnet free at go-live, so a 30-device segment lands in a /26 rather than a /27.
  4. Pick the smallest prefix that satisfies all three counts, then verify it against the table at the top of this guide.

When one address block must serve subnets of very different sizes, use VLSM instead of uniform splitting. The VLSM guide shows how to give a /30 to a WAN link, a /28 to a management VLAN, and a /24 to a user VLAN from the same parent block. Finally, run any planned network through the subnet calculator before it reaches a change ticket, and confirm the usable range matches what you designed.

Frequently Asked Questions (FAQ)

How many usable hosts are in a /24 subnet? →

A /24 subnet contains 256 total IP addresses and 254 usable host addresses, because the network address and the broadcast address cannot be assigned to devices.

How many usable hosts are in a /26 subnet? →

A /26 subnet contains 64 total addresses and 62 usable hosts. One of those is usually taken by the default gateway, leaving 61 for end devices.

Why do we subtract 2 from the total address count? →

Every IPv4 subnet reserves its first address as the network identifier and its last address as the broadcast address, so neither can be assigned to a host.

What is a /30 subnet used for? →

A /30 provides exactly 2 usable addresses, which makes it the traditional choice for point-to-point WAN links where each router takes one address. Modern networks often use /31 links instead to conserve addresses.

Can I use a /31 subnet? →

Yes. RFC 3021 allows /31 subnets on point-to-point links, where both addresses are usable because no network or broadcast address needs to be reserved.

How many /26 subnets fit inside a /24? →

Four. A /24 has 256 total addresses and each /26 covers 64, so the /24 divides into four equal /26 blocks starting at .0, .64, .128, and .192.

Network Engineering Toolset

All calculations execute client-side in your browser.

11 tools