# Quadratic Formula Calculator

> Solve ax² + bx + c = 0: discriminant, real or complex roots, vertex, axis of symmetry, factored form, step-by-step working and a graph.

Interactive calculator: https://calculatorsplatform.com/c/quadratic/
Category: Math & Statistics Calculators
Calculations run in the browser; inputs can be prefilled through URL parameters and shared with the Share button.

## The quadratic formula

Any equation of the form ax² + bx + c = 0 with a ≠ 0 is a quadratic equation. Its solutions (roots) are given by the quadratic formula:

> x = (−b ± √(b² − 4ac)) / 2a

The expression under the square root, **D = b² − 4ac**, is called the **discriminant**, and its sign tells you what kind of roots to expect before you calculate them:

| Discriminant | Roots | Graph |
|---|---|---|
| D > 0 | two different real roots | crosses the x-axis twice |
| D = 0 | one repeated real root | touches the x-axis at the vertex |
| D < 0 | two complex conjugate roots | never meets the x-axis |

When D is a perfect square and a, b, c are integers, the roots are rational and the polynomial can be factored over the integers. Otherwise the calculator shows the exact root in simplified radical form, such as x = 1 ± √3, together with its decimal value.

## Vertex, axis and the shape of the parabola

The graph of y = ax² + bx + c is a parabola. It opens **upward** when a > 0 (the vertex is the lowest point) and **downward** when a < 0 (the vertex is the highest point). The vertex sits on the axis of symmetry:

> h = −b / 2a,  k = c − b² / 4a

so the equation can be rewritten in **vertex form** y = a(x − h)² + k. The y-intercept is simply (0, c).

Two handy checks come from Vieta's formulas: the roots always add up to −b/a and multiply to c/a. If your roots do not satisfy these, something went wrong.

For very lopsided coefficients (for example b = 10^8 and a = c = 1) the textbook formula loses accuracy, because it subtracts two nearly equal numbers. This calculator uses the numerically stable variant q = −(b + sign(b)·√D)/2, x₁ = q/a, x₂ = c/q, which gives full precision for both roots.

## Worked example

Solve **2x² − 4x − 6 = 0** (the calculator's default).

1. Coefficients: a = 2, b = −4, c = −6.
2. Discriminant: D = (−4)² − 4·2·(−6) = 16 + 48 = 64. It is positive, so there are two real roots, and because 64 = 8² they are rational.
3. Formula: x = (4 ± 8) / 4, so x₁ = −4/4 = **−1** and x₂ = 12/4 = **3**.
4. Factored form: 2(x + 1)(x − 3).
5. Vertex: h = 4/4 = 1, k = −6 − 16/8 = −8, so the vertex is (1, −8) and the parabola opens upward.

Check with Vieta: −1 + 3 = 2 = −b/a and −1 × 3 = −3 = c/a.

If a turns out to be 0 the equation is linear, bx + c = 0, with the single solution x = −c/b — that case is not a quadratic and the calculator asks for a non-zero a.

## Frequently asked questions

### What does a negative discriminant mean?

There are no real solutions: the parabola never crosses the x-axis. The two solutions are complex numbers of the form p ± qi, where i = √−1.

### Can I enter decimals or negative coefficients?

Yes. Any real a, b and c work, as long as a is not zero. Factoring over the integers is shown only when all three coefficients are whole numbers and the roots are rational.

### Is completing the square different from the quadratic formula?

No — the quadratic formula is what you get by completing the square on ax² + bx + c = 0 in general. Both give the same roots; the vertex form shown above is the completed-square form.

### Why does the calculator show a repeated root?

When D = 0 both roots coincide, x = −b/2a. The polynomial is then a perfect square, for example x² + 2x + 1 = (x + 1)², and the parabola just touches the x-axis.

## Related calculators

- [Scientific Calculator](https://calculatorsplatform.com/c/scientific/index.md)
- [Fraction Calculator](https://calculatorsplatform.com/c/fraction/index.md)
- [Exponent Calculator](https://calculatorsplatform.com/c/exponent/index.md)
- [Matrix Calculator](https://calculatorsplatform.com/c/matrix/index.md)
- [Logarithm Calculator](https://calculatorsplatform.com/c/logarithm/index.md)
- [Triangle Calculator](https://calculatorsplatform.com/c/triangle/index.md)

---
Source: CalculatorsPlatform (https://calculatorsplatform.com/c/quadratic/). Last reviewed 2026-11-25. Please link to the calculator page when citing.
