Slope Intercept Form Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Give two points on a line, or one point and the slope, to get m and b in y = mx + b.
Result
Slope m
y-intercept b
- x-intercept (where y = 0)
- y at the chosen x
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- What you know: choose Two points or One point and the slope.
- x₁: enter a number.
- y₁: enter a number.
- x₂ (two points only): enter a number.
- y₂ (two points only): enter a number.
- Slope m (point and slope only): enter a number.
- Find y at this x: enter a number.
- Read the result: Slope m; the panel also shows y-intercept b, x-intercept (where y = 0) and y at the chosen x.
How this calculator works
Slope-intercept form is y = mx + b, where m is the slope and b the y-value where the line crosses the y-axis.
From two points: m = (y₂ − y₁) ÷ (x₂ − x₁). From one point (x₁, y₁) and the slope: b = y₁ − m·x₁, which comes from the point-slope form y − y₁ = m(x − x₁).
The x-intercept is −b ÷ m. A vertical line (x₁ = x₂) has no slope-intercept form; it is written x = x₁.
The formula
| Symbol | Meaning |
|---|---|
| What you know (1: Two points; 2: One point and the slope) | |
| x₁ | |
| y₁ | |
| x₂ (two points only) | |
| y₂ (two points only) | |
| Slope m (point and slope only) | |
| Slope m |
Worked example
| What you know | Two points |
|---|---|
| x₁ | 1 |
| y₁ | 3 |
| x₂ (two points only) | 3 |
| y₂ (two points only) | 7 |
| Find y at this x | 5 |
| y-intercept b | 1 |
|---|---|
| x-intercept (where y = 0) | -0.5 |
| y at the chosen x | 11 |
Slope m 2
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
How do you find b in y = mx + b?
Put a point of the line into the equation and solve: with m = 2 through (1, 3), 3 = 2 × 1 + b, so b = 1.
What is the point-slope form?
y − y₁ = m(x − x₁). Expanding it gives y = mx + (y₁ − m·x₁), the slope-intercept form.
Why does a horizontal line have no x-intercept?
With m = 0 the line y = b never meets the x-axis unless b = 0.