Subnet Calculator

Enter an IPv4 address and CIDR prefix length (e.g. 192.168.1.10 /24) to calculate the subnet's details.

/

How It Works

The subnet mask, derived from the CIDR prefix length, is applied to the IP address to find the network address (all host bits zeroed) and broadcast address (all host bits set to one). The usable host range is everything between them.

Formula

Network Address = IP AND Subnet Mask. Broadcast Address = Network Address OR (NOT Subnet Mask). Usable Hosts = 2^(32 − prefix length) − 2.

Example

192.168.1.10/24 has network address 192.168.1.0, broadcast address 192.168.1.255, and 254 usable host addresses.

Frequently Asked Questions

Why subtract 2 from the total addresses for usable hosts?
The first address in a subnet is reserved as the network address and the last is reserved as the broadcast address, so neither can be assigned to a host (except for /31 and /32 networks, which use special rules).
What does the prefix length mean?
The CIDR prefix length (e.g. /24) is the number of leading bits in the 32-bit address used for the network portion — the remaining bits identify hosts within that network.