EachCalculator

Subnet Calculator

Calculate the network address, broadcast address, and usable host range for an IPv4 subnet from an IP address and CIDR prefix.

Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Subnet Mask
255.255.255.0
Usable Hosts
254
192.168.1.1 - 192.168.1.254

How It Works

Subnet mask from CIDR

A CIDR prefix like /24 means the first 24 bits of the address are the network portion — the subnet mask is built by setting that many leading bits to 1.

Network and broadcast addresses

The network address is the IP address with all host bits set to 0. The broadcast address is the same, but with all host bits set to 1 — everything in between is a usable host address.

Example Calculation

192.168.1.10/24 has a network address of 192.168.1.0, a broadcast address of 192.168.1.255, and 254 usable host addresses (192.168.1.1 through 192.168.1.254).

Common Mistakes

  • Forgetting that the network and broadcast addresses themselves aren't usable for hosts — they're reserved.
  • Confusing the CIDR prefix (number of network bits) with the number of host bits — a bigger CIDR number means a smaller subnet, not a bigger one.

Frequently Asked Questions

What does /24 mean?
It means the subnet mask has 24 leading 1-bits (255.255.255.0), leaving 8 bits for host addresses — 256 total addresses, 254 usable after reserving the network and broadcast addresses.
What's special about /31 and /32?
A /32 is a single host address (no network/broadcast split). A /31 is commonly used for point-to-point links, where both addresses are usable since there's no room for a separate broadcast address.