/24 Subnet Mask ReferenceIPv4

The workhorse of the Internet: a /24 is 256 addresses with mask <code>255.255.255.0</code>, small enough to manage and large enough for most LANs. When someone says 'a Class C' or 'one subnet', odds are they picture a /24.

The /24 subnet mask is 255.255.255.0, equivalent to 0.0.0.255 as a wildcard. A /24 block contains 256 IP addresses (254 usable hosts).

/24 facts at a glance

Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Binary mask
11111111.11111111.11111111.00000000
Total addresses
256
Usable hosts
254 (excludes network & broadcast)
Block size
256 addresses (28)
Typical role
Standard LAN subnet

Example /24 networks

Three consecutive /24 blocks, starting at the /24 boundary that contains 198.51.100.0:

NetworkUsable rangeUsable hosts
198.51.100.0/24 198.51.100.1 – 198.51.100.254 254
198.51.101.0/24 198.51.101.1 – 198.51.101.254 254
198.51.102.0/24 198.51.102.1 – 198.51.102.254 254

How to calculate a /24 mask

A /24 mask sets the first 24 bits of a 32-bit number to 1 and leaves the remaining 8 bits as 0. In binary that reads 11111111.11111111.11111111.00000000, which converts to dotted decimal 255.255.255.0. Each block covers a contiguous run of 28 = 256 addresses, and every block starts at a multiple of that size. The wildcard simply flips every bit, giving 0.0.0.255.

Where /24 is used

Why only 254 usable hosts: the lowest address identifies the network itself and the highest is reserved for broadcast, leaving 254 for real devices.

All three RFC 5737 documentation ranges are /24s: 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24.

One /24 splits into two /25s, four /26s, eight /27s, sixteen /28s, or sixty-four /30s.

Frequently asked questions

How many usable hosts are in a /24?

Exactly 254. The block holds 256 addresses, minus the network address at the bottom and the broadcast address at the top.

What is the subnet mask for a /24?

<code>255.255.255.0</code>, with wildcard <code>0.0.0.255</code>. Twenty-four fixed bits leave the entire last octet for host numbering.

Why does a /24 have 254 hosts instead of 256?

Two addresses carry structural roles rather than device roles: the all-zero host byte names the network and the all-ones host byte broadcasts to everyone on it.

How many /24s are in a /16?

256. Each occupies one value of the third octet, which is why /16-to-/24 planning feels so natural.

Is /24 the smallest routable subnet on the Internet?

In practice, yes: operators worldwide filter prefixes longer than /24, so anything smaller stays behind NAT or within a provider's network.

Open the /24 block in the subnet calculator

Get the /24 wildcard mask →

Related prefixes

/23/25/26/28/30