By Tim King · Updated
Slope Intercept Form Calculator
Two-Point or Equation Input, Vertical and Horizontal Lines, Worked Steps Shown
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Slope-Intercept Form Calculator works
This slope intercept form calculator takes two points, such as (2, 3) and (6, 11), or a line equation such as 3x + 4y = 12, and gives the slope, both intercepts and the line in slope-intercept, point-slope and standard form. Vertical and horizontal lines are handled too.
Slope-intercept form writes a straight line as y = mx + b. The slope m is how far the line rises for each step to the right, and b is where it crosses the y-axis. Once a line is in this form you can read its steepness and starting point at a glance, or plot it in two moves.
How the slope intercept form calculator works
From two points the formula for slope is m = (y₂ − y₁) ÷ (x₂ − x₁). Substituting either point into y = mx + b gives b = y₁ − m × x₁. From an equation the calculator collects every term on one side and solves for y.
First example. For (2, 3) and (6, 11), m = (11 − 3) ÷ (6 − 2) = 2, and b = 3 − 2 × 2 = −1, so y = 2x − 1.
Second example. For 3x + 4y = 12, subtract 3x and divide by 4: y = −(3/4)x + 3. The slope is −3/4 and the line crosses the axes at (0, 3) and (4, 0).
How many points do you need to fix a line? Two distinct points, or one point and the slope.
Slope and slope-intercept form for 22 pairs of points
| Points | Slope | Equation |
|---|---|---|
| (0, 0) and (1, 1) | 1 | y = x |
| (2, 3) and (6, 11) | 2 | y = 2x − 1 |
| (1, 2) and (3, 8) | 3 | y = 3x − 1 |
| (0, 5) and (2, 1) | -2 | y = −2x + 5 |
| (-1, -1) and (3, 7) | 2 | y = 2x + 1 |
| (2, 4) and (4, 5) | 1/2 | y = (1/2)x + 3 |
| (0, 0) and (4, 2) | 1/2 | y = (1/2)x |
| (1, 1) and (5, 1) | 0 | y = 1 |
| (3, 0) and (0, 6) | -2 | y = −2x + 6 |
| (-2, 1) and (2, 9) | 2 | y = 2x + 5 |
| (1, 4) and (2, 7) | 3 | y = 3x + 1 |
| (0, -3) and (6, 1) | 2/3 | y = (2/3)x − 3 |
| (5, 2) and (1, -6) | 2 | y = 2x − 8 |
| (-3, 4) and (3, -2) | -1 | y = −x + 1 |
| (2, 2) and (8, 5) | 1/2 | y = (1/2)x + 1 |
| (1, -1) and (4, 8) | 3 | y = 3x − 4 |
| (0, 10) and (5, 0) | -2 | y = −2x + 10 |
| (-4, -2) and (2, 1) | 1/2 | y = (1/2)x |
| (6, 3) and (2, 3) | 0 | y = 3 |
| (1, 0) and (3, 10) | 5 | y = 5x − 5 |
| (-1, 5) and (1, -1) | -3 | y = −3x + 2 |
| (0, 1) and (3, 3) | 2/3 | y = (2/3)x + 1 |
Tips
- Same x, no slope. Two points with equal x-values make a vertical line, x = constant.
- Perpendicular slopes multiply to −1. A slope of 2 is perpendicular to −1/2.
- Order does not matter. Swap the two points and the slope comes out the same.
FAQ
How do you find the equation of a line from two points?
Work out the slope by dividing the change in y by the change in x. Then put one point and the slope into y = mx + b and solve for b. For (1, 2) and (3, 8) the slope is 6 ÷ 2 = 3 and b = 2 − 3 = −1, so the line is y = 3x − 1.
What is the difference between slope-intercept and standard form?
Slope-intercept form, y = mx + b, shows the slope and y-intercept directly. Standard form, Ax + By = C with whole numbers and A positive, is tidier for intercepts and for solving systems. Both describe the same line, and the calculator gives each one for every input.
What is point-slope form used for?
Point-slope form, y − y₁ = m(x − x₁), lets you write a line straight from one known point and a slope without solving for b first. It is the quickest route when a question gives a point and a gradient, and it expands into slope-intercept form in one step.
Why is the slope of a vertical line undefined?
Every point on a vertical line has the same x, so the change in x is zero and the slope formula divides by zero. The line is written x = c instead. A horizontal line is the opposite case, with a slope of exactly 0 and an equation of the form y = c.
See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.
Related tools
Linear Equation Calculator
Solve one-variable linear equations with full working.
System Of Equations Calculator
Solve simultaneous equations with every elimination step.
Completing The Square Calculator
Vertex form, vertex and roots of any quadratic, step by step.
Pythagorean Theorem Calculator
Find the hypotenuse or a missing side of a right triangle.
Inequality Calculator
Solve a linear or double inequality, with interval notation and the number line.