IP Subnet Calculator · Practical guide

How Many IP Addresses Are in a /24?

A /24 gives you 256 addresses total, but only 254 are usable — here's where the other two go.

At a glance

The Answer: 256 Total, 254 Usable

A /24 prefix leaves 8 bits for hosts (32 − 24 = 8), and 2^8 = 256 addresses. Two are reserved: the first is the network address and the last is the broadcast address, so 254 addresses can be assigned to devices. For the classic 192.168.1.0/24 home network, usable addresses run from 192.168.1.1 to 192.168.1.254.

Interactive tool

IP Subnet Calculator

Enter your own values, then compare the result with the examples below.

Subnet Details

Network Address-
Broadcast Address-
First Usable Host-
Last Usable Host-
Number of Hosts-
Subnet Mask-
Wildcard Mask-
IP Class-

The Math Behind It

The number after the slash counts how many of the 32 address bits identify the network. Everything left over identifies hosts. Total addresses = 2^(32 − prefix); usable hosts = that minus 2. Enter any IP and prefix in the calculator above to see the exact network, broadcast, and host range.

Common Prefix Sizes Compared

PrefixTotal AddressesUsable HostsSubnet Mask
/1665,53665,534255.255.0.0
/204,0964,094255.255.240.0
/24256254255.255.255.0
/25128126255.255.255.128
/266462255.255.255.192
/281614255.255.255.240
/3042255.255.255.252

The Two Exceptions: /31 and /32

A /31 is used for point-to-point links between two routers. It has exactly 2 addresses and, per RFC 3021, both are usable — there's no broadcast on a two-device link. A /32 identifies a single host, with 1 address. The calculator above handles both cases correctly instead of subtracting two.

Frequently Asked Questions

Why can't hosts use the first and last addresses in a /24?

The first address (like 192.168.1.0) names the network itself, and the last (192.168.1.255) is the broadcast address that reaches every device on the subnet. Assigning either to a device causes routing and delivery problems.

Is a /24 the same as 255.255.255.0?

Yes, exactly. The /24 means 24 leading 1-bits in the mask, which written in dotted decimal is 255.255.255.0. They're two notations for the same thing.

How many /24 subnets fit in a /16?

256 of them. A /16 has 65,536 addresses and a /24 has 256, so 65,536 ÷ 256 = 256 subnets — for example, 10.0.0.0/24 through 10.0.255.0/24.

Is 192.168.1.0/24 a private network?

Yes. Anything in 192.168.0.0/16, 10.0.0.0/8, or 172.16.0.0/12 is private address space reserved by RFC 1918 and never routed on the public internet.