Y-Intercept Calculator

Y-Intercept Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

b=Point y1−Slope m·Point x1b = {{\text{Point } y_1}} - {{\text{Slope } m}} \cdot {{\text{Point } x_1}}

Example

b=5−2·3=−1b = 5 - 2 \cdot 3 = -1
Usage stats

Advertisement

Results

Y-Intercept (b)
-1
where the line crosses the y-axis
Slope (m) 2
Equation of line y = 2x + -1

Report an error on this page

What is the Y-Intercept Calculator?

The y-intercept of a straight line is the point where the line crosses the y-axis — that is, the value of y when \(x = 0\). In the slope-intercept form of a line, \(y = mx + b\), the y-intercept is the constant b. This calculator finds b when you know the slope m and the coordinates of any single point (x₁, y₁) on the line.

How to Use It

Enter three values: the slope m, and the x and y coordinates of a known point on the line (x₁ and y₁). The calculator applies the formula and returns the y-intercept along with the complete equation of the line in slope-intercept form.

The Formula Explained

Start from the slope-intercept equation \(y = mx + b\). Since the point (x₁, y₁) lies on the line, it must satisfy the equation: \(y_1 = m \cdot x_1 + b\). Solving for b gives:

$$b = y_1 - m \cdot x_1$$

This works for any non-vertical line, because vertical lines have an undefined slope and no single y-intercept formula of this type.

Advertisement
Line on coordinate axes crossing the y-axis at point b, with slope triangle and a marked point
The y-intercept b is where the line crosses the y-axis; slope m sets its tilt.

Worked Example

Suppose a line has slope m = 2 and passes through the point (3, 5). Then:

$$b = 5 - (2 \times 3) = 5 - 6 = -1$$

So the line is \(y = 2x - 1\), and it crosses the y-axis at (0, −1).

Worked example line plotted through a point showing computed y-intercept
Tracing the line back to the y-axis gives the intercept value b.

More Worked Examples

Each example uses the same rule: substitute the slope and the point into \(b = y_1 - m\cdot x_1\), then write the line as \(y = mx + b\).

Example 1: Negative slope

Slope \(m = -3\), point \((2, 4)\).

  1. Write the formula: \(b = y_1 - m\cdot x_1\).
  2. Substitute: \(b = 4 - (-3)(2)\).
  3. Multiply first: \((-3)(2) = -6\).
  4. Subtracting a negative adds: \(b = 4 - (-6) = 4 + 6\).
  5. Result: b = 10, so the line is \(y = -3x + 10\).

Check: at \(x = 2\), \(y = -3(2) + 10 = 4\), which matches the given point.

Example 2: Fractional slope

Slope \(m = \tfrac{1}{2} = 0.5\), point \((-4, 1)\).

  1. Substitute: \(b = 1 - \tfrac{1}{2}(-4)\).
  2. Multiply: \(\tfrac{1}{2}\cdot(-4) = -2\).
  3. Subtract a negative: \(b = 1 - (-2) = 1 + 2\).
  4. Result: b = 3, so the line is \(y = 0.5x + 3\).

Check: at \(x = -4\), \(y = 0.5(-4) + 3 = -2 + 3 = 1\). ✓

Example 3: Zero slope

Slope \(m = 0\), point \((5, 7)\).

  1. Substitute: \(b = 7 - 0\cdot 5\).
  2. Multiply: \(0\cdot 5 = 0\).
  3. Subtract: \(b = 7 - 0 = 7\).
  4. Result: b = 7, so the line is \(y = 0x + 7\), which simplifies to \(y = 7\).

This is a horizontal line, so every point on it has \(y = 7\) and the y-intercept equals the y-coordinate of the given point.

Advertisement

Interpreting the Y-Intercept

The y-intercept \(b\) is the y-value where the line crosses the y-axis, that is, the value of \(y\) when \(x = 0\). The point is \((0, b)\).

  • Positive b: the line crosses the y-axis above the origin (for example, \(y = -3x + 10\) crosses at \((0, 10)\)).
  • Negative b: the line crosses the y-axis below the origin (for example, \(y = 2x - 5\) crosses at \((0, -5)\)).
  • Zero b: the line passes through the origin \((0, 0)\), and the equation reduces to \(y = mx\).

b as a starting value

In real-world linear models, \(b\) is the value when the input is zero: a fixed fee, a starting balance, or an initial amount. For example, if a taxi charges a flat fee of 4 plus 2 per kilometre, then \(y = 2x + 4\), where \(x\) is the distance in kilometres and \(b = 4\) is the cost before any distance is travelled. Whether \(x = 0\) makes sense in context matters: the intercept may be meaningful or just a mathematical extension of the model.

How m and b define the line

The slope \(m\) sets the steepness and direction (the change in \(y\) per one unit of \(x\)), while \(b\) fixes where the line sits vertically. Two lines with the same \(m\) but different \(b\) are parallel; together, \(m\) and \(b\) determine exactly one non-vertical line.

Special cases

  • Horizontal lines (\(m = 0\)): \(b = y_1\), because \(b = y_1 - 0\cdot x_1 = y_1\).
  • Vertical lines (\(x = c\)): the slope is undefined, so the form \(y = mx + b\) does not apply. If \(c \neq 0\), the line never meets the y-axis and has no y-intercept. If \(c = 0\), the line is the y-axis itself, so it does not cross it at a single point.

FAQ

What does a y-intercept of 0 mean? The line passes through the origin (0, 0).

Can the slope be negative? Yes. A negative slope simply means the line goes downward from left to right; the formula still applies.

What if I have two points instead of a slope? First compute the slope \(m = (y_2 - y_1)/(x_2 - x_1)\), then use either point with this calculator.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators