Skip to content
Math

Y-Intercept Calculator

Find the y-intercept b of a straight line from any combination of information: a slope and a known point, two points on the line, or the standard form ax + by + c = 0. Get b, the x-intercept, the slope m, and the complete slope-intercept equation y = mx + b with a worked step-by-step solution.

Your details

Rise divided by run. Positive slopes go up left to right; negative slopes go down.
Y-intercept (b)Crosses below the origin
-2
X-intercept1
Slope (m)2
Slope-intercept equationy = 2x - 2
Standard form2x - y + -2 = 0

The line crosses the y-axis at the point (0, -2).

  • The y-intercept is b = y - m*x: with slope m = 2 the line crosses the y-axis at the point (0, -2).
  • In slope-intercept form the line is y = 2x - 2.
  • The x-intercept (where y = 0) is at x = 1, meaning (1, 0).
  • You can verify: plug x = 0 into y = mx + b and you get y = b, confirming the y-intercept directly.

Next stepBoth intercepts are now known: y-intercept (0, -2) and x-intercept (1, 0). Two points are enough to graph the full line.

Formula

b=ymxm=y2y1x2x1Standard form: yc=cb,  xc=cab = y - m\,x \qquad m = \dfrac{y_2 - y_1}{x_2 - x_1} \qquad \text{Standard form: } y_c = -\dfrac{c}{b},\; x_c = -\dfrac{c}{a}

Worked example

Slope m = 2 through (3, 4): b = 4 - 2*3 = -2, so y = 2x - 2; x-intercept = -(-2)/2 = 1. Two points (1, 2) and (3, 6): m = (6-2)/(3-1) = 2, b = 2 - 2*1 = 0, so y = 2x; x-intercept = 0. Standard form 2x - y + 2 = 0: slope = -2/(-1) = 2, y-intercept = -2/(-1) = 2, x-intercept = -2/2 = -1.

What the y-intercept means

The y-intercept of a straight line is the point where the line crosses the vertical y-axis. That always happens at x = 0, which is why the y-intercept is simply the value of y when you substitute zero for x. In the slope-intercept equation y = mx + b, the letter b is exactly that value, sitting there as the constant offset before any horizontal movement is applied. The y-intercept tells you the height of the line at the very instant it passes the y-axis, giving you an anchor point from which the slope drives the line in either direction.

Three ways to find b

This calculator supports three starting points. If you know the slope m and one point (x, y), rearrange y = mx + b to get b = y - m*x, then substitute. If you have two points, first compute slope as rise over run: m = (y2 - y1) / (x2 - x1), then use either point in b = y - m*x. If the equation is already in standard form ax + by + c = 0, isolate y by subtracting ax and c from both sides and dividing by b, which gives slope m = -a/b and y-intercept b = -c/b. All three routes reach the same final equation.

The x-intercept: the other crossing point

Once you have the slope and y-intercept, the x-intercept follows immediately. Setting y = 0 in y = mx + b gives 0 = mx + b, so x = -b/m. The x-intercept is the point (x, 0) where the line meets the horizontal axis. Together, the two intercepts give you two concrete points that are usually the simplest landmarks for sketching the line on graph paper. A horizontal line (m = 0) has no finite x-intercept unless it is the x-axis itself; a line through the origin has both intercepts at (0, 0).

Standard form ax + by + c = 0 explained

Standard form is another way to write a linear equation. Every linear equation with a finite slope can be rewritten as ax + by + c = 0 by moving all terms to one side. The conversion to slope-intercept form is always the same: solve for y by subtracting ax and c, then dividing through by b. The y-intercept emerges as -c/b and the x-intercept as -c/a. Standard form is common in algebra textbooks and useful when you need to spot whether two lines are parallel (same ratio -a/b) or perpendicular (product of slopes equals -1).

Y-intercept, x-intercept and slope at a glance

Equation (y = mx + b)Slope (m)Y-intercept (b)X-interceptCrosses y-axis at
y = 2x - 22-21(0, -2)
y = 2x200(0, 0)
y = -0.5x + 3-0.536(0, 3)
y = 505none(0, 5)
y = -x - 4-1-4-4(0, -4)

Common equations with both intercepts and slope in slope-intercept form.

Frequently asked questions

How do you find the y-intercept from slope and a point?

Use the formula b = y - m*x. Substitute the slope m and the x and y coordinates of the known point, then compute. For slope 3 through (2, 5): b = 5 - 3*2 = -1, so the line is y = 3x - 1 and the y-intercept is -1.

How do you find the y-intercept from standard form ax + by + c = 0?

The y-intercept is -c/b (set x = 0 and solve for y). The x-intercept is -c/a (set y = 0 and solve for x). The slope is -a/b. For 3x + 2y - 6 = 0: y-intercept = 6/2 = 3, x-intercept = 6/3 = 2, slope = -3/2.

Can a line have no y-intercept?

Yes. A vertical line such as x = 4 runs parallel to the y-axis and never crosses it, so it has no y-intercept and its slope is undefined. Every non-vertical line has exactly one y-intercept.

What does a y-intercept of zero mean?

A y-intercept of zero means the line passes through the origin (0, 0). The equation simplifies to y = mx, showing a direct proportional relationship between x and y with no constant offset.

How do you find the x-intercept from y = mx + b?

Set y = 0 and solve: 0 = mx + b, so x = -b/m. For y = 2x - 4, x = -(-4)/2 = 2, confirming the x-intercept is the point (2, 0). If the slope is zero, the line is horizontal and has no x-intercept (unless b = 0).

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

From ax + by + c = 0, subtract ax and c from both sides to get by = -ax - c, then divide everything by b: y = (-a/b)x + (-c/b). The slope is -a/b and the y-intercept is -c/b. For 4x - 2y + 8 = 0: y = 2x + 4, slope 2 and y-intercept 4.

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…