Distance between two points calculator
Enter the coordinates of two points on a flat grid, x₁, y₁ and x₂, y₂, and this calculator returns the straight-line distance between them.
Results
Enter your values to see the result.
About this tool
It also shows the horizontal and vertical change. It is useful for measuring between locations on a map grid, a floor plan or a game screen where coordinates are known.
- How it is calculated
- d = √((x₂ − x₁)² + (y₂ − y₁)²)
- Worked example
- With x₁: 1; y₁: 2; x₂: 4; y₂: 6, the result is: Distance: 5; Horizontal change: 3; Vertical change: 4.
- Good to know
- This is the straight-line distance on a flat plane, based on the Pythagorean theorem. It is not a route distance and does not account for the curve of the earth. Units match your coordinates.
Frequently asked questions
How is the distance calculated?
The horizontal change and vertical change form the two legs of a right triangle, and the distance is the hypotenuse. The calculator squares both changes, adds them and takes the square root.
Can I use negative coordinates?
Yes. Points can lie anywhere on the grid. The Horizontal change and Vertical change may come out negative, depending on direction, but the Distance itself is never negative.
Can I use latitude and longitude here?
Not accurately. This treats coordinates as points on a flat plane, while latitude and longitude describe a curved surface. For long distances on a map the result would be misleading.