Subnet Calculator

Work out the network address, broadcast, host range and host count for any IPv4 CIDR block.

Popular toolRemove image backgroundsCut out a subject in one click — free, private, in your browser.Try it
Usable hosts254
Total addresses256
Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
192.168.1.0/24

The prefix (CIDR) sets how many leading bits are the network — the rest address hosts. A /24 has 2⁸ = 256 addresses, but the network and broadcast addresses aren't assignable, leaving 254 usable hosts (192.168.1.1 – 192.168.1.254). A /31 carries just two addresses for point-to-point links (RFC 3021) and a /32 is a single host. All bit math runs in your browser.

Questions

How many hosts are in a /24?
A /24 has 2⁸ = 256 addresses, but the network and broadcast addresses are reserved, leaving 254 usable hosts — for 192.168.1.0/24 that is 192.168.1.1 through 192.168.1.254, with 192.168.1.255 as broadcast.
What is a wildcard mask?
It is the bitwise inverse of the subnet mask (255.255.255.0 → 0.0.0.255). Routers and ACLs use wildcard masks to match ranges of addresses.
Why do /31 and /32 behave differently?
A /32 is a single host route. A /31 is a two-address point-to-point link where, under RFC 3021, both addresses are usable and there is no separate broadcast — so the usual 'minus 2' rule doesn't apply.