Formula and Method for the Y-Intercept of a Line
The y-intercept of a line is the point where it crosses the y-axis — the point at which x = 0. In slope-intercept form, y = mx + b, the constant b is exactly the y-intercept. This calculator starts from two points on a line, (x₁, y₁) and (x₂, y₂), and derives the slope, the y-intercept, the full equation of the line, and the x-intercept.
How the calculation works
First the calculator finds the slope from the two points: m = (y₂ − y₁) / (x₂ − x₁). Next it substitutes the slope and one known point into the slope-intercept form y = mx + b and solves for b: b = y₁ − m·x₁. That value of b is the y-intercept — the line passes through (0, b). Finally, setting y = 0 in y = mx + b and solving for x gives the x-intercept, x = −b / m, which only exists when the slope is not zero.
Common mistakes
- Vertical lines: if x₁ = x₂, the slope is undefined (division by zero), so there is no single y-intercept unless the line is the y-axis itself (x₁ = x₂ = 0).
- Confusing x- and y-intercepts: the y-intercept is found by setting x = 0 (giving point (0, b)); the x-intercept is found by setting y = 0 (giving point (−b/m, 0)) — they are not interchangeable.
- Horizontal lines: if the slope is 0, the line y = b never crosses the x-axis (unless b = 0, the x-axis itself), so it has no x-intercept.
Real-world applications
- Reading a starting value: in a linear model y = mx + b, the y-intercept is the value of y when the input x is zero — for example, a fixed starting cost before any usage-based charges.
- Graphing lines quickly by plotting the y-intercept first, then using the slope to find a second point.
- Comparing two linear trends (e.g., pricing plans or growth rates) by comparing their y-intercepts and slopes side by side.
- Curve fitting and regression, where the y-intercept of a best-fit line represents the baseline value of the response variable.