Skip to main content
IP Range CalculatorPRO
Subnet Math & Set OperationsInstant Client-Side Tool

Address Distance Calculator

Count positions between two addresses.

Address Distance Calculator: inputs and results

Enter an IP address, CIDR prefix, or range. Then check its first and last address below.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

Key Capabilities

  • •100% Client-Side: Zero telemetry or server latency.
  • •RFC Compliant: Exact 32-bit and 128-bit integer precision.
  • •Quick Copy: Instant access to CIDR, mask, and range bounds.
  • •Cross-Platform: Works on desktop, tablet, and mobile browsers.

How Address Distance Calculator Works?

This tool works by subtracting the integer value of the lower address from the integer value of the higher address. The difference is the distance, and the difference plus 1 is the inclusive count.

  1. Enter 2 addresses

    Type 192.168.0.10 and 192.168.3.20.

  2. Convert both to integers

    Each address becomes a 32-bit number.

  3. Subtract

    The calculator takes the absolute difference: 3 × 256 + 10 = 778.

  4. Report both counts

    Distance = 778 steps. Inclusive count = 779 addresses.

Address Distance Calculator Formula

The formula is Distance = |int(B) − int(A)|, and Inclusive Count = Distance + 1.

Distance

D = |int(B) − int(A)|

Steps between the addresses.

Inclusive count

C = D + 1

Addresses from A to B, both included.

Exclusive count

D − 1

Addresses strictly between A and B.

/24 equivalents

C ÷ 256

Size in /24 blocks.

Worked example: 192.168.0.10 → 192.168.3.20

Octet 3 difference = 3 × 256 = 768
Octet 4 difference = 20 − 10 = 10
Distance        = 778
Inclusive count = 779 addresses

Address Distance Calculator Conversion Table

The table measures the distance and inclusive count for 10 address pairs.

Address AAddress BDistanceInclusive Count/24 Equivalents
192.168.0.10192.168.3.207787793.04
10.0.0.010.0.0.2552552561
10.0.0.110.0.1.12562571
172.16.0.0172.31.255.2551,048,5751,048,5764096
192.168.1.200192.168.1.501501510.59
10.0.0.010.255.255.25516,777,21516,777,21665536
203.0.113.1203.0.113.1010
0.0.0.0255.255.255.2554,294,967,2954,294,967,29616777216
100.64.0.0100.127.255.2554,194,3034,194,30416384
198.51.100.7198.51.101.72562571

What is Address Distance Calculator?

The Address Distance Calculator is a tool that counts how many address positions separate 2 IPv4 addresses.

Distance answers questions such as "how many addresses are in this pool" or "how far apart are these 2 servers in the plan". The calculator gives both the distance and the inclusive count, since off-by-one errors between the 2 values are common.

The order of the 2 addresses does not matter. The calculator always reports a positive distance.

What are the uses of Address Distance Calculator?

There are 4 main uses of the Address Distance Calculator, including pool sizing, license counting, and plan review.

  • Sizing DHCP pools

    The inclusive count of .100 – .199 is 100 addresses.

  • Counting licensed addresses

    Some software licenses count protected addresses in a range.

  • Reviewing address plans

    Distances between blocks show how much space separates allocations.

  • Measuring scan scope

    Security scans report the number of targets between 2 endpoints.