Find the slope of a line from two points. This free slope calculator gives the slope, y-intercept, full equation (y = mx + b), angle and the distance between the points.
Two points
Point 1
x₁
y₁
Point 2
x₂
y₂
Enter the coordinates of two points. The slope is the rise over the run: (y₂ − y₁) ÷ (x₂ − x₁). A vertical line (same x) has an undefined slope.
Slope (m)
—
Enter both points
Line equation
—
y-intercept (b)
—
Angle
—
Δx (run)
—
Δy (rise)
—
Distance between points
—
Slope measures steepness: positive rises left-to-right, negative falls, zero is flat. The equation is in slope-intercept form, y = mx + b.
Use this free slope calculator to find the slope of a line from two points. Enter the coordinates and it returns the slope, the y-intercept, the line equation, the angle and the distance between the points.
What this slope calculator does
A slope calculator finds how steep a line is between two points. It gives the slope (m), the y-intercept (b), the full equation in y = mx + b form, the angle of inclination, and the distance between the points.
How slope is calculated
m = (y₂ − y₁) ÷ (x₂ − x₁) (rise ÷ run)
b = y₁ − m·x₁ (y-intercept)
For the points (1, 2) and (3, 6), the slope is (6 − 2) ÷ (3 − 1) = 2, and the line is y = 2x.
What different slopes mean
Slope
Line
Positive
Rises from left to right
Negative
Falls from left to right
Zero
Horizontal (flat)
Undefined
Vertical (x₁ = x₂)
Why a vertical line has no slope
When both points share the same x-value, the run (x₂ − x₁) is zero, and you can’t divide by zero — so the slope is undefined. The line is written as x = a constant instead of y = mx + b.
How to use the slope calculator
Enter the first point (x₁, y₁).
Enter the second point (x₂, y₂).
Read the slope, equation, intercept and angle.
Slope FAQ
How do I calculate slope?
Divide the change in y by the change in x: m = (y₂ − y₁) ÷ (x₂ − x₁), known as rise over run. For (1, 2) and (3, 6), the slope is 2.
How do I find the equation of the line?
Once you have the slope, find b with b = y₁ − m·x₁, then write y = mx + b. The calculator gives the full equation for you.
What does a negative slope mean?
The line falls from left to right — as x increases, y decreases. A positive slope rises, and a zero slope is flat.
Why is a vertical line's slope undefined?
Both points have the same x, so the run is zero and you'd be dividing by zero. The line is written as x = a constant instead.
How do I find the angle of a slope?
Take the inverse tangent (arctangent) of the slope. A slope of 1 is a 45° incline; the calculator shows the angle automatically.
Is the slope calculator free?
Yes, this slope calculator is completely free, needs no sign-up, and gives instant results in your browser.