Mathematics & StatisticsLast updated: 2026-09-30

Distance Calculator

Compute the Euclidean distance between two points in 2D or 3D with fully substituted working. Supports negative and decimal coordinates — useful for coordinate geometry and vector calculations.

Client-Side · Zero TelemetryPrivate & Secure

A = (x₁, y₁, z₁)

Point A

B = (x₂, y₂, z₂)

Point B

Enter two points to see the distance between them.

ShareXfB!L

How to use

  1. 1

    Pick the dimension

    Choose 2D (two components) or 3D (three).

  2. 2

    Enter the coordinates

    Fill in the coordinates of points A and B. Negatives and decimals are supported.

  3. 3

    Read the distance

    The distance appears with the substituted √ formula shown.

Features

  • 2D and 3D point-to-point distances with substituted √ working
  • Negative and decimal coordinates supported; zero distance correctly computed
  • Each component difference, its square and the √ step shown stage by stage
  • Euclidean vs Manhattan distance clarified in the details; inputs are never transmitted

Use cases

Check coordinate geometry

Verify hand-worked distances in 2D and 3D coordinate space problems.

Confirm vector magnitudes

Set the origin as point A and the magnitude appears as the distance.

Game collision thresholds

Compute distances between objects and compare against collision radii.

Details

The distance between two points follows from the Pythagorean theorem extended to coordinates: d = √((x₂−x₁)² + (y₂−y₁)²), adding a z-term for 3D. The tool substitutes your coordinates into every step — differences, their squares and the square root.

Both 2D and 3D are supported, with negative and decimal coordinates accepted. The distance is 0 only when the two points coincide. If the value under the radical is a perfect square, the result is an exact integer; otherwise it is shown as a decimal rounded to six places.

Conditions: coordinates accept absolute values up to one million. The distance is the Euclidean (straight-line) distance, not the Manhattan (grid-walk) distance. Inputs are never transmitted; all computation happens locally in your browser.

FAQ

What is the distance formula?

In 2D: d = √((x₂−x₁)² + (y₂−y₁)²). In 3D, the z-term is added: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). It is the Pythagorean theorem applied to coordinates.

When is the distance 0?

Only when the two points have exactly the same coordinates. Otherwise the distance is always a positive value.

How is this different from Manhattan distance?

Euclidean distance is the straight-line shortest path between two points, while Manhattan distance is the grid-walk distance (|Δx| + |Δy|). The tool computes the Euclidean distance.

All processing happens in your browser. Your files are never uploaded.

Verified: Known values (2D (0,0)-(3,4) → 5, 3D → √18 ≈ 4.242641, same point → 0), negative and decimal coordinates, oversized inputs and the English page are covered by browser tests

Did you know?

The distance formula is the Pythagorean theorem on coordinates. Spotting a 3-4-5 right triangle lets you read the distance from (0,0) to (3,4) as 5 without touching the square root.

Optional usage measurement settings

Only with your consent, a random browser ID and tool/learning events are sent to measure return visits. This is pseudonymous measurement. Inputs, answers, keys, files and search terms are excluded. Consent expires after 90 days. Declining does not limit any feature.

Measurement is off.

Retention and privacy