# What is the x-intercept of my graph?

Finds the x-intercept (and the y-intercept) of a line in slope-intercept form, through two points, or in standard form, or of a parabola y = ax² + bx + c.

- Page: https://www.acalculator.org/math/x-intercept-calculator
- JSON spec: https://www.acalculator.org/math/x-intercept-calculator.json
- Version: 3e42326313ff

## Default answer

Example with the default inputs (Equation y = mx + b, Slope (m) 2, y-intercept (b) -8): The x-intercept of y = 2x - 8 is (4, 0).

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| form | Equation | How the graph is given: y = mx + b, two points on a line, Ax + By = C, or y = ax² + bx + c. |
| m | Slope (m) | The slope of the line y = mx + b. |
| b | y-intercept (b) | The constant b of y = mx + b. |
| x1 | x₁ | The x-coordinate of the first point. |
| y1 | y₁ | The y-coordinate of the first point. |
| x2 | x₂ | The x-coordinate of the second point. |
| y2 | y₂ | The y-coordinate of the second point. |
| A | A | The coefficient of x in Ax + By = C. |
| B | B | The coefficient of y in Ax + By = C. |
| C | C | The constant on the right of Ax + By = C. |
| qa | a | The coefficient of x² in y = ax² + bx + c. |
| qb | b | The coefficient of x in y = ax² + bx + c. |
| qc | c | The constant c of y = ax² + bx + c. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| intercepts | x-intercept | The points where the graph crosses the x-axis, as (x, 0), or None. |
| x1 | x-intercept x | The x value where the graph crosses the x-axis (the smaller one for a parabola). |
| x2 | Second x-intercept x | For a parabola with two x-intercepts, the larger x value. |
| yIntercept | y-intercept | The point where the graph crosses the y-axis, as (0, y), or None. |
| equation | Equation | The line as y = mx + b (or x = c for a vertical line), or the parabola as typed. |
| discriminant | Discriminant (b² − 4ac) | For a parabola: above 0 gives two x-intercepts, 0 gives one, below 0 gives none. |

## Method

Set y = 0 and solve for x: y = mx + b gives x = −b ÷ m; Ax + By = C gives x = C ÷ A; two points give m = (y₂ − y₁) ÷ (x₂ − x₁) first; y = ax² + bx + c gives x = (−b ± √(b² − 4ac)) ÷ 2a.

## Assumptions

- Coefficients are read as the exact decimals typed; line intercepts are exact fractions.
- A parabola’s irrational x-intercepts are 64-bit floats, shown to 10 significant figures in the points.
- With a = 0, y = ax² + bx + c is the line y = bx + c.

## Worked examples

1. form = slope, m = 0.5, b = -3 gives intercepts = (6, 0), x1 = 6, yIntercept = (0, -3), equation = y = 1/2 x - 3. Source: OpenStax, Algebra and Trigonometry 2e, section 4.1 Linear Functions (x-intercept where f(x) = 0, y-intercept b), https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02, example: f(x) = ½x − 3 crosses the x-axis at (6, 0).
2. form = quadratic, qa = 3, qb = 5, qc = -2 gives intercepts = (-2, 0) and (1/3, 0), x1 = -2, x2 = 0.333333, discriminant = 49. Source: OpenStax, Algebra and Trigonometry 2e, section 5.1 Quadratic Functions (x-intercepts from the quadratic formula), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-1-quadratic-functions, retrieved 2026-10-02, example 7: 3x² + 5x − 2 = (3x − 1)(x + 2), x-intercepts (−2, 0) and (1/3, 0).
3. form = quadratic, qa = 2, qb = 4, qc = -4 gives x1 = -2.732051, x2 = 0.732051, intercepts = (-2.732050808, 0) and (0.7320508076, 0). Source: OpenStax, Algebra and Trigonometry 2e, section 5.1 Quadratic Functions (x-intercepts from the quadratic formula), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-1-quadratic-functions, retrieved 2026-10-02, example 8: 2x² + 4x − 4 has x-intercepts −1 ± √3, about (−2.732, 0) and (0.732, 0).
4. form = slope, m = 2, b = -8 gives intercepts = (4, 0), x1 = 4, yIntercept = (0, -8), equation = y = 2x - 8. Source: OpenStax, Algebra and Trigonometry 2e, section 4.1 Linear Functions (x-intercept where f(x) = 0, y-intercept b), https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02.
5. form = points, x1 = 1, y1 = -2, x2 = 4, y2 = 4 gives intercepts = (2, 0), x1 = 2, yIntercept = (0, -4), equation = y = 2x - 4. Source: OpenStax, Algebra and Trigonometry 2e, section 4.1 Linear Functions (x-intercept where f(x) = 0, y-intercept b), https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02.
6. form = standard, A = 3, B = 4, C = 12 gives intercepts = (4, 0), yIntercept = (0, 3), equation = y = -3/4 x + 3. Source: OpenStax, Algebra and Trigonometry 2e, section 4.1 Linear Functions (x-intercept where f(x) = 0, y-intercept b), https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02.
7. form = standard, A = 3, B = 0, C = 8 gives intercepts = (8/3, 0), x1 = 2.666667, yIntercept = None: the line does not cross the y-axis, equation = x = 8/3.
8. form = quadratic, qa = 1, qb = -2, qc = -3 gives intercepts = (-1, 0) and (3, 0), x1 = -1, x2 = 3, discriminant = 16, yIntercept = (0, -3), equation = y = x² - 2x - 3. Source: OpenStax, Algebra and Trigonometry 2e, section 5.1 Quadratic Functions (x-intercepts from the quadratic formula), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-1-quadratic-functions, retrieved 2026-10-02.
9. form = quadratic, qa = 1, qb = 0, qc = -2 gives intercepts = (-1.414213562, 0) and (1.414213562, 0), x1 = -1.414214, x2 = 1.414214, discriminant = 8. Source: OpenStax, Algebra and Trigonometry 2e, section 5.1 Quadratic Functions (x-intercepts from the quadratic formula), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-1-quadratic-functions, retrieved 2026-10-02.
10. form = quadratic, qa = 1, qb = 2, qc = 5 gives intercepts = None: the graph does not cross the x-axis, discriminant = -16. Source: OpenStax, Algebra and Trigonometry 2e, section 5.1 Quadratic Functions (x-intercepts from the quadratic formula), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-1-quadratic-functions, retrieved 2026-10-02.
11. form = slope, m = 0, b = 5 gives intercepts = None: the graph does not cross the x-axis, yIntercept = (0, 5), equation = y = 5.

## FAQ

### What is an x-intercept?

The point where a graph crosses the x-axis. There y = 0, so the point is (x, 0). For f(x) = ½x − 3, setting 0 = ½x − 3 gives x = 6, so the x-intercept is (6, 0).

### How do I find the x-intercept of y = mx + b?

Set y = 0 and solve: x = −b ÷ m. For y = 2x − 8, x = 8 ÷ 2 = 4. A horizontal line (m = 0) has no x-intercept, unless it is the x-axis itself.

### How do I find the x-intercept from two points?

Find the slope m = (y₂ − y₁) ÷ (x₂ − x₁), then b = y₁ − m × x₁, then x = −b ÷ m. Through (1, −2) and (4, 4): m = 6 ÷ 3 = 2, b = −4, x = 2.

### How do I find the intercepts of Ax + By = C?

Set y = 0 to get x = C ÷ A, and set x = 0 to get y = C ÷ B. For 3x + 4y = 12, the x-intercept is (4, 0) and the y-intercept is (0, 3).

### How many x-intercepts can a parabola have?

Two, one, or none, depending on the discriminant b² − 4ac. Above 0: two, from x = (−b ± √(b² − 4ac)) ÷ 2a. Equal to 0: one, where the vertex touches the axis. Below 0: none.

### What is the difference between an x-intercept, a zero and a root?

They name the same number from different views. A zero of f is an x where f(x) = 0; a root is a solution of f(x) = 0; the x-intercept is the point (x, 0) on the graph.

### What is the y-intercept?

Where the graph crosses the y-axis, at x = 0. For y = mx + b it is (0, b); for y = ax² + bx + c it is (0, c). A vertical line x = c has none, unless c = 0.

## Sources

- OpenStax, Algebra and Trigonometry 2e, section 4.1 Linear Functions (x-intercept where f(x) = 0; example f(x) = ½x − 3 gives (6, 0)), CC BY 4.0, retrieved 2026-10-02. https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions
- OpenStax, Algebra and Trigonometry 2e, section 5.1 Quadratic Functions (x-intercepts by factoring and by the quadratic formula; examples 3x² + 5x − 2 and 2x² + 4x − 4), CC BY 4.0, retrieved 2026-10-02. https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-1-quadratic-functions
