CALCORA CALCULATOR
Distance Between Two Points Calculator
Find the straight-line distance between two points on a 2D coordinate plane.
How to calculate distance between two points
Enter x₁, y₁, x₂ and y₂. The calculator uses the Euclidean distance formula to find the straight-line separation between the points.
Distance formula
d = √((x₂ − x₁)² + (y₂ − y₁)²). The coordinate units determine the unit of the final distance.
Math Calculators · All Calculators
Worked example with horizontal and vertical differences
For A(1, 2) and B(4, 6), the horizontal difference is 4 − 1 = 3 and the vertical difference is 6 − 2 = 4. The distance is √(3² + 4²) = √25 = 5 units. This is the Pythagorean theorem applied to the right triangle formed by the coordinate differences. If both points are identical, both differences are zero and the distance is zero.
Coordinate units and interpretation
Both points must use the same coordinate system and scale. If coordinates are in centimetres, the distance is in centimetres; mixing metres and centimetres without conversion makes the result invalid. The formula gives straight-line distance on a flat Cartesian plane, not road distance, walking time or distance between latitude/longitude coordinates on the curved Earth. For those tasks, use a suitable mapping or geodesic method.
Quick checks
Changing the order of the two points does not change distance because each coordinate difference is squared. A horizontal or vertical segment is a useful check: if y-values match, distance is the absolute x-difference; if x-values match, distance is the absolute y-difference.
Midpoint and distance answer different questions
The midpoint gives the central coordinate of a segment, while distance gives its length. Use the Midpoint Calculator when you need the centre point, or this tool when you need the straight-line separation. Both calculations use the same two endpoints but return different kinds of results.
Worked coordinate example
For point A (1, 2) and point B (4, 6), the horizontal difference is 4 − 1 = 3 and the vertical difference is 6 − 2 = 4. The distance is √(3² + 4²) = √25 = 5 coordinate units. The result is a straight-line distance, not the distance travelled along a road or path.
Coordinates and units
Both points must use the same coordinate system and scale. If coordinates represent metres, the result is metres; if they represent centimetres, the result is centimetres. Mixing units or combining coordinates from different map projections can make the result misleading. This calculator treats the coordinates as ordinary Cartesian x and y values.
Distance and direction are different
Distance is always non-negative and does not tell you which direction to travel. To describe movement from the first point to the second, you may also need the displacement vector (x₂ − x₁, y₂ − y₁). For geographic latitude and longitude on Earth, a geodesic or great-circle method is generally more appropriate than the flat-plane formula.
Common checks
If the points are identical, the distance is zero. If they share the same x-coordinate, the distance is the absolute difference between their y-values; if they share the same y-coordinate, it is the absolute difference between their x-values. These checks can help identify input or unit mistakes.
Use the one-dimensional Distance Calculator when you only have two positions on a number line.
Coordinate checks before trusting the result
Use this result for two-dimensional Cartesian coordinates, such as points on a graph or a measured floor plan. Both points must use the same origin, scale and units. If one coordinate is measured in centimetres and another in metres, convert them first; otherwise the distance has no consistent unit.
This calculator does not compute route distance, travel time, or geographic distance from latitude and longitude. For three-dimensional points, include the vertical difference as well: d = √[(Δx)² + (Δy)² + (Δz)²].