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.