Overview
Slope-intercept form, y = mx + b, is the most common way to write a straight line. This evaluates the line at any x value.
Enter the slope m, the y-intercept b and an x value.
Worked examples
| Inputs | Result |
|---|---|
| Slope (m)2Y-Intercept (b)3X Value5 | y = 2x + 3At x=5: y = 13 |
Show 2 more examples
| Slope (m)-0.5Y-Intercept (b)10X Value4 | y = -0.5x + 10At x=4: y = 8 |
| Slope (m)3Y-Intercept (b)-2X Value-1 | y = 3x + -2At x=-1: y = -5 |
How it works
y is the slope × x plus the intercept. The slope is how much y rises for each step in x, and the intercept is where the line crosses the y-axis.
The formula
y = mx + b
Practical tips
- y = 2x + 3 at x = 5 gives 13.
- A negative slope falls from left to right.
- Where the line crosses the x-axis is x = −b ÷ m.
Frequently asked questions
How do I find m from two points?
m = (y₂ − y₁) ÷ (x₂ − x₁).
What does b mean in real terms?
The starting value when x is 0, such as a fixed fee.
How do I graph it?
Plot (0, b), then move 1 across and m up, and draw the line.