Distance Between Two Points on a Graph

Calculate the straight-line distance between two points on a coordinate plane. Enter x1, y1, x2, y2 and get the distance with the formula shown.

ADVERTISEMENT

Desktop

ADVERTISEMENT

Desktop

ADVERTISEMENT

Desktop

Loading...

Please wait... loading-icon

On this page:

How far apart are those two dots

On a site plan, the warehouse corner sits at grid point (1, 2) and the loading dock at (4, 6). The foreman wants the straight-line distance for a conveyor quote. On a map app, the math is the same. Any time two points live on a coordinate grid and you need the direct distance between them, not the walking route, the distance formula is the tool.

This calculator takes the two points and returns the straight-line distance, showing each substitution step so students can follow the working and professionals can trust it.

The formula

Formula: d = sqrt((x2 - x1)^2 + (y2 - y1)^2).

This is the Pythagorean theorem wearing a coordinate disguise. The horizontal gap (x2 - x1) and the vertical gap (y2 - y1) form the two legs of a right triangle, and the distance you want is the hypotenuse. Squaring the gaps makes the sign irrelevant, which is why the order of subtraction does not matter, and the square root at the end undoes the squaring to return a plain length.

How to use it

  1. Enter the first point as x1 and y1.
  2. Enter the second point as x2 and y2.
  3. Read the distance, with the intermediate squares shown.

Worked example

Points (1, 2) and (4, 6). Horizontal gap: 4 - 1 = 3. Vertical gap: 6 - 2 = 4. Square both: 3^2 = 9 and 4^2 = 16. Add: 9 + 16 = 25. Take the square root: sqrt(25) = 5. The points are 5 units apart, the classic 3-4-5 triangle hiding inside the grid.

Practical uses

Game developers use this every frame to check how far characters are from targets. CAD designers measure clearances between parts. Delivery planners estimate as-the-crow-flies distances before routing. Surveyors turn GPS coordinates into ground distances. Architects check diagonal clearances on floor plans, and hikers estimate straight-line shortcuts between trail waypoints before committing to them. To find the point exactly halfway along that segment, use the midpoint calculator; for the steepness between the same two points, the slope calculator gives the gradient, and the Pythagorean theorem calculator handles raw triangle sides.

Common mistakes

  • Forgetting the square root: 25 is the squared distance, not the distance. The final root is not optional.
  • Mismatched units: if x is in meters and y is in centimeters, convert first or the answer is meaningless.
  • Using it for road distance: this is the straight line. Streets, terrain, and obstacles always make the real trip longer.

An honest note

The formula assumes a flat plane. Over very long real-world distances the Earth's curvature starts to matter, which is why surveyors and pilots switch to great-circle math for anything beyond local work.

Frequently Asked Questions FAQ

What does the Distance Formula Calculator calculate?
The Distance Formula Calculator helps you work through the calculation using the values you enter and presents the result in a simple format.
What formula does it use?
The calculator uses the standard method relevant to this calculation. The formula shown on this page is: d = √[(xβ‚‚βˆ’x₁)Β² + (yβ‚‚βˆ’y₁)Β²]
What values should I enter?
Enter the requested numbers or expressions exactly as shown by the calculator. Check signs, units, and decimal values before calculating.
Can I use this calculator for learning?
Yes. It can be useful for checking examples, homework, practice, and understanding how a formula is applied to real values.
Why might my answer be different?
A different result can come from rounding, input values, units, or using a different formula or calculation method. Compare the steps as well as the final answer.
How can I check the result?
Review the inputs, apply the displayed formula manually to a simple example, and compare the result with the calculator output. This is especially useful when studying.

Have Feedback or a Suggestion?

Kindy let us know your reveiws about this page

;