Distance Formula Calculator for Two Points
d=√((x₂−x₁)²+(y₂−y₁)²): points (1,2) and (4,6) are exactly 5 units apart since √(3²+4²)=5.
- Midpoint and 3D form included.
Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.
How the Distance Formula Calculator Works
The distance formula is the Pythagorean theorem in coordinate clothing. For points (1,2) and (4,6), the horizontal leg is Δx = 4−1 = 3 and the vertical leg is Δy = 6−2 = 4, so the straight-line distance is √(3²+4²) = √25 = 5. The calculator prints both legs, squares them, sums and roots — every intermediate value. It also returns the midpoint ((1+4)/2, (2+6)/2) = (2.5, 4), handy for geometry proofs and for locating the center between two locations. The same computation generalizes to 3D by adding (z₂−z₁)² under the root, and to map coordinates once you know the scale. Because it reduces to a²+b²=c², any 3-4-5 or 5-12-13 triangle can be recognized instantly from its coordinates.
- 1
Enter both points
Type (x₁,y₁) and (x₂,y₂) for the two endpoints
- 2
Compute the legs
Δx = x₂−x₁ and Δy = y₂−y₁ are displayed
- 3
Apply Pythagoras
Square, sum and take the square root for d
- 4
Read the midpoint
Average the coordinates: ((x₁+x₂)/2, (y₁+y₂)/2)
Use Cases
Geometry Homework
Side lengths of polygons from vertex coordinates, e.g. verifying a 3-4-5 triangle
Route Estimation
Straight-line distance between two map grid references before road routing
Game Development
Collision and targeting checks between sprite coordinates
Tips
- 1
Squaring kills the sign of Δx and Δy, so point order never matters
- 2
A 3-4-5 coordinate pair like (1,2)→(4,6) signals a right angle
- 3
Distance is symmetric: d(P,Q) = d(Q,P)
Common Mistakes
Subtracting mixed directions, e.g. x₂−x₁ for one leg and y₁−y₂ for the other
Forgetting to square before adding, computing √3+4 instead of √(9+16)
Mixing up distance with slope — slope is Δy/Δx, distance is the hypotenuse
Averning coordinates without dividing by 2 when finding the midpoint
FAQs
What is the distance between (1,2) and (4,6)?
How do I find the midpoint?
Does point order matter?
How does this relate to Pythagoras?
How do I extend it to 3D?
Related tools
Pick another tool to continue your calculation.
Binomial Theorem Calculator – Expand (a+b)ⁿ
Calculate binomial expansion terms for (a+b)^n.
Binomial Expansion Calculator – (a+b)ⁿ Terms
Calculate (a+b)ⁿ expansion using binomial theorem.
Quadratic Equation Calculator – Roots & Discriminant
Solve ax² + bx + c = 0 with x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 5x + 6 = 0 the roots are x = 2 and x = 3, with discriminant Δ = 1.
Linear Equation Solver – ax + b = 0 Steps
Solve ax + b = 0 with x = −b ÷ a: 3x + 12 = 0 gives x = −4, verified by substitution. Handles fractions, decimals and the a = 0 edge cases.
Simultaneous Equations Solver – 2×2 Systems
Solve a system of two linear equations.
Cubic Equation Solver – Roots of ax³+bx²+cx+d
Calculate roots of a cubic equation.