Two points on a graph are enough to answer four common questions: how far apart they are, where the point halfway between them is, how steep the line through them is, and what that line’s equation is. Enter the points and this calculator answers all four, with exact fractions and radicals where your class expects them.
How to Use It
- Enter the first point as x₁ and y₁.
- Enter the second point as x₂ and y₂.
- Press Calculate to see the distance, the midpoint, the slope and the equation of the line.
How It Works
The run and rise are the changes in x and y. The distance comes from the Pythagorean theorem:
The midpoint averages each coordinate:
The slope is rise over run, and the line’s equation in slope-intercept form uses it:
When the run is 0, the line is vertical: its slope is undefined and its equation is .
Worked Example
For (1, 2) and (5, 8), the run is 4 and the rise is 6.
The midpoint is and the slope is . Then , so the line is .
Tips and Common Mistakes
- Subtract in the same order. Use over , never over .
- Square before adding. In the distance formula, square each difference first; a negative difference squared is positive.
- Rise goes on top. Slope is change in y over change in x, not the other way round.
- Vertical and horizontal lines are special. Horizontal lines have slope 0 (); vertical lines have no slope ().
- Keep exact answers when asked. and are exact; 7.2111 and 1.5 are the same values as decimals.