Math Solver
Free online math tools
Search
d
Coordinate Math

Point Distance Calculator

Find the straight-line distance between two points in two-dimensional (2D) or three-dimensional (3D) space.

Preparing Distance Calculator
Please wait ...
Input
Enter the X and Y coordinates (and optional Z coordinates for 3D) for your two points, then calculate to view the distance.
Input summary
Your calculator summary shows here.

Step by Step Calculation

d
Step by step calculation shows here
Calculate first and the full working will appear below automatically.

A Guide to Calculating Distance Between Coordinates

In geometry, the distance between two points is the exact length of the straight line segment that directly connects them on a plane. Whether you are measuring across a flat grid (two-dimensional space) or calculating distances in physical space (three-dimensional space), the math utilizes coordinate systems. Solving distance is crucial for sea and air navigation, computer graphics programming, physics formulas, and land boundary mapping.

The Distance Formula

The formula for 2D distance is derived from the Pythagorean theorem. By drawing vertical and horizontal lines from your points, you form a right triangle. The distance is the hypotenuse. The formula is: distance = square_root((x2 - x1)² + (y2 - y1)²). For 3D space, you simply add the squared difference of the Z coordinates under the radical sign.

To see how this formula relates to triangle math, you can use our Pythagorean side lengths solver or check our resolving triangle dimensions tool. To find the slope of the line connecting your points, check out our calculating linear slopes tool.

Practical Uses of Coordinate Lengths

  • Map Coordinates: Hikers, pilots, and surveyors calculate the straight-line distance between GPS coordinates (latitude and longitude) to navigate across land and sky.
  • Computer Game Physics: Coding scripts track the distance between characters to trigger event actions or detect solid collisions.
  • Mechanical Engineering: Designers measure clearance distances between moving parts in 3D modeling systems. You can check circular clearances with our circular measurements tool.
  • Navigation Navigation: Pilots and ship captains calculate direct paths across coordinate charts, which you can check with our simple daily math checks tool.

Comparing 2D and 3D Grids

A 2D coordinate system uses X (horizontal) and Y (vertical) positions on a flat surface. A 3D coordinate system adds a Z-axis, which represents depth or height in physical space.

Adding the third dimension allows you to solve spatial distances in physical rooms, sky coordinates in astronomy, or complex mechanical engineering designs. The calculator handles both configurations automatically, detailing the calculations for each case.

It is also important to note that our tool calculates the straight-line (Euclidean) distance, which is the shortest path between two points. In contrast, grid-based travel in city planning or computer science often uses "Manhattan distance," which measures the distance along axis-parallel paths (like walking along street blocks), representing the sum of absolute coordinate differences rather than a straight diagonal line.

Example of 2D Grid Distance

Suppose you want to find the distance between Point A at coordinates (1, 2) and Point B at coordinates (4, 6).

First, calculate the horizontal difference (run): 4 - 1 = 3. Next, calculate the vertical difference (rise): 6 - 2 = 4. Squaring these differences: 3² = 9 and 4² = 16. Summing the squares: 9 + 16 = 25. Taking the square root of 25 reveals a distance of exactly 5 units. This shows how coordinate differences form the base sides of right triangles.