Slope Calculator
Two points in โ slope, line equation, intercepts, distance, midpoint out.
About this calculator
Enter two points and read the line's whole biography: slope, y = mx + b equation, both intercepts, the angle of incline, the distance between the points and their midpoint. Vertical lines are reported honestly as x = c with undefined slope rather than an error.
Reading slope like a native
Slope is rise over run โ how much y changes per unit of x โ and one number tells you the line's temperament: positive climbs left-to-right, negative falls, zero is flat, and the steeper the line the bigger the magnitude (slope 1 is exactly 45ยฐ). Real-world slopes hide everywhere: a road grade of 8% is slope 0.08; a wheelchair ramp's legal 1:12 is slope 0.083; a roof pitch of 6/12 is slope 0.5. The distance formula the calculator uses is just the Pythagorean theorem standing on the rise and run, and the midpoint is the plain average of the coordinates โ coordinate geometry runs on a very small number of moves, all of which this page performs and shows.
Frequently asked questions
How do you find slope from two points?
Divide the change in y by the change in x: m = (yโโyโ)/(xโโxโ). Points (1,2) and (5,10): slope = 8/4 = 2 โ the line climbs 2 for every 1 across.
What does an undefined slope mean?
A vertical line: x doesn't change, so rise-over-run divides by zero. Its equation is x = constant, and the calculator reports it as exactly that.
How do I get the equation of the line?
From slope m and either point: b = y โ mx gives the intercept, so y = mx + b. The calculator prints it directly, plus both axis crossings.
What's the midpoint formula?
Average the coordinates: ((xโ+xโ)/2, (yโ+yโ)/2) โ the point exactly halfway along the segment.