RunTheTests

CIDR to IP Range

Expand any CIDR block into its network, broadcast and usable host range.

An address and prefix length, for example 10.0.0.0/8 or 203.0.113.64/26.

System verdict

RESULT

192.168.1.0/24 — 254 usable hosts

The first and last addresses are reserved for the network and broadcast, so usable hosts are two fewer than the total.

Diagnostic telemetry
Network address
192.168.1.0
Broadcast address
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Total addresses
256
Usable hosts
254
Scope
Private (RFC 1918)

What this cannot tell you

  • Arithmetic on the block you supply — it does not check whether these addresses are in use, routed or reachable.
  • IPv4 only. IPv6 blocks are handled by the IPv6 tools.

How this calculation works

A CIDR block is an address plus a prefix length: the prefix says how many leading bits are fixed as the network, and the rest are free for hosts. Masking the address against those fixed bits gives the network address; setting every remaining bit to one gives the broadcast address. Everything between them is the usable host range, and the total address count is two raised to the number of free bits.

What the results mean

Network address
The first address in the block, identifying the subnet itself. It is not assignable to a host.
Broadcast address
The last address in the block, reserved for traffic addressed to every host on the subnet. Also not assignable.
Wildcard mask
The inverse of the subnet mask. Cisco ACLs and some routing configurations expect this form rather than the mask.
Usable hosts
Total addresses minus the network and broadcast. A /31 and a /32 are the exceptions — see the FAQ.

Common problems and fixes

The tool shows a different network address than the one I entered
The address you entered is a host inside the block rather than its start. Masking it against the prefix gives the real network address, which is what is shown.
The host count looks two lower than expected
The network and broadcast addresses are reserved and cannot be assigned to devices, so a /24 gives 254 usable hosts rather than 256.

Frequently asked questions

Why does a /31 show no broadcast address?

RFC 3021 allows /31 blocks on point-to-point links, where there are only two endpoints and no need for a broadcast address, so both addresses are usable. A /32 is a single host for the same reason.

Does this work for IPv6?

No. This calculator is IPv4 only. IPv6 uses 128-bit addresses and different subnetting conventions, so it is handled by the separate IPv6 tools.

Does entering a private range send anything anywhere?

No. The calculation is arithmetic that runs in your browser. Nothing you type is transmitted or logged.

More in NetMath