What is a /24 subnet? 256 IPs and when to use it

By TechCompare · Updated · How we check

A /24 subnet has the mask 255.255.255.0 and 256 total IPv4 addresses, including 254 usable hosts on a conventional subnet. It's the right size for most home and small office networks.

A /24 subnet, written as 255.255.255.0 in dotted-decimal notation, provides 256 total addresses with 254 usable for hosts (one reserved for the network address and one for broadcast). This is the default subnet size on most consumer routers.

CIDR
/24
Total addresses
256
254 usable for hosts
Subnet mask
255.255.255.0

CIDR reference table

Every IPv4 prefix from /8 to /32 with its subnet mask, wildcard mask and address counts. Pick a prefix to open its page or the calculator.

PrefixSubnet maskWildcard maskTotal addressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24This page255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Usable hosts are the total minus the network address and the broadcast address. A /31 is the exception: it has neither, so both addresses work as hosts on a point to point link (RFC 3021). A /32 is a single address. The wildcard mask is the subnet mask with every bit flipped, and Cisco IOS access lists and OSPF network commands use it.

How this is calculated

The /24 is common because it's simple and fits most home and small office networks. With 254 usable addresses, you can connect every phone, laptop, smart TV, IoT device, and printer in a typical household with room to spare.

In CIDR notation, /24 means the first 24 bits of the IP address are the network portion, leaving 8 bits for hosts (2^8 = 256). Moving to a /23 doubles the total address count and gives 510 usable hosts. Moving to a /25 halves it and leaves 126.

Verdict

Use a /24 for a home or small office network, and step up to a /23 when you cross roughly 200 active devices on the same segment. The /24 math is 256 total addresses minus the network and broadcast reservations, leaving 254 usable hosts, which is what most consumer routers ship with by default.

The host-side arithmetic (8 bits = 256) maps cleanly to the last octet, which is why many engineers start from the /24. A /23 gives 510 usable hosts, which clears the headroom without forcing a second VLAN and the inter-VLAN routing that comes with it.

More Subnet scenarios

/16 subnet (255.255.0.0)
A /16 subnet, written as 255.255.0.0, provides 65,536 total addresses with 65,534 usable for hosts.
View details
/28 subnet (255.255.255.240)
A /28 subnet, written as 255.255.255.240, provides 16 total addresses with 14 usable on a conventional IPv4 subnet.
View details
/22 subnet (255.255.252.0)
A /22 subnet, written as 255.255.252.0, provides 1,024 total addresses with 1,022 usable for hosts.
View details

Frequently asked questions

How many usable IPs in a /24?
254 usable host addresses. The total is 256, but the first address (e.g., 192.168.1.0) is the network address and the last (192.168.1.255) is the broadcast address.
What's the difference between a /24 and a /23 subnet?
A /23 doubles the address space of a /24. The /24 has 256 total IPs (254 usable), while the /23 has 512 total IPs (510 usable). The subnet mask for /24 is 255.255.255.0, for /23 it's 255.255.254.0. Use /23 if you expect to exceed 200 devices on the same segment.
Can I have multiple /24 subnets on the same physical switch?
Yes, by using VLANs. Each VLAN creates an isolated broadcast domain on the switch. You assign a /24 (or any other subnet size) to each VLAN and route between them with a router or L3 switch. This is common practice for separating guest, IoT, and trusted networks on a single physical LAN.