Math & Stats
Slope Calculator
Calculate the slope, angle, y-intercept and equation of a line from two points using the slope formula m = (y2 − y1)/(x2 − x1).
Slope Calculator
Method
How this calculator works
Slope m = (y2 − y1) / (x2 − x1). The line equation is y = mx + b, where b = y1 − m·x1. The angle of inclination is θ = arctan(m).
Examples
Worked examples
Real numbers, end-to-end results.
Points (1, 2) and (4, 11)
slope = 3
Rise 9 over run 3. Equation: y = 3x − 1.
Points (2, 5) and (6, 5)
slope = 0
A horizontal line — no vertical change.
FAQ
Frequently asked questions
What is the slope of a line?
Slope measures the steepness and direction of a line. It is the ratio of vertical change (rise) to horizontal change (run) between two points: m = (y2 − y1) / (x2 − x1).
What does a negative slope mean?
A negative slope means the line falls from left to right — as x increases, y decreases. A positive slope rises from left to right.
What is the slope of a vertical line?
A vertical line has an undefined slope because the run (x2 − x1) is zero, and division by zero is undefined. A horizontal line has a slope of 0.
How do I find the y-intercept from two points?
First find the slope m, then use b = y1 − m·x1. The y-intercept is where the line crosses the y-axis (x = 0), giving the equation y = mx + b.
What is the angle of a slope?
The angle of inclination is the arctangent of the slope: θ = arctan(m), measured in degrees from the horizontal.
Related tools
All calculators →Distance Formula Calculator
Calculate the distance between two points on a coordinate plane.
Open
Pythagorean Theorem Calculator
Calculate the hypotenuse or missing side of a right triangle.
Open
Triangle Calculator
Solve for all sides and angles of a triangle using SAS, SSS, ASA, etc.
Open