IPv4 Subnet Calculator

Enter an IPv4 address and a subnet mask or CIDR prefix to calculate the network range, broadcast address, usable hosts and binary breakdown.

About this tool

Subnetting divides a larger IPv4 network into smaller, self-contained segments. This calculator works out every value you need when planning or documenting a subnet: the network and broadcast addresses, the range of usable host addresses, the subnet and wildcard masks, and a binary view useful for teaching or verifying calculations by hand.

Worked example

Take 192.168.1.10/24. A /24 prefix uses a 255.255.255.0 mask, giving a network address of 192.168.1.0, a broadcast address of 192.168.1.255, and 254 usable host addresses from 192.168.1.1 to 192.168.1.254.

How to use this tool

  1. Enter any IPv4 address within the subnet, e.g. 192.168.1.10.
  2. Enter the subnet mask (255.255.255.0) or CIDR prefix (24).
  3. Results update instantly as you type, and the URL updates so you can bookmark or share a calculation.

Frequently asked questions

What is a subnet mask?
A subnet mask (e.g. 255.255.255.0) marks which bits of an IPv4 address identify the network and which identify the host. It is equivalent to a CIDR prefix — 255.255.255.0 is the same as /24.
What is the difference between the network address and the broadcast address?
The network address (the first address in a subnet) identifies the subnet itself and cannot be assigned to a device. The broadcast address (the last address) is used to send data to every device on that subnet simultaneously. Neither is normally usable as a host address.
Why does a /31 or /32 network have no usable host range?
A /32 contains exactly one address (typically used for point-to-point routes or loopback interfaces), and a /31 (per RFC 3021) contains two addresses, both usable, with no distinct network or broadcast address. Standard "first/last usable" logic does not apply to these two special cases.