2D: Distance between (3, 4) and (0, 0)
d = √(3² + 4²) = √(9 + 16) = √25 = 5. The classic 3-4-5 right triangle in disguise. Most common school problem.
Calculate the distance between two points in 2D or 3D space using the Euclidean formula. Used for geometry problems, GPS plotting, computer graphics and physics.
Point 1
Point 2
Euclidean distance
5
√((x₂−x₁)² + (y₂−y₁)²)
Часть содержимого пока показывается на английском.
The distance formula is the workhorse of coordinate geometry - used everywhere from school-level analytical geometry to machine learning's nearest-neighbour algorithms. It computes the straight-line (Euclidean) distance between two points in 2D or 3D space, derived directly from the Pythagorean theorem applied to coordinate differences. For Class 9-12 students in India, the formula appears in every coordinate geometry chapter (Class 9 introduces it; Class 10 boards regularly test it; Class 11-12 builds 3D extension; JEE Main and Advanced test challenging applications).
Beyond mathematics, distance calculations underpin GPS navigation (with curvature corrections), computer graphics (collision detection, rendering), computer vision (similarity between feature vectors), machine learning (k-nearest neighbours, clustering), physics (vector magnitudes, displacements), and robotics (path planning). This calculator handles both 2D points (x, y) and 3D points (x, y, z) - extending the formula by simply adding more squared terms under the root. The technique generalises to any number of dimensions, which is how high-dimensional data in machine learning (feature vectors with hundreds of values) is compared.
Pick 2D or 3D mode.
Enter the coordinates of both points.
Read the straight-line distance.
Distance is the length of the straight line between two points. In 2D it's √((x₂−x₁)² + (y₂−y₁)²) - the Pythagorean theorem applied to the coordinate differences. 3D adds a z-axis term.
2D: d = √((x₂−x₁)² + (y₂−y₁)²) 3D: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
2D distance: d = √((x₂−x₁)² + (y₂−y₁)²). Derived from the Pythagorean theorem: form a right triangle with horizontal leg |x₂−x₁|, vertical leg |y₂−y₁|, and hypotenuse equal to the distance. The square root and squaring ensure positivity and symmetry - distance from A to B equals distance from B to A.
3D distance: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). Same Pythagorean idea extended - first find diagonal across xy-plane, then apply Pythagoras again with the z-component. This generalises further to n dimensions: simply add (xᵢ₂−xᵢ₁)² for each coordinate i and take the square root.
Other distance metrics for special cases: Manhattan (L₁) distance = |x₂−x₁| + |y₂−y₁| - total grid movement, used when only axis-aligned travel is possible (city blocks, chess rook moves). Chebyshev (L∞) distance = max(|x₂−x₁|, |y₂−y₁|) - useful for king moves on chessboard. Haversine distance - for great-circle distance on a sphere (used in GPS to compute distance between latitude/longitude coordinates accounting for Earth's curvature).
d = √(3² + 4²) = √(9 + 16) = √25 = 5. The classic 3-4-5 right triangle in disguise. Most common school problem.
d = √((4-1)² + (6-2)² + (8-3)²) = √(9 + 16 + 25) = √50 = 7.07. Used in computer graphics for 3D modelling and physics for displacement in space.
Points A(1,2), B(3,4), C(5,6). AB = √8 ≈ 2.83. BC = √8 ≈ 2.83. AC = √32 ≈ 5.66. AB + BC = AC, so points are collinear. Distance formula is the standard test.
No - this is straight-line (Euclidean) distance. For distance between latitude/longitude on Earth, use the Haversine formula which accounts for curvature.
|x₂−x₁| + |y₂−y₁| - total of horizontal and vertical movement, like walking on a grid. Used in computer science and ML when only axis-aligned movement is allowed.
Yes - it's a square root of a sum of squares, always ≥ 0. Direction is captured separately by displacement vectors.
Detecting collisions (objects overlap if distance < sum of radii), nearest-neighbour searches, lighting falloff (intensity ∝ 1/d²).
Generalisation: ‖x‖_p = (Σ|xᵢ|^p)^(1/p). Euclidean is p=2, Manhattan is p=1, Chebyshev (max coordinate) is p→∞.
Just add more squared terms under the root. The formula works for any number of dimensions - used everywhere in ML for high-dim feature vectors.
From simple percentages to scientific notation, statistics, geometry and big-number arithmetic - every common math problem you'd reach for a calculator for, runs in your browser with no installs. The fraction calculator preserves exact rationals, the big-number calculator uses BigInt for hundreds of digits without precision loss, and the scientific calculator's expression evaluator is a hand-written shunting-yard parser (no eval) that supports trig, log, factorial and parentheses.
If you're a student, double-check your work without paying for a graphing calculator. If you're a professional, use these tools as a sanity check on spreadsheet formulas. Every result is shown alongside its formula and inputs, so the math is always auditable.
The Distance Calculator is part of the Math suite on Online Calculator Tools, alongside 6 related calculators. All tools share the same UI patterns, the same privacy-first rendering (nothing is sent to a server), and the same commitment to showing the formula and assumptions behind every result.