DIY Cost Tools
Distance Calculator
SCIENCE CALCULATOR
Find the straight-line distance, coordinate changes, midpoint, and slope between two points.
Straight-line distance10
Change in x and yΔx = 6, Δy = 8
Midpoint(4, 6)
Slope1.3333
How it works
Enter two points in the same coordinate system. The distance formula is the Pythagorean theorem applied to horizontal and vertical change.
Formula
Distance = √[(x₂ − x₁)² + (y₂ − y₁)²]. Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).
Worked example
From (1, 2) to (7, 10), the coordinate changes are 6 and 8, the straight-line distance is 10, the midpoint is (4, 6), and the slope is 4/3.
Important limits
- Coordinates must use the same unit and reference system.
- This is planar Euclidean distance, not road distance or great-circle distance on Earth.
- Slope is undefined for a vertical line.
Frequently asked questions
Can I use negative coordinates?
Yes. Any finite coordinate values are accepted.
Does the answer have a unit?
It uses the same distance unit represented by the coordinate axes.
Sources and review notes
The calculator applies the Cartesian distance and midpoint formulas derived from the Pythagorean theorem. Last reviewed September 29, 2026.