y Intercept Calculator

Enter two points on a line to get its slope (m), y-intercept (b), full equation y = mx + b, and its x-intercept.

Quick Facts

Slope formula
m = (y₂ − y₁) / (x₂ − x₁)
Rise over run between the two points.
Y-intercept formula
b = y₁ − m·x₁
Found by solving y = mx + b for b at a known point.
X-intercept formula
x = −b / m
Where the line crosses the x-axis (y = 0); undefined when m = 0.

Your Results

Calculated
Slope (m)
-
Rise over run
Y-intercept (b)
-
Point where the line crosses x = 0
Line equation
-
Slope-intercept form
X-intercept
-
Point where the line crosses y = 0

Ready

Enter two points on the line, then press Calculate.

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.

Frequently Asked Questions

What is the formula for the y-intercept of a line?
The y-intercept is the value of y where the line crosses the y-axis, i.e. where x = 0. Given the slope-intercept form y = mx + b, the y-intercept is simply b. Given two points (x₁, y₁) and (x₂, y₂), first find the slope m = (y₂ − y₁) / (x₂ − x₁), then solve b = y₁ − m·x₁.
How do I find the y-intercept from two points?
Compute the slope m = (y₂ − y₁) / (x₂ − x₁), then substitute one of the points into y = mx + b and solve for b: b = y₁ − m·x₁. The y-intercept is the point (0, b).
What happens if the two points have the same x-coordinate?
If x₁ = x₂ the line is vertical, its slope is undefined, and it has no single y-intercept — unless the line is the y-axis itself (x₁ = x₂ = 0), in which case every point on the line is on the y-axis.
How is the x-intercept different from the y-intercept?
The x-intercept is where the line crosses the x-axis, found by setting y = 0 and solving x = −b/m. It exists only when the slope m is not zero; a horizontal line (m = 0) never crosses the x-axis unless it is the x-axis itself.