Reviewed method · 10 August 2026

IPv4 CIDR methodology

The formulas, assumptions, worked examples and standards behind the calculator.

IPv4 has 32 bits. A CIDR prefix /p assigns the first p bits to the network and leaves 32 − p host bits. The range contains2^(32 − p) addresses.

Boundary calculation

  1. Convert the four decimal octets to one unsigned 32-bit value.
  2. Create a mask with the leading prefix bits set to one.
  3. Apply the mask to get the network address.
  4. Set every host bit to one to get the upper or broadcast field.

Worked /24 example

For 192.168.1.42/24, 24 network bits leave eight host bits. The block contains 256 addresses from 192.168.1.0 to 192.168.1.255. Under traditional subnet semantics, hosts run from .1 through.254.

Point-to-point and host routes

RFC 3021 permits both addresses in a /31 on a point-to-point link; neither acts as broadcast. A/32 identifies one host route, so this tool reports one usable address and explains that the displayed boundaries coincide.

Limits

Sources