How Many Hosts Are in a /26 Subnet?

Beginner Calculate

Question

A small office needs its own subnet carved from a larger block. The administrator chooses a /26 prefix. How many host bits remain, what is the total address count, and how many usable host addresses does it provide?

Given

{
  "prefix": 26
}

Answer

{
  "host_bits": 6,
  "total_addresses": 64,
  "usable_hosts": 62
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

Step 1: Count the host bits

host_bits = 32 - prefix_length
host_bits = 32 - 26 = 6

Step 2: Calculate total addresses

total_addresses = 2^6 = 64

A /26 block spans exactly 64 addresses. The fourth octet increments in steps of 64, so the four possible /26s inside a /24 are:

Subnet Range
.0/26 .0 – .63
.64/26 .64 – .127
.128/26 .128 – .191
.192/26 .192 – .255

Step 3: Subtract reserved addresses

usable_hosts = 64 - 2 = 62

The first address is the network address and the last is the broadcast address — neither can be assigned to a device.

Step 4: Verify using the subnet mask

A /26 corresponds to the subnet mask 255.255.255.192:

Binary: 11111111.11111111.11111111.11000000
Prefix bits: 26 (twenty-six 1s)
Host bits:    6 (six 0s)

Summary

Property Value
Host bits 6
Total addresses 64
Usable hosts 62
Subnet mask 255.255.255.192

Related Terms

More Calculate Worksheets