X-Intercept Calculator

Where a Line Crosses the Horizontal Axis

The x-intercept is the value of x when y equals zero — the point where a line crosses the horizontal axis. It answers a common real-world question phrased in graph terms: at what input value does an output cross zero? Given two points on a line, this calculator derives the slope and y-intercept first, then solves for exactly that crossing point, with explicit handling for horizontal and vertical line cases.

The Formula

m = (y2−y1) / (x2−x1)
b = y1 − m×x1
x-intercept = −b / m

A horizontal line (y1 = y2) never crosses the x-axis unless it IS the x-axis (y = 0), and a vertical line (x1 = x2) crosses the x-axis at exactly x1 — both are handled as special cases before the general formula applies.

Where the X-Intercept Is Used

  • Break-even analysis — the x-intercept of a profit line shows the sales volume at which profit crosses from negative to positive.
  • Root-finding — for a linear function, the x-intercept is exactly the equation's root, or solution to f(x) = 0.
  • Physics — on a velocity-vs-time graph, the x-intercept marks the moment velocity crosses zero.
Worked example
Point 1Point 2SlopeX-Intercept
(2, −3)(5, 3)23.5

How to Use This Calculator

  1. Enter X1 and Y1 for the first point.
  2. Enter X2 and Y2 for the second point.
  3. Select Calculate to see the x-intercept (with notes for horizontal or vertical lines).

Related Calculations

Need the y-axis crossing point or the slope alone? See the Y-Intercept Calculator and the Slope Calculator.