Slope-intercept form calculator

Get y = mx + b from two points, a point and a slope, or standard form, with exact fractions and the line drawn for you.

m=y2−y1x2−x1=9−(3)4−(1)=2m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{9 - (3)}{4 - (1)} = 2

3=2(1)+b3 = 2(1) + b

b=3−(2)=1b = 3 - (2) = 1

Equationy=2x+1y = 2x + 1

Slope 22, y-intercept (0,1)(0, 1), x-intercept (-0.5, 0).

Slope is rise over run

Point A
-2
-1
Point B
3
4

m=riserun=4−(−1)3−(−2)=1m = \frac{\text{rise}}{\text{run}} = \frac{4 - (-1)}{3 - (-2)} = 1

y=1x+1y = 1x + 1

Positive slope: the line rises left to right. Moving 1 step right changes y by 1.

-8-6-4-202468-8-6-4-202468AB
  • the line
  • run = 5

How to graph a linear equation from y = mx + b

  1. Plot the y-intercept (0,b)(0, b).
  2. From there, use the slope as rise over run. For m=23m = \tfrac{2}{3}, go up 2 and right 3 and plot a second point.
  3. Draw a straight line through the two points and extend it both ways.

The three common forms of a line all describe the same thing: slope-intercept y=mx+by = mx + b, point-slope y−y1=m(x−x1)y - y_1 = m(x - x_1), and standard Ax+By=CAx + By = C. Two lines together make a system of equations.

Frequently asked questions

What is slope-intercept form?
y = mx + b, where m is the slope (rise over run) and b is the y-intercept, the y-value where the line crosses the y-axis.
How do I find the equation of a line through two points?
Find the slope m = (y₂ − y₁)/(x₂ − x₁). Then substitute one point into y = mx + b and solve for b.
How do I convert Ax + By = C to slope-intercept form?
Solve for y: subtract Ax from both sides (By = −Ax + C), then divide by B, giving y = (−A/B)x + C/B.
What about vertical lines?
A vertical line like x = 3 has an undefined slope and can’t be written as y = mx + b. Horizontal lines have slope 0: y = b.