IP Subnet Calculator

Network Address

192.168.1.0

The Numbers

  • Broadcast address: 192.168.1.255
  • Subnet mask: 255.255.255.0
  • Wildcard mask: 0.0.0.255
  • Usable host range: 192.168.1.1 – 192.168.1.254
  • Usable hosts: 254
  • Total addresses: 256

Compare Calculations

Downloads

Includes your inputs and results for this calculation, plus any additional calculations you've compared.

How This Calculator Works

A subnet mask splits an IPv4 address into a network portion and a host portion, determining which addresses belong to the same local network. Enter an IP address and its CIDR prefix length (the “/24” in an address like 192.168.1.0/24), and this calculator finds the network address, broadcast address, subnet mask, and the range of addresses actually usable by devices.

The Formula

  • Subnet mask: the prefix length’s worth of leading 1 bits, followed by 0 bits (e.g. /24 → 11111111.11111111.11111111.00000000 = 255.255.255.0).
  • Network address: the IP address with a bitwise AND against the subnet mask — this zeroes out the host bits, leaving just the network.
  • Broadcast address: the network address with every host bit set to 1 — the highest address in the subnet.
  • Usable hosts: every address in the subnet except the network and broadcast addresses, since those are reserved — 232Prefix Length22^{32 - \vA{\text{Prefix Length}}} - 2 for ordinary subnets.

Two special cases carve out different rules: a /31 (RFC 3021) is used for point-to-point links and treats both addresses as usable hosts, since there’s no need for a broadcast address between exactly two devices. A /32 is a single-host route — the one address is both the network and its own only usable host.

Worked Example

192.168.1.0/24 (a /24\vA{/24} prefix):

  1. Subnet mask: 255.255.255.0 (24 bits of 1s, then 8 bits of 0s).
  2. Network address: 192.168.1.0.
  3. Broadcast address: 192.168.1.255.
  4. Usable host range: 192.168.1.1 through 192.168.1.254232242=282=2542^{32 - \vA{24}} - 2 = 2^8 - 2 = 254 usable addresses.

Source: CIDR (Classless Inter-Domain Routing) and IPv4 subnetting.

Frequently Asked Questions

What does the CIDR prefix (like /24) mean?

The number after the slash is how many leading bits of the 32-bit IP address are the network portion — a /24 means the first 24 bits identify the network, leaving the remaining 8 bits (256 addresses) for hosts on that network.

Why are 2 addresses subtracted from most subnets?

The lowest address in a subnet is reserved as the network address (identifying the subnet itself) and the highest is reserved as the broadcast address (for sending to every device on the subnet at once) — neither can be assigned to an individual device, which is why usable hosts is 2 less than the total address count.

Why don't /31 and /32 follow the same 2-address rule?

A /31 (RFC 3021) is specifically used for point-to-point links between exactly two devices, where reserving a broadcast address would waste half the available addresses — both addresses are treated as usable hosts instead. A /32 identifies exactly one address (a single host route), so that one address is both the network and its own usable host.