Enter any two points and get the slope as both a fraction and a decimal, the full line equation y = mx + b, the distance between the points, and the midpoint β with the rise-over-run substitution shown step by step, exactly the way you would write it on a homework page.
The slope measures how steep a line is: m = (yβ β yβ) / (xβ β xβ), or rise over run. Take the points (1, 2) and (5, 10). The rise is 10 β 2 = 8 and the run is 5 β 1 = 4, so m = 8/4 = 2. To finish the equation, plug either point into b = yβ β mΒ·xβ = 2 β 2 Β· 1 = 0, giving y = 2x.
The same two points also give you the distance β the rise and run are the two legs of a right triangle, so the distance is the hypotenuse from the Pythagorean theorem: β(8Β² + 4Β²) = β80 β 8.944. The midpoint simply averages the coordinates: (3, 6).
One special case: if both points share the same x-coordinate, the run is zero and the slope is undefined β the line is vertical and its equation is x = c. The calculator detects this automatically instead of dividing by zero.
Frequently asked questions
The slope of the line through two points (x1, y1) and (x2, y2) is m = (y2 β y1) / (x2 β x1) β often called "rise over run". For example, through (1, 2) and (5, 10) the slope is (10 β 2) / (5 β 1) = 8/4 = 2, meaning the line climbs 2 units for every 1 unit it moves right.
When the two points have the same x-coordinate, the run (x2 β x1) is zero and the slope formula would divide by zero. The line is perfectly vertical and its slope is undefined β the equation is simply x = c, where c is the shared x-value. Note this is different from a slope of 0, which is a horizontal line (y = c).
If the equation is in slope-intercept form y = mx + b, the slope is the coefficient m in front of x (in y = 3x β 4 the slope is 3). If it is in standard form Ax + By = C, solve for y first: the slope is βA/B. For example 2x + 4y = 8 rearranges to y = β0.5x + 2, so the slope is β0.5.
A positive slope means the line rises from left to right β as x increases, y increases. A negative slope means the line falls from left to right β as x increases, y decreases. The bigger the absolute value, the steeper the line: a slope of 5 is much steeper than a slope of 1/2, and β5 falls just as steeply as 5 rises.
The distance uses the Pythagorean theorem: d = β((x2 β x1)Β² + (y2 β y1)Β²) β the rise and run form the legs of a right triangle. The midpoint averages the coordinates: ((x1 + x2)/2, (y1 + y2)/2). Both are computed automatically from the same two points you enter for the slope.