How to calculate slope
m = (y₂ − y₁) ÷ (x₂ − x₁) · b = y₁ − m·x₁
Worked example. Slope (m): 2.
Example inputs — x₁: 1; y₁: 2; x₂: 4; y₂: 8. Starting values are illustrative.
Equation: y = 2x + 0
From George Guju, founder of Calculyn · Educational calculator guidance, not professional advice.
How it works
Slope is how much y changes for each step in x — rise over run. With the slope you can write the line as y = mx + b.
Assumptions & limitations
- Results are rounded for display.
Formula and assumptions reviewed October 2026 by the Calculyn team. How we build our calculators
Frequently asked questions
What does a negative slope mean?
The line goes down as you move right.
