Category

Y Intercept Calculator — Find the X- and Y-Intercept of a Line

Find the y-intercept and x-intercept of any line. Enter two points, a slope and a point, a slope and the x-intercept, or the general form a·x + b·y + c = 0. Get the slope, the slope-intercept form (y = mx + b), the angle, and a step-by-step solution. Supports metric (m) and US/Imperial (ft) units.

0 calculations

Calculator Parameters

Enter Parameters

Fill in the form above and click Find Intercepts.

What Is the Y-Intercept Calculator?

This y-intercept calculator is the perfect tool to calculate the x- and y-intercept of any given line. Additionally, you can use it to find the line equation from its slope and the x- or y-intercept.

Finding intercepts of straight lines is a simple process, but it is pretty common to get the basics mixed up. Let's discuss the following essentials so that you're always ready:

  • How do you find the y-intercept of any line?
  • How do you find the x-intercept of any line?
  • How do you find the line equation from its intercepts?

Slope, Intercepts, and the General Line Equation

We can express the most general form of a straight line in 2-dimensional space as:

a·x + b·y + c = 0

where:

  • a is the coefficient of the x term;
  • b is the coefficient of the y term;
  • c is the constant term; and
  • x and y are the variables representing the two dimensions.

You can plot this line on a graph if you know at least two points that lie on it. We define the y-intercept of this line as the point at which it crosses (or intersects) the y-axis. Specifically, it refers to the y-coordinate of this point, although it is also common to call the point itself the y-intercept.

Similarly, the line's x-intercept is the point (or the x-coordinate) where it intersects the x-axis.

The slope (or gradient) of a line is the amount of change in y for a change in x. We can express the slope, y-intercept, and x-intercept of any line a·x + b·y + c = 0 with these equations:

QuantityFormula
Y-intercept (yc)yc = −c / b
X-intercept (xc)xc = −c / a
Slope (m)m = −a / b

Slope-Intercept Form

The most convenient way to write a line for reading off its intercept is the slope-intercept form:

y = m·x + b

Here m is the slope and b is exactly the y-intercept — the value of y when x = 0. Comparing this with the general form, we have m = −a/b and b = −c/b.

How Do You Find the Y-Intercept of a Line?

The y-intercept is where the line crosses the y-axis, which always happens at x = 0. So to find it, set x = 0 and solve for y:

  • From y = mx + b: set x = 0 → y = b. The y-intercept is simply b, at the point (0, b).
  • From the general form a·x + b·y + c = 0: set x = 0 → y = −c/b.
  • From two points (x₁, y₁) and (x₂, y₂): first find the slope m = (y₂ − y₁)/(x₂ − x₁), then b = y₁ − m·x₁.

Worked Example

Find the y-intercept of the line through (0, 1) and (2, 5).

  1. Slope: m = (5 − 1) / (2 − 0) = 4/2 = 2
  2. Y-intercept: b = 1 − 2·0 = 1 → point (0, 1)
  3. Equation: y = 2x + 1

How Do You Find the X-Intercept of a Line?

The x-intercept is where the line crosses the x-axis, which always happens at y = 0. Set y = 0 and solve for x:

  • From y = mx + b: set y = 0 → x = −b/m (defined only when m ≠ 0).
  • From the general form: x = −c/a.

A horizontal line (m = 0) never crosses the x-axis unless it is the x-axis (b = 0), so it generally has no x-intercept.

How Do You Find the Line Equation From Its Intercepts?

If you know both the x-intercept (a, 0) and the y-intercept (0, b), you can write the line directly in intercept form:

x / a + y / b = 1

The slope of such a line is m = −b/a. And if you know the slope and just one intercept, the y-intercept fixes the equation immediately: y = mx + b. Given the x-intercept xc and slope m, the y-intercept is b = −m·xc.

How to Calculate X- and Y-Intercepts Using This Y-Intercept Calculator

The calculator supports four flexible input methods — pick the one that matches the information you have:

  1. Two points — enter (x₁, y₁) and (x₂, y₂); the tool finds the slope, both intercepts, and the equation.
  2. Slope and a point — enter the slope m and any point on the line.
  3. Slope and x-intercept — enter m and the x-intercept to recover the y-intercept.
  4. General form (a, b, c) — enter the coefficients of a·x + b·y + c = 0.

For every input you get the y-intercept, the x-intercept, the slope, the angle of inclination, the slope-intercept form (y = mx + b), and the general form — plus a step-by-step derivation.

Unit Systems

For pure mathematical problems, coordinates are dimensionless. For physical problems, select a unit system:

  • None (pure math) — no units; suitable for abstract geometry or algebra.
  • Metric — coordinates in meters (m). Used widely in science and engineering worldwide.
  • US / Imperial — coordinates in feet (ft). Common in US construction and surveying. 1 ft ≈ 0.3048 m.

Real-World Meaning of the Y-Intercept

  • Fixed costs in economics — in a cost function C = 5x + 200, the y-intercept (200) is the fixed overhead when production x = 0.
  • Initial position in physics — in s = v·t + s₀, the y-intercept s₀ is the starting position at time t = 0.
  • Bias in machine learning — in linear regression ŷ = mx + b, the y-intercept b is the bias term (baseline prediction when x = 0).
  • Break-even point — the x-intercept of a profit function tells you how many units are needed to break even.

FAQs

What is the y-intercept in simple terms?
The y-intercept is the y-value where a line crosses the vertical y-axis — the value of y when x = 0. It is written as the point (0, b).
How do I find the y-intercept from two points?
First compute the slope m = (y₂ − y₁)/(x₂ − x₁). Then use either point in b = y − m·x. The result b is the y-intercept.
Can a line have no y-intercept?
Yes. A vertical line (x = constant, other than x = 0) is parallel to the y-axis and never crosses it, so it has no y-intercept and its slope is undefined.
What is the difference between the x- and y-intercept?
The y-intercept is where the line meets the y-axis (x = 0); the x-intercept is where it meets the x-axis (y = 0). A line can have zero, one, or infinitely many of each.
What happens when b = 0?
When the y-intercept b = 0, the line passes through the origin (0, 0). The equation reduces to y = mx, and the x- and y-intercepts coincide at the origin.
How is the y-intercept related to the general form a·x + b·y + c = 0?
Solving for y gives y = (−a/b)·x + (−c/b), so the slope is −a/b and the y-intercept is −c/b (valid whenever b ≠ 0).

Calculation History

Loading...