InfyCalculator
💻

IP Address Range Calculator

Enter an IPv4 address and CIDR prefix to get the network address, broadcast, first and last usable host, and the full range.

IPv4 address
CIDR prefix
Loading calculator…

How it works

network = IP AND mask · broadcast = network OR (NOT mask) · first = network + 1 · last = broadcast − 1

A subnet mask splits an address into a network part and a host part. Bitwise-AND the address with the mask and every host bit drops to zero, giving the network address — the first address in the block. Bitwise-OR with the inverted mask fills the host bits to give the broadcast address at the top. The usable host range is everything strictly between those two, one address in from each end.

Worked example

192.168.1.50 with a /24 mask (255.255.255.0): the network is 192.168.1.0 and the broadcast is 192.168.1.255. Usable hosts run 192.168.1.1 through 192.168.1.254 — 254 addresses in all.

Frequently asked questions

What is the difference between the network and broadcast address?

The network address (host bits all 0) names the subnet itself and the broadcast address (host bits all 1) reaches every device on it at once. Neither is assignable to a single machine, so both sit just outside the usable range.

Why does any address in the block give the same result?

The network and broadcast depend only on the mask and the network bits, which every address in the subnet shares. So 192.168.1.50/24 and 192.168.1.200/24 both resolve to the same 192.168.1.0/24 range.

What are private IP ranges?

The blocks 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks and are not routable on the public internet — which is why home routers hand out addresses like 192.168.1.x.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.