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.
A = (x₁, y₁, z₁)
Point A
B = (x₂, y₂, z₂)
Point B
Enter two points to see the distance between them.
How to use
- 1
Pick the dimension
Choose 2D (two components) or 3D (three).
- 2
Enter the coordinates
Fill in the coordinates of points A and B. Negatives and decimals are supported.
- 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.
Related Tools
Vector Calculator (Dot Product)
Compute the dot product, magnitudes and the angle between 2D or 3D vectors with fully substituted working. Includes the cosθ = (a·b) ÷ (|a||b|) step and perpendicular detection via a·b = 0 — handy for math and physics.
Trigonometry Calculator
Enter an angle to get sin, cos and tan at once. Special angles like 30°, 45° and 60° are shown as exact values (1/2, √3/2), with degree and radian support, pi expressions such as pi/6, plus the quadrant signs and the reference-angle working.
Quadratic Equation
Solve ax² + bx + c = 0 with real or complex roots, the discriminant and substitution into the quadratic formula.
Statistics Calculator
Paste numbers to get count, sum, mean, median, min, max and standard deviation at once. Handles newline, comma and space separators.
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.