IP Subnet Calculator

Calculate network address, broadcast address, host range, and number of usable hosts for any IPv4 CIDR block.

Network address
Broadcast address
First usable host
Last usable host
Subnet mask
Usable hosts

What is IP Subnet Calculator?

The IP subnet calculator takes a CIDR block (e.g., 192.168.1.0/24) and returns the network address, broadcast, host range, and netmask — the basics every network engineer computes daily.

Formula

The /N suffix means N bits of network prefix and (32−N) bits of host part. Network = IP AND mask. Broadcast = network OR ~mask. Usable hosts = 2^(32−N) − 2.

Worked example

192.168.1.0/24: network 192.168.1.0, broadcast 192.168.1.255, hosts .1 to .254, mask 255.255.255.0, 254 usable hosts.

How to use this calculator

  1. Enter a CIDR block in IP/N format.
  2. The calculator returns all subnet details.

Frequently asked questions

What's a /24, /16, /8?

/24 = 256 addresses (~254 usable). /16 = 65,536 addresses. /8 = 16,777,216 addresses. Each step doubles the host count.

Why subtract 2 for usable hosts?

The first address is the network address; the last is the broadcast address. Neither can be assigned to a host. Exception: /31 and /32 (point-to-point links) use both.

What's the difference between /24 and /23?

/24 = 254 usable hosts in one subnet. /23 = 510 usable hosts (combines two /24 subnets). Useful when you outgrow a single /24.

Can I use this for IPv6?

This calculator is IPv4 only. IPv6 uses a different notation (e.g., 2001:db8::/64) and much larger address space. Different math, different tools.