CalcaTools

Distance Calculator | Compute coordinate distance in mi, km, or NM

SPONSORED
Find the straight-line distance between two points in 2D or 3D space using the distance formula. Enter coordinates and the tool shows the squared differences and the square-root step, making it easy to verify geometry homework, map calculations and engineering layouts.

Last updated: June 2026 · Free · No sign-up required

SPONSORED
Results

Enter values above and click Calculate to see your result instantly.

Quick reference

CaseFormula
Number line|x₂−x₁|
2D coordinates√((x₂−x₁)²+(y₂−y₁)²)
3D coordinates√((x₂−x₁)²+(y₂−y₁)²+(z₂−z₁)²)

functions Shows the working, not just the answer

For students and teachers, the final number is only half the value. Every math tool here exposes the formula it applied, the intermediate steps, and the rounding rule, so you can follow along, check your homework, or use the answer in a proof or report with confidence.

calculate Accurate to the spec

Calculations use 64-bit floating point with sensible rounding for the domain (currency to 2 decimals, percentages to 4 decimals, algebra to 6 significant figures). Where exact rational arithmetic matters — fractions, factorials, simplification — we use a dedicated BigNumber path so 1/3 + 1/6 returns ½, not 0.49999.

school Free for classroom use

Educators are welcome to link to any math calculator on CalcaTools from a class site, Google Classroom, or worksheet. The pages are mobile-friendly, free, ad-supported (so we can keep them free) and have no sign-up wall — students just click and use them in class or at home.

tips_and_updates Pair with the spoke articles

Below the calculator we link a small set of plain-English explainer pages — "What is a percentage?", "Why does PEMDAS matter?", and so on. They cover the underlying concept in 4–6 short paragraphs. Read those before the calculator if the topic is new, or after if you want the extra context.

Interpretation guide

InputTip
CoordinatesOrder points consistently
UnitsOutput uses same unit as inputs
MapsGeographic distance may need great-circle formulas

lightbulb Drone flight between two map grid points

A delivery drone flies from grid point (−2, 5) to (3, −7), in kilometers. The differences are Δx = 3 − (−2) = 5 and Δy = −7 − 5 = −12.

Result: d = √(5² + (−12)²) = √(25 + 144) = √169 = 13 km — a clean 5-12-13 right triangle.

What this means: 13 km is the straight-line, as-the-crow-flies distance. The flight path will be at least this long; waypoints, no-fly zones, and altitude changes only add to it. For short hops on a flat map grid, this Euclidean figure is exactly what navigation needs.

Formula & methodology

Formula: 2D distance = √((x₂−x₁)² + (y₂−y₁)²)

How the distance is calculated

The tool applies the distance formula: 2D distance = √((x₂−x₁)² + (y₂−y₁)²), extended to 3D with the z term. Enter the coordinates of two points and the tool shows the squared differences before taking the square root, so the working is fully transparent.

Example: the distance between (1, 2) and (4, 6) is √(3² + 4²) = √25 = 5 units.

Reading the result: this is the Euclidean distance — the straight-line separation — used in geometry, mapping, and physics. The same formula underlies the Pythagorean theorem in disguise, and the 3D extension handles spatial problems. The tool's step-by-step display makes it easy to verify homework and catch sign errors in the coordinates.

Authoritative source: Wolfram MathWorld

Frequently asked questions

How do I use the distance calculator?
Enter the coordinates of two points, either as (x, y) pairs on a 2D plane or (x, y, z) in 3D space, then press calculate. The tool applies the distance formula, for example the 2D distance = √((x₂−x₁)² + (y₂−y₁)²), and shows the squared differences before taking the square root, so you can follow the working and verify the result.
Does the formula work in three dimensions?
Yes — just add the z-term: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). The page shows the squared differences for each axis before taking the root, so a 3D layout or CAD measurement is as easy to verify as a 2D one.
Why is my driving distance longer than the result?
The tool computes straight-line Euclidean distance — the shortest possible path. Roads curve, terrain rises, and routes detour, so real travel distance is always longer. Use this figure for geometry and line-of-sight work, and a routing service for road trips.
Why do my results differ from another calculator?
The Distance Calculator is free, private, and accurate: it runs entirely in your browser (no uploads, no accounts), applies the standard calculation, and explains each step so you can verify the result. Enter two sets of coordinates — latitude and longitude, or cartesian (x, y) points — and this distance calculator returns the straight-line distance using the Haversine formula for geographic points and the standard distance formula for coordinates. Results There is no limit on usage, and it works on any device.
Can I use it with latitude and longitude?
For short distances on a local map projection it works fine, but over long distances the Earth's curvature matters and the flat-plane formula understates the truth. For city-to-city great-circle distances, a haversine formula — which accounts for the spherical Earth — is the right tool.
What units does the answer come in?
Whatever unit your coordinates use — meters in, meters out; pixels in, pixels out. The formula itself is unit-agnostic, so convert mixed units (feet vs. meters) before entering them, or the root will blend incompatible scales.
How can I check the squared-differences step myself?
Square each coordinate difference by hand and add them before rooting: for (−2, 5) → (3, −7) that's 5² + (−12)² = 25 + 144 = 169, and √169 = 13. The page displays each of these intermediate values, which is also the fastest way to catch a sign slip in your coordinates.

Explore the full math toolkit

Every CalcaTools math calculator — algebra, geometry, trigonometry, statistics, sequences, and unit conversions — with step-by-step workings on every result.