Slope Calculator
Find the slope of a line from two points, with the angle of incline, the y-intercept, and the line’s equation. Calculates in your browser.
Slope (m)
-
Show the math
Slope is the change in y over the change in x, rise over run:
m = (y₂ − y₁) ÷ (x₂ − x₁)
A vertical line (no change in x) has an undefined slope and no y = mx + b equation. All math runs locally in your browser.
What this does
The slope calculator finds the slope (gradient) of the straight line through two points, along with the angle of incline, the y-intercept, and the equation of the line in y = mx + b form.
How to use it
- Enter the coordinates of the first point (x₁, y₁).
- Enter the coordinates of the second point (x₂, y₂).
- Read the slope, angle, intercept, and line equation.
How it works
Slope is the change in y divided by the change in x, rise over run. A vertical line (no change in x) has an undefined slope.
m = (y₂ − y₁) ÷ (x₂ − x₁)
Understanding your result
A positive slope rises left to right, a negative slope falls, and a slope of zero is a flat horizontal line. The bigger the absolute value, the steeper the line. When the two points share an x-value the line is vertical, so the slope is undefined and there is no y = mx + b equation.
Example
From (1, 2) to (4, 6) the slope is 4⁄3 ≈ 1.33, an incline of about 53°.
Sources & methodology
Last updated .
Frequently asked questions
What is slope?
Slope is the steepness of a line, the change in y divided by the change in x (rise over run). It is written m in the line equation y = mx + b.
Why is a vertical line’s slope undefined?
A vertical line has no change in x, so the slope formula would divide by zero. Such a line has no slope and no y = mx + b equation.
What does a negative slope mean?
The line falls as you move from left to right. A positive slope rises, and a slope of zero is perfectly horizontal.
Is my data stored?
No. Everything is calculated locally in your browser.
Related tools
Scientific Calculator
A calculator that understands full expressions, operators, powers, parentheses, factorials, the constants π and e, and trig, log, and root functions in radians or degrees. Calculates in your browser.
Average Calculator
Paste a list of numbers to get the mean, median, mode, range, count, sum, and standard deviation at once. Calculates in your browser.
Area Calculator
Find the area of a rectangle, triangle, circle, parallelogram, trapezoid, or ellipse from its dimensions. Calculates in your browser.
Volume Calculator
Find the volume of a box, cylinder, sphere, cone, pyramid, or capsule from its dimensions. Calculates in your browser.