Subnet Calculator

IPv4 address and prefix length to network, broadcast, host range and count.

Network
—
Subnet mask
—
Usable hosts
—
Broadcast
—
Usable addresses
—
Mask in binary
—

Worked example

192.168.1.10/24 covers 192.168.1.0 to 192.168.1.255. The network address is .0, the broadcast is .255, and 254 addresses are usable — the two excluded ones exist but cannot be assigned to a host.

A subnet mask splits the 32-bit address into a network part and a host part. The prefix length is the number of leading network bits, so /24 means 24 network bits and 8 host bits, giving 256 addresses.

Why two addresses disappear

The all-zeros host part identifies the network itself and the all-ones host part is the broadcast address. Neither can be assigned to an interface. The exceptions are /31, used for point-to-point links where both addresses are usable, and /32, which is a single host.