Y-Intercept Calculator - Find Y-Intercept of a Line

Calculate the y-intercept and equation of a straight line from slope and point, or from two points on the line.

Select a calculation method, enter the required values, and get the y-intercept (b) and full slope-intercept equation y = mx + b instantly.

Y-Intercept Calculator - Find Y-Intercept of a Line
Calculate the y-intercept and equation of a straight line from slope and point, or from two points on the line.

Enter the slope (m) and one point (x, y) on the line. The y-intercept is found using b = y − mx.

About the Y-Intercept Calculator

The y-intercept of a line is the point at which the line crosses the y-axis, where x equals zero. In the slope-intercept form of a linear equation, y = mx + b, the letter b represents the y-intercept and m represents the slope. Understanding the y-intercept is essential for graphing lines, analyzing linear relationships, and solving a wide variety of algebra and calculus problems. The slope-intercept form is the most commonly used representation of a straight line because it immediately reveals two key properties: how steeply the line rises or falls (the slope m), and where it intersects the vertical axis (the y-intercept b). A positive b means the line crosses the y-axis above the origin; a negative b means it crosses below. A zero y-intercept means the line passes directly through the origin. This calculator supports two methods. The first — Slope + Point — takes a known slope m and one point (x, y) on the line. The y-intercept is found by rearranging the slope-intercept equation: b = y − mx. For example, if the slope is 2 and the line passes through (1, 5), then b = 5 − 2×1 = 3, so the equation is y = 2x + 3. This method is useful when you have measured the steepness of a line and one reference point. The second method — Two Points — derives the slope first. Given two points (x₁, y₁) and (x₂, y₂), the slope is m = (y₂ − y₁) / (x₂ − x₁). Once m is known, the y-intercept is computed as b = y₁ − mx₁. This method is the fundamental technique used in linear regression, coordinate geometry, and data analysis whenever you know the positions of two points on a line but not the equation. The y-intercept has practical meaning in many real-world contexts. In economics, a cost function C = mx + b might represent a fixed overhead cost b (the y-intercept, payable even when output x is zero) plus a variable cost m per unit. In physics, the y-intercept of a velocity-time graph represents initial velocity. In statistics, the y-intercept of a regression line is the predicted value of the response variable when the predictor is zero, which may or may not have a meaningful real-world interpretation depending on context. Note that vertical lines (where all points share the same x-coordinate) do not have a y-intercept in the traditional sense — they are represented as x = c and never cross the y-axis unless c = 0. This calculator detects and reports that edge case. All other lines, including horizontal ones with slope zero, have exactly one y-intercept, and this tool computes it to ten significant digits.

Y-Intercept Calculator Examples

Four worked examples covering both methods with positive, negative, and fractional slopes.

InputY-Intercept (b)Equation
m = 2, point (1, 5)3b = 5 − 2×1 = 3 → y = 2x + 3
m = −0.5, point (−4, 0)−2b = 0 − (−0.5×−4) = −2 → y = −0.5x − 2
Points (1, 3) and (4, 9)1m = (9−3)/(4−1) = 2; b = 3 − 2×1 = 1 → y = 2x + 1
Points (−2, 7) and (3, −3)3m = (−3−7)/(3−(−2)) = −2; b = 7 − (−2×−2) = 3 → y = −2x + 3

How to Use the Y-Intercept Calculator

  1. Choose the calculation method: Slope + Point if you know the slope and one coordinate, or Two Points if you have two coordinates on the line.
  2. For Slope + Point: enter the slope m in the Slope field, then enter the x and y coordinates of your known point.
  3. For Two Points: enter the x and y coordinates of the first point (x₁, y₁), then the second point (x₂, y₂).
  4. Click Calculate Y-Intercept to see the y-intercept value, the slope (derived if using two points), and the full slope-intercept equation y = mx + b.
  5. Click Reset to clear all inputs and start a new calculation.

Y-Intercept Calculator FAQ

What is the y-intercept?
The y-intercept is the value of y where a line crosses the y-axis, i.e., where x = 0. In the equation y = mx + b, b is the y-intercept. It represents the starting value of y before any change in x is applied.
How do I find the y-intercept from slope and a point?
Use the formula b = y − mx, where m is the slope and (x, y) is the known point. Substitute the slope and the point coordinates into the formula to solve for b. The calculator performs this arithmetic automatically.
How do I find the y-intercept from two points?
First calculate the slope using m = (y₂ − y₁) / (x₂ − x₁). Then substitute into b = y₁ − mx₁ (or equivalently b = y₂ − mx₂). Both give the same answer. The calculator shows the derived slope as well as the y-intercept.
What happens if the two points have the same x-coordinate?
When both points share the same x-value, the line is vertical (x = constant) and the slope is undefined. Vertical lines do not have a y-intercept unless the x-value is 0. The calculator returns an error in this case because the slope-intercept formula cannot be applied.
Can the y-intercept be negative?
Yes. A negative y-intercept simply means the line crosses the y-axis below the origin. For example, the line y = 3x − 5 has a y-intercept of −5. There is nothing special or invalid about a negative y-intercept.
What does a y-intercept of zero mean?
A y-intercept of zero means the line passes through the origin (0, 0). Direct proportionality relationships like y = 3x (distance is proportional to time) always have a y-intercept of zero because there is no constant offset.