Subnet calculator

Calculate IPv4/IPv6 CIDR ranges and address counts.

Processed only in this browser

Calculate network boundaries and address counts for IPv4 or IPv6 CIDR blocks. No network connection is made.

Inputs and settings
Examples

A /24 or /64 suffix takes precedence over the prefix below.

Inputs and results are processed in this tab. Reloading or closing clears them; files you choose to save remain on your device.

How to use this tool

  1. Enter an address and prefix length, or append a CIDR suffix such as /24 or /64.
  2. Inspect the network start, final address and total block size.
  3. Check reservation assumptions before copying the host counts or address rows.

An IPv4 /31 point-to-point block

Input and settings
192.0.2.11/31
Result
Network 192.0.2.10/31; two addresses; both count as hosts

The usual two-address network/broadcast subtraction is not applied to a /31 link.

The entered address need not be the block start

The prefix identifies network bits and the remainder identifies host bits. Applying the mask finds the network start; filling the host bits with ones finds the block’s last address. The bar depicts the split between those bit ranges.

A prefix attached to the address takes precedence over the separate prefix field. IPv4 permits 0–32 and IPv6 permits 0–128. Big-integer arithmetic preserves even the address count of an exceptionally large block such as /0.

Mathematical counts and deployable addresses

Ordinary IPv4 blocks subtract network and broadcast addresses. Under point-to-point /31 semantics both addresses are counted, and /32 denotes one address. Extra reservations made by a cloud platform must be subtracted separately from this mathematical count.

For IPv6 the output shows the entire range and count without inventing a broadcast address. It does not query current availability, ownership, firewall configuration or routing on the internet.

Common questions

Why does /24 have 256 addresses but 254 hosts?

A normal IPv4 subnet reserves the network and broadcast addresses. The count does not include any additional platform-specific reservations.

Does this detect my public IP?

No. Only the supplied address is calculated, without DNS queries or an external IP-detection API.

Standards and references