Coordinates · interactive lab
Distance, midpoint & slope
Move two points and connect the distance formula, midpoint, slope, and line equation.
Distance, midpoint & slopeLIVE EXPLORATION
Drag a labeled point · enter coordinates for precision
Your measurements
Drag either point on the grid, or enter its coordinates. Coincident points have no unique line.
Why it works
d = √[(x₂ − x₁)² + (y₂ − y₁)²]
A little question. A clearer picture.
Distance, midpoint & slope: common questions
Wondering about the why? Start here.
How do I find the distance and midpoint between two points?
For points (x₁, y₁) and (x₂, y₂), distance is √[(x₂ − x₁)² + (y₂ − y₁)²]. The midpoint is ((x₁ + x₂)/2, (y₁ + y₂)/2). Points (0, 0) and (6, 8) are 10 units apart with midpoint (3, 4).
See a worked coordinate exampleWhy is a vertical line’s slope undefined?
Slope is the change in y divided by the change in x. A vertical line has no change in x, so the calculation divides by zero. A horizontal line has slope zero; two identical points do not determine a unique line.
Understand slope and line equations