Distance Calculator
Distance between two points in 2D or 3D space
Point 1
Point 2
What is the Distance Calculator?
The distance calculator finds the straight-line distance between two points on a coordinate plane. It's a geometry staple, used in math coursework, physics problems, map approximations, and programming when you need to calculate how far apart two objects are. CalciHub's version takes two coordinate pairs and returns the exact distance, along with the midpoint between them, so you get both pieces of information in one go.
How Does It Work?
The formula comes from the Pythagorean theorem. If you draw a right triangle between two points, the horizontal and vertical separations form the two legs, and the distance between the points is the hypotenuse. You square each separation, add them, and take the square root.
d = √((x₂ − x₁)² + (y₂ − y₁)²)
• d = distance between the two points
• x₁, y₁ = coordinates of the first point
• x₂, y₂ = coordinates of the second point
• √ = square root
How to Use CalciHub's Distance Calculator
1. Enter the x and y coordinates of your first point.
2. Enter the x and y coordinates of your second point.
3. Click Calculate, the result shows the distance.
4. The midpoint coordinates also appear below the main result.
Tip: Negative coordinates are fine, make sure to include the minus sign when entering them.
A Quick Example
Point A is at (1, 2) and Point B is at (4, 6). The horizontal difference is 4 − 1 = 3. The vertical difference is 6 − 2 = 4. Squaring and adding: 3² + 4² = 9 + 16 = 25. The square root of 25 is 5. So the distance is exactly 5 units. You might recognise this as a 3-4-5 right triangle. The midpoint lands at ((1+4)/2, (2+6)/2) = (2.5, 4).
When the numbers work out to a Pythagorean triple like 3-4-5 or 5-12-13, the distance is always a whole number, a useful check that your inputs are correct.
Frequently Asked Questions
The standard two-point distance formula works in 2D. For 3D points, the formula extends to d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). CalciHub's calculator focuses on the 2D case used in most geometry and algebra coursework.
Distance is the scalar length between two points, regardless of path. Displacement is a vector — it has both magnitude and direction. This calculator gives you distance, not displacement.
Only for rough approximations over short distances. Real map distances involve Earth's curvature, which the flat-plane formula ignores. For accurate geographic distances, use the haversine formula or a mapping tool.
The midpoint between two points is the average of the x-coordinates and the average of the y-coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2). CalciHub shows this alongside the distance result.
Yes, free to use with no account required. Enter your coordinates, and the result is instant.
Related Mathematics calculators
See all Mathematics →- Concrete CalculatorCalculate concrete volume for slabs, columns, and footings.
- Binary CalculatorArithmetic and bitwise operations in binary, octal, decimal, or hex.
- Matrix CalculatorAdd, subtract, multiply matrices; find determinant and transpose.
- GCD & LCM CalculatorFind the Greatest Common Divisor and Least Common Multiple.
- Logarithm CalculatorCalculate log in any base — log₁₀, ln, log₂, or custom.
- Rounding CalculatorRound numbers to any decimal place or significant figures.
More from Mathematics
View all posts →Longer reads from our mathematics collection.