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
- Enter the first point as x1 and y1.
- Enter the second point as x2 and y2.
- 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.