Y Intercept Calculator - Find b in y = mx + b
Use this y intercept calculator to get b in y = mx + b from a slope and a point, or from two points, along with the x-intercept and the line equation.
Y Intercept Calculator
Results
What Is Y Intercept Calculator?
A y intercept calculator finds the y-value where a straight line crosses the y-axis and writes it as the constant b in the slope-intercept form y = mx + b. The same tool turns a slope and a point or two points on the line into b, the x-intercept, and the line equation in plain text.
- • Algebra and coordinate geometry homework: Solve for b in y = mx + b when the textbook gives a slope and a point or two points on the line.
- • Physics and engineering trend lines: Convert a measured slope and a calibration point into a line equation.
- • Linear regression sanity checks: After fitting a trend through paired (x, y) data, plug the regression slope and one observed point in to read the intercept.
- • Graph sketching and verification: Check that a sketched line meets the y-axis where you think it does.
The y intercept calculator accepts a mode switch between slope + point and two points, so the same form covers the two most common ways y-intercept problems are posed. The result panel updates as soon as any field changes.
If you know m and a point on the line, pick slope + point and type m, x, and y. If you only have two points, pick two points and type (x1, y1) and (x2, y2) so the calculator derives m first.
Because the y-intercept is just one number extracted from a line, the slope calculator on the same site is the natural starting point for anyone who needs the full slope, percent grade, angle, and line equation in one read.
How Y Intercept Calculator Works
The y intercept calculator applies b = y - m * x, after deriving m in two-point mode, and returns b together with the x-intercept and the slope-intercept form of the same line.
- m: Slope of the line. In two-point mode, computed as (y2 - y1) / (x2 - x1). In slope + point mode, taken from the input field.
- x, y: Coordinates of the point on the line used to solve for b. In two-point mode, the first point (x1, y1) plays that role.
- b: Y-intercept. The y-value where the line crosses the y-axis, equal to y - m * x.
- x1, y1, x2, y2: Coordinates of the two points used to derive m in two-point mode. x2 must not equal x1 in that mode.
The sign of b is read straight from the formula: positive b means the line crosses the y-axis above the origin, negative b means it crosses below, and b = 0 means the line passes through the origin.
When x1 = x2 in two-point mode the slope is undefined and the line is vertical, so the y-intercept is reported as undefined. When m = 0 the line is horizontal.
Worked example: slope m = 2 and point (3, 7)
Slope + point mode, m = 2, x = 3, y = 7.
b = 7 - 2 * 3 = 1. x-intercept = -0.5. Line y = 2x + 1.
b = 1, m = 2, x-intercept = -0.5, line y = 2x + 1.
The line crosses the y-axis at (0, 1) above the origin and the x-axis at (-0.5, 0) to the left of the origin.
According to Khan Academy, the y-intercept of a line is the y-value where the line crosses the y-axis, and the slope-intercept form of a line is y = mx + b where m is the slope and b is the y-intercept
When the textbook problem hands you a slope and a point that is not the y-intercept, point slope form calculator writes the same line in y - y1 = m(x - x1) form, so the y-intercept and the y-value at a chosen x come from the same inputs.
Key Concepts Explained
Four ideas cover most of what the y intercept calculator does behind the panel.
Y-intercept b in y = mx + b
The y-intercept b is the constant term in y = mx + b. It is the y-coordinate of the point where the line crosses the y-axis, so reading b off a graph means reading the y-value of the point on the y-axis.
Slope m as rise over run
The slope m is the vertical change per unit of horizontal change. In two-point mode the calculator computes m = (y2 - y1) / (x2 - x1) before solving for b.
Y-intercept vs x-intercept
The y-intercept is the y-value where the line meets the y-axis, at x = 0. The x-intercept is the x-value where the line meets the x-axis, at y = 0, and equals -b / m when m is not zero.
Vertical and horizontal line edge cases
A vertical line x = c has no y-intercept unless c = 0. A horizontal line y = b has y-intercept b but no x-intercept unless b is also 0.
These four concepts are the entire reason a straight line is uniquely determined by two points or by a slope and a point.
A practical use is recognizing the sign of b from a graph. If the line crosses the y-axis above the origin, b is positive; if it crosses below, b is negative.
When the slope m and the point come from a fitted trend through measured (x, y) data rather than from a textbook problem, linear regression calculator returns the regression slope and intercept that the calculator then accepts as inputs.
How to Use This Calculator
Pick the input mode, fill in the fields, and read b, the x-intercept, and the line equation from the result panel.
- 1 Choose an input mode: Open the input mode menu and pick slope + point if you know m and a point, or two points if you only have two (x, y) pairs.
- 2 Enter the slope and a point: In slope + point mode, type m, x, and y. The defaults m = 2, x = 3, y = 7 give the textbook line y = 2x + 1 with b = 1.
- 3 Or enter the two points: In two-point mode, type (x1, y1) and (x2, y2). Make sure x2 differs from x1.
- 4 Read b and the x-intercept: The primary panel shows b, and the secondary panel shows the x-intercept. Both update in real time.
- 5 Copy the line equation: Copy the y = mx + b text into a homework answer, a graphing tool, or a spreadsheet.
A phone plan starts at a 20-dollar activation fee and adds 4 dollars per month, so m = 4 and (x1, y1) = (0, 20). At x = 8 the line gives y = 52, b = 20, x-intercept = -5, line y = 4x + 20.
If the same problem also asks for the y-value at a target x rather than just the y-intercept, the linear interpolation calculator reads the same two endpoints and returns the y-value at the chosen x for the linear segment between them.
Benefits of Using This Calculator
These benefits come from real coordinate-geometry, physics, and trend-mapping work.
- • Two input modes in one form: Switch between slope + point and two points without reloading.
- • b plus the rest of the line at the same time: The result panel returns b, the slope m, the x-intercept, and the line equation in y = mx + b in a single read.
- • Edge cases are explicit, not silent: Vertical lines report no y-intercept, horizontal lines report b but no x-intercept.
- • Real-time recalculation: The result panel updates as soon as any input changes.
- • Reset keeps the textbook example one click away: Pressing Reset restores the m = 2, x = 3, y = 7 slope + point defaults.
The biggest practical benefit is that the y-intercept becomes a single reading instead of a multi-step worksheet. The same form returns b, the x-intercept, and the line equation.
When the slope m and the point come from fitting a trend through measured data, the same inputs feed a regression workflow, so the y intercept calculator doubles as a sanity check on the intercept.
Once the y-intercept and the slope are in hand, the next common follow-up is the line through a different point with the same slope, and parallel line calculator returns that parallel line and its own y-intercept from the same m value.
Factors That Affect Your Results
These factors decide whether the b the calculator returns matches the line you would draw on a graph.
Sign and magnitude of the slope m
A positive m gives a b that depends on the input point in the usual way. A negative m flips the sign of the b term, mirroring the graph across the x-axis.
Position of the input point
When the input point has x = 0 the calculator reads b straight from the y of the point. When x is far from 0 the b term absorbs the m * x correction.
Equal x-coordinates in two-point mode
When x1 = x2 the line is vertical, m is undefined, and b is reported as undefined.
Equal y-coordinates in two-point mode
When y1 = y2 the line is horizontal, m = 0, and b equals the shared y. The x-intercept is undefined.
- • The calculator handles a single line at a time. For a line fitted through many data points, run a regression first and treat the regression slope and intercept as inputs.
- • The result is rounded for display only. The internal value uses full double-precision division, so chain the y-intercept with the unrounded result.
- • The calculator does not handle complex points. The slope m, the input point, and the two points must be real numbers.
When the input pair comes from measured data, the same b and m feed the y-value calculation that a point-slope workflow uses.
When m is very large or very small, the result panel keeps full double-precision.
According to Wolfram MathWorld, the y-intercept of a straight line is the y-coordinate of the point where the line meets the y-axis, and for a line y = mx + b the y-intercept equals b
According to Omni Calculator y-intercept page, when you know the slope m and a point (x, y) on the line the y-intercept is b = y - m * x, and when you have two points the slope is m = (y2 - y1) / (x2 - x1) before b is solved the same way
When the problem also asks for the line that meets this one at a right angle, perpendicular line calculator uses the same point and the negative reciprocal of m to return the perpendicular line, its own y-intercept, and the intersection point.
Frequently Asked Questions
Q: What is the y-intercept of a line?
A: The y-intercept of a line is the y-value where the line crosses the y-axis. In the slope-intercept form y = mx + b, the y-intercept is the constant term b, and reading the y-intercept off a graph means reading the y-coordinate of the point on the y-axis.
Q: How do you find the y-intercept from two points?
A: Compute the slope m = (y2 - y1) / (x2 - x1) from the two points, then plug one of the points and m into b = y1 - m * x1. The result is the y-intercept of the line that passes through both points, and the line equation is y = mx + b.
Q: What is the y-intercept formula?
A: The y-intercept formula is b = y - m * x, where m is the slope and (x, y) is a point on the line. In two-point mode, the calculator derives m = (y2 - y1) / (x2 - x1) first, then applies b = y1 - m * x1 using the first point.
Q: How do you find the y-intercept from a slope and a point?
A: Pick the input mode slope + point, type the slope m and the point (x, y) on the line, and the calculator returns b = y - m * x in real time. The line equation in slope-intercept form y = mx + b is also returned, so the y-intercept and the line are both ready to paste.
Q: What is the difference between the y-intercept and the x-intercept?
A: The y-intercept is the y-value where the line crosses the y-axis, at x = 0, and equals b in y = mx + b. The x-intercept is the x-value where the line crosses the x-axis, at y = 0, and equals -b / m when m is not zero. Both values come from the same line equation.
Q: What is the y-intercept of a horizontal or vertical line?
A: A horizontal line has slope m = 0 and y-intercept b equal to the constant y of the line; it has no x-intercept unless b is also 0. A vertical line has x1 = x2, an undefined slope, and no y-intercept unless the line is x = 0; the calculator reports both cases explicitly.