Math

Distance Between Two Points Calculator

Find the straight-line distance between two coordinate points.


Distance Between Two Points Calculator

Advertisement

The straight-line (“as the crow flies”) distance between two points on a coordinate plane.

How it works

The difference between the x-coordinates and between the y-coordinates are each squared, added together, and the square root gives the distance — a direct application of the Pythagorean theorem.

What this does not include

This does not include 3D coordinates — this calculator works specifically on a 2D plane.

How to use this calculator

  1. Enter both points’ x and y coordinates.

A worked example

Points (2, 3) and (7, 15): the horizontal difference is 5, the vertical difference is 12. Distance = √(5² + 12²) = √169 = 13 — a classic 5-12-13 right triangle.

What the variables mean

Variable Meaning
(x₁, y₁), (x₂, y₂) The two points’ coordinates
Horizontal / vertical difference The two legs of the right triangle formed between the points

Edge cases worth knowing

Identical points give a distance of exactly zero, since there’s no horizontal or vertical difference to measure.

The formula works the same regardless of quadrant or sign — negative coordinates square to positive values just like positive ones, so the distance is never affected by which side of the axes the points fall on.

Frequently asked questions

Why does this use the Pythagorean theorem?

The horizontal and vertical differences between two points form the two legs of a right triangle, and the straight-line distance between them is the hypotenuse.

Does the order of the two points matter?

No — the distance is the same regardless of which point is labeled first, since squaring removes the sign of the difference either way.

What’s a practical use for this?

Graphics and game programming, geometry homework, and any situation requiring a straight-line distance between two mapped or plotted points.

Be the first to rate this

Written by

J. Adeyemi

Statistics writer

J. Adeyemi writes the statistics and probability calculators, from descriptive summaries through to distributions and conditional probability. The recurring theme is scope: each page states precisely which question it answers, because most statistical mistakes come from applying a correct formula to the wrong question. Related-but-different measures get separate pages rather than being quietly merged.

Reviewed by

T. Okafor

Calculator reviewer — mathematics

T. Okafor reviews the mathematics calculators, verifying algebraic correctness and, just as importantly, behaviour at the edges — division by zero, undefined results, and the floating-point cases where a formula technically returns a number that should be reported as undefined. Every test case is recomputed independently rather than taken on trust.

How we write and review

Related calculators