Slope Calculator: Slope From Two Points
This slope calculator finds the slope between two points using rise over run, then the angle of inclination, percent grade, distance, and the line equation.
How to use
- Enter the first point (x1, y1) and the second point (x2, y2).
- Read the rise (y2 − y1) and the run (x2 − x1). Slope m is rise divided by run.
- Check the angle in degrees, the percent grade (slope × 100), and the distance between the points.
- Read the intercept and the equation y = mx + b. A vertical line has an undefined slope and the equation x = a constant.
Formula
Slope m = (y2 − y1) / (x2 − x1), rise over run. The angle of inclination is arctan(m), in degrees. Percent grade is m × 100. Distance is √(rise² + run²). The y-intercept is b = y1 − m × x1, so the line is y = mx + b. If the run is 0 and the rise is not, the line is vertical, the slope is undefined, and the equation is x = x1.
Example. Points (1, 2) and (4, 8) have rise 8 − 2 = 6 and run 4 − 1 = 3, so m = 6 / 3 = 2. The angle is about 63.43°, the grade is 200%, the distance is √45 ≈ 6.7082, and b = 0, so y = 2x.
Example. A rise of 1 over a run of 12 is m = 1/12 ≈ 0.0833, about 4.76°, and a percent grade of about 8.33%.
Frequently asked questions
What is the slope formula?
m = (y2 - y1) / (x2 - x1), the change in y divided by the change in x (rise over run).
What does a negative slope mean?
The line goes down from left to right. A zero slope is horizontal.
What is the slope of a vertical line?
Undefined, because x2 - x1 = 0 and you cannot divide by zero.
How do I convert slope to an angle?
Angle = arctan(m). A slope of 1 is 45 degrees.
How do I convert slope to percent grade?
Multiply the slope by 100. A rise of 1 over a run of 12 is about 8.33%.
Related tools
- SchoolPythagorean Theorem CalculatorFind a missing side of a right triangle, plus area, perimeter, and angles.
- SchoolRatio CalculatorSimplify ratios, scale A:B parts, and find missing values.
- SchoolPercentage CalculatorFind X% of Y, what percent one number is of another, percent change, and an optional percent table.
- SchoolGCF CalculatorFind the greatest common factor of two or more numbers, with prime factors and Euclid's steps.
- SchoolFactoring CalculatorFactor whole numbers into primes and factor quadratic trinomials with steps.
- SchoolHigh School GPA CalculatorWeighted and unweighted 4.0 GPA from your courses, credits, and level.