Skip to content
Math

Slope-Intercept Form Calculator

Solve for the slope-intercept equation y = mx + b using any combination of inputs: two coordinate points, one point plus the slope, or the slope and y-intercept directly. Get the slope m, y-intercept b, x-intercept, angle of inclination, standard form Ax + By = C, point-slope form, and the slopes of parallel and perpendicular lines, with a full worked solution and a table of y-values for graphing.

Your details

Equation (slope-intercept)Steeply rising
y = 2x
Slope (m)2
Y-intercept (b)0
X-intercept-0
Angle of inclination63.43deg
Standard form (Ax + By = C)2x - y = 0
Point-slope formy - 2 = 2(x - 1)
Slope of parallel line2
Slope of perpendicular line-0.5
63.43 deg
Steeply falling<-45Gently falling-45-0Gently rising0-45Steeply rising45+

The line is y = 2x, inclined at 63.43 degrees.

  • The slope is m = 2, so the line runs upward to the right; each unit increase in x changes y by 2.
  • The y-intercept is b = 0, so the line crosses the y-axis at (0, 0).
  • The x-intercept is -0, meaning the line crosses the x-axis at (-0, 0).
  • Any line perpendicular to this one has slope -0.5 (the negative reciprocal of 2).

Next stepUse the table of values below to plot the line, or substitute any x to find the matching y. Set y = 0 to find the x-intercept directly.

Table of values for y = mx + b

xy
-5-10
-4-8
-3-6
-2-4
-1-2
00
12
24
36
48
510

Substitute any x into y = mx + b to find the corresponding y. Plot these pairs to graph the line.

Formula

m=y2y1x2x1,b=y1mx1,y=mx+b,xint=bm,θ=arctan(m)m = \dfrac{y_2 - y_1}{x_2 - x_1}, \quad b = y_1 - m\,x_1, \quad y = mx + b, \quad x_{\text{int}} = -\dfrac{b}{m}, \quad \theta = \arctan(m)

Worked example

Points (1, 2) and (3, 6): slope m = (6-2)/(3-1) = 2. Then b = 2 - 2*1 = 0, giving y = 2x. The x-intercept is 0, the angle is arctan(2) = 63.43 degrees, and any perpendicular line has slope -0.5. In standard form: x - y = 0. For (0, 4) and (2, 0): m = (0-4)/(2-0) = -2, b = 4, giving y = -2x + 4, x-intercept 2, angle -63.43 degrees, perpendicular slope 0.5.

What slope-intercept form is and why it matters

Slope-intercept form writes a straight line as y = mx + b, where m is the slope and b is the y-intercept. The slope m measures how steeply the line rises or falls, the change in y for every unit increase in x, while b is the y-value where the line crosses the vertical axis at x = 0. This form is the most popular way to express a line because both key features are visible immediately in the equation, without any algebra. Once you know m and b, the entire line is determined and you can graph it by plotting (0, b) and stepping by the slope to a second point.

Three ways to define a line

You can reach slope-intercept form from three different starting points. The most common is two points: compute the slope m = (y2-y1)/(x2-x1) and then the intercept b = y1 - m*x1. If you already know the slope and one point (x1, y1), skip the rise-over-run step and go straight to b = y1 - m*x1. If you already have the slope and y-intercept, plug them in directly and you are done. All three routes are available in the selector above. The calculator also converts the result into standard form Ax + By = C and point-slope form y - y1 = m(x - x1) so you have every representation at once.

X-intercept, angle of inclination, and related lines

The x-intercept is the x-value where the line crosses the horizontal axis, found by setting y = 0 in the equation: x = -b/m (undefined for horizontal lines where m = 0). The angle of inclination is the angle the line makes with the positive x-axis: theta = arctan(m), ranging from just below 90 degrees for steeply rising lines through 0 degrees for a horizontal line to negative angles for falling lines. Parallel lines share the same slope m. Perpendicular lines have the negative reciprocal slope: -1/m, so a line of slope 2 is perpendicular to one of slope -0.5. These facts are essential for geometry, physics, and engineering problems involving right angles.

Standard form and point-slope form

Slope-intercept is one of three standard representations of a linear equation. Standard form Ax + By = C is preferred when working with systems of equations and has integer coefficients. Point-slope form y - y1 = m(x - x1) is useful when you know a point and a slope before solving for the intercept. This calculator outputs all three, so you can match whichever form your textbook or problem calls for. Standard form is derived by moving the mx term: -mx + y = b, then multiplying through by a common denominator to clear any fractions and make A positive.

When slope-intercept form does not apply

If the two points share the same x-coordinate, the run x2 - x1 is zero, the slope is undefined, and the line is vertical. Vertical lines cannot be written as y = mx + b because they have no single y-intercept and cross every y-value at once. They are expressed as x = constant. Horizontal lines are the opposite special case: the slope is exactly 0 and the equation reduces to y = b. Every other non-vertical line has exactly one slope and one y-intercept and can be expressed in slope-intercept form.

Common line equations and their properties

EquationSlope (m)Y-intercept (b)X-interceptAngle (deg)
y = 2x20063.43
y = 0.5x + 30.53-626.57
y = -2x + 4-242-63.43
y = -x + 1-111-45
y = 5 (horizontal)05none0

Slope m, y-intercept b, x-intercept, and angle for reference lines.

Frequently asked questions

How do you find slope-intercept form from two points?

First compute the slope m = (y2-y1)/(x2-x1). Then find the y-intercept with b = y1 - m*x1. For (1, 2) and (3, 6): m = (6-2)/(3-1) = 2 and b = 2 - 2*1 = 0, so the line is y = 2x. You can verify by substituting the second point: y = 2*3 = 6, which matches.

How do you find the x-intercept from slope-intercept form?

Set y = 0 in the equation y = mx + b and solve for x: 0 = mx + b, so x = -b/m. For y = -2x + 4: x = -4/(-2) = 2. The line crosses the x-axis at (2, 0). This is undefined for a horizontal line where m = 0.

What does the angle of inclination mean?

The angle of inclination theta is the angle the line makes with the positive x-axis, measured counterclockwise. It is calculated as arctan(m). A slope of 1 gives 45 degrees, a slope of 2 gives about 63 degrees, and a negative slope gives a negative angle (the line tilts to the right going down). Vertical lines would have 90 degrees but cannot be expressed in slope-intercept form.

What is the slope of a line perpendicular to y = mx + b?

The perpendicular slope is the negative reciprocal of m: -1/m. So if the slope is 2, the perpendicular slope is -1/2 = -0.5. If the slope is -3, the perpendicular slope is 1/3. Multiplying any slope by its perpendicular slope always gives -1, because perpendicular lines meet at right angles.

How do you convert slope-intercept form to standard form?

Starting from y = mx + b, move the mx term to the left: -mx + y = b. Multiply through by a common denominator to clear fractions, then ensure the coefficient of x is positive (multiply by -1 if needed). For y = 2x + 3: -2x + y = 3, multiply by -1: 2x - y = -3. For y = (1/2)x + 1: multiply by 2: x - 2y = -2. The result is Ax + By = C with integer coefficients.

Can I use one point and a slope to find the equation?

Yes. Switch the input mode to "One point + slope". Enter the coordinates of your known point (x1, y1) and the slope m, and the calculator computes b = y1 - m*x1, then builds y = mx + b for you along with all the other outputs. This is useful when the slope is given by a rate of change, a parallel line, or a perpendicular condition.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…