Toolman

/24 subnet

A /24 has a subnet mask of 255.255.255.0 and 254 usable hosts.

The numbers

Prefix length/24
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Network bits24
Host bits8
Total addresses256
Usable hosts254
/24 networks contained1

Where a /24 is used

The most common subnet size there is: a former class C, 256 addresses and 254 usable. It is the default on essentially every home router and the standard unit for a single VLAN, largely because the boundary falls on an octet and the arithmetic can be done in your head.

Why the usable count is what it is

A /24 leaves 8 bits for hosts, giving 28 = 256 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 254.

Binary layout

mask   11111111.11111111.11111111.00000000
       ^^^^^^^^^^^^^^^^^^^^^^^^        
       24 network bits, 8 host bits

Splitting and combining

PrefixUsable hostsRelationship
Twice the size/23510Two /24 networks combine into one /23
This network/24254
Half the size/25126One /24 splits into two /25 networks
A quarter/2662Four /26 networks fit in a /24

Frequently asked questions

How many hosts are in a /24?

256 addresses in total, of which 254 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 /24?

255.255.255.0. The prefix length is the count of leading 1 bits in the mask, so /24 is 24 ones followed by 8 zeros.

What is the wildcard mask for /24?

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

A /24 is the reference point: 256 addresses, 254 usable, and the size of a typical home or office network.

Other prefix lengths

All prefix lengths · Subnet calculator