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.
Calculated Boundaries & ParametersReady
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.
Related Subnet Math & Set OperationsAll Tools
Bitwise Subnet Calculator
Show address-and-mask operations.
IP Address Offset Calculator
Add or subtract address positions.
Subnet Boundary Checker
Check alignment to a specified prefix.
IP-in-Range Checker
Test whether an address belongs.
IP-in-Subnet Checker
Test membership within a CIDR block.
Same Subnet Checker
Compare addresses under a selected mask.
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.
Enter 2 addresses
Type
192.168.0.10and192.168.3.20.Convert both to integers
Each address becomes a 32-bit number.
Subtract
The calculator takes the absolute difference: 3 × 256 + 10 = 778.
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 + 1Addresses from A to B, both included.
Exclusive count
D − 1Addresses strictly between A and B.
/24 equivalents
C ÷ 256Size 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 A | Address B | Distance | Inclusive Count | /24 Equivalents |
|---|---|---|---|---|
| 192.168.0.10 | 192.168.3.20 | 778 | 779 | 3.04 |
| 10.0.0.0 | 10.0.0.255 | 255 | 256 | 1 |
| 10.0.0.1 | 10.0.1.1 | 256 | 257 | 1 |
| 172.16.0.0 | 172.31.255.255 | 1,048,575 | 1,048,576 | 4096 |
| 192.168.1.200 | 192.168.1.50 | 150 | 151 | 0.59 |
| 10.0.0.0 | 10.255.255.255 | 16,777,215 | 16,777,216 | 65536 |
| 203.0.113.1 | 203.0.113.1 | 0 | 1 | 0 |
| 0.0.0.0 | 255.255.255.255 | 4,294,967,295 | 4,294,967,296 | 16777216 |
| 100.64.0.0 | 100.127.255.255 | 4,194,303 | 4,194,304 | 16384 |
| 198.51.100.7 | 198.51.101.7 | 256 | 257 | 1 |
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 – .199is 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.