Toolman

/5 subnet

A /5 has a subnet mask of 248.0.0.0 and 134,217,726 usable hosts.

The numbers

Prefix length/5
Subnet mask248.0.0.0
Wildcard mask7.255.255.255
Network bits5
Host bits27
Total addresses134,217,728
Usable hosts134,217,726
/24 networks contained524,288

Where a /5 is used

Too large to be allocated to anyone. Appears in route aggregation.

Why the usable count is what it is

A /5 leaves 27 bits for hosts, giving 227 = 134,217,728 addresses. Two of those cannot be assigned to a machine: the one with all host bits set to zero is the network address, which names the subnet itself, and the one with all host bits set to one is the broadcast address. That leaves 134,217,726.

Binary layout

mask   11111000.00000000.00000000.00000000
       ^^^^^                           
       5 network bits, 27 host bits

Splitting and combining

PrefixUsable hostsRelationship
Twice the size/4268,435,454Two /5 networks combine into one /4
This network/5134,217,726
Half the size/667,108,862One /5 splits into two /6 networks
A quarter/733,554,430Four /7 networks fit in a /5

Frequently asked questions

How many hosts are in a /5?

134,217,728 addresses in total, of which 134,217,726 are usable. The first is the network address and the last is the broadcast address, so two are always lost.

What is the subnet mask for /5?

248.0.0.0. The prefix length is the count of leading 1 bits in the mask, so /5 is 5 ones followed by 27 zeros.

What is the wildcard mask for /5?

7.255.255.255 — the bitwise inverse of the subnet mask. Cisco access lists and OSPF network statements take the wildcard rather than the mask; a zero bit must match and a one bit is ignored.

How does a /5 compare to a /24?

A /5 is 524,288 times larger than a /24 — it contains 524,288 of them.

Other prefix lengths

All prefix lengths · Subnet calculator