CIDR / Subnet (IPv4)

Example: 192.168.1.10/24. Prefix length must be from 0 to 32.
—

IPv4 CIDR and subnet calculations

Enter an IPv4 address with a CIDR prefix to calculate its network address, subnet mask, broadcast address, address range, and total address count.

Formula and method

A /p IPv4 block contains 2^(32−p) addresses. The network address clears host bits; the broadcast address sets them.

Worked example

192.168.1.10/24 belongs to network 192.168.1.0 with broadcast address 192.168.1.255.

How to interpret the result

The prefix length determines which leading bits identify the network and which remaining bits identify addresses inside it. Network and broadcast addresses are conventional reservations on ordinary IPv4 subnets. Point-to-point /31 networks and single-host /32 routes follow different usable-address conventions.

Important limitations

  • /31 networks are commonly used on point-to-point links.
  • Private ranges are not globally routable.

Common questions

How many addresses are in a subnet?

An IPv4 /p block contains 2 raised to 32 minus p addresses. A /24 contains 256 total addresses; a conventional /24 usually has 254 assignable host addresses after network and broadcast reservations.

Does CIDR show whether an address is public?

The subnet math works for any valid IPv4 address. Private, loopback, link-local, multicast, and documentation ranges have separate routing meanings that should be checked before deployment.

Related tools

Method and examples reviewed September 8, 2026.