Toolman

/4 subnet

A /4 has a subnet mask of 240.0.0.0 and 268,435,454 usable hosts.

The numbers

Prefix length/4
Subnet mask240.0.0.0
Wildcard mask15.255.255.255
Network bits4
Host bits28
Total addresses268,435,456
Usable hosts268,435,454
/24 networks contained1,048,576

Where a /4 is used

A sixteenth of the space. The multicast block 224.0.0.0/4 is this size, which is the one place the prefix appears in ordinary configuration.

Why the usable count is what it is

A /4 leaves 28 bits for hosts, giving 228 = 268,435,456 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 268,435,454.

Binary layout

mask   11110000.00000000.00000000.00000000
       ^^^^                            
       4 network bits, 28 host bits

Splitting and combining

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

Frequently asked questions

How many hosts are in a /4?

268,435,456 addresses in total, of which 268,435,454 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 /4?

240.0.0.0. The prefix length is the count of leading 1 bits in the mask, so /4 is 4 ones followed by 28 zeros.

What is the wildcard mask for /4?

15.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 /4 compare to a /24?

A /4 is 1,048,576 times larger than a /24 — it contains 1,048,576 of them.

Other prefix lengths

All prefix lengths · Subnet calculator