# Quadratic Formula Calculator

> The roots of ax^2 + bx + c = 0 are x = (−b ± √(b^2 − 4ac)) ÷ 2a, so 2x^2 − 4x − 6 = 0 has a discriminant of 64 and roots x = 3 and x = −1. The working is shown in full, with complex roots, the vertex, the axis of symmetry and the factored form when the roots are rational.

- Interactive calculator: https://calculatorswithsteps.com/quadratic-formula-calculator
- Category: Math & Statistics Calculators
- Last updated: 2026-11-10
- Publisher: Calculators With Steps (calculatorswithsteps.com)

## How to use the quadratic formula calculator

1. Rearrange your equation so one side is zero: ax² + bx + c = 0. For example, 2x² = 4x + 6 becomes 2x² − 4x − 6 = 0.
2. Enter **a** (the number in front of x²), **b** (the number in front of x) and **c** (the constant). Use 0 for a missing term, so x² − 4 = 0 has b = 0.
3. Negative numbers, decimals and fractions such as 1/2 are all accepted.

The result shows both roots, the discriminant, the vertex and the factored form, followed by every step of the working.

## The quadratic formula

For any quadratic equation ax² + bx + c = 0 where a is not zero:

**x = (−b ± √(b² − 4ac)) ÷ 2a**

- **a, b, c** are the coefficients of x², x and the constant term.
- **b² − 4ac** is the **discriminant**, written D or Δ.
- **±** means there are two answers: one using + and one using −.

The formula comes from completing the square on ax² + bx + c = 0, so it always works, including for equations that do not factor.

## What the discriminant tells you

| Discriminant | Roots | Example | Result |
| --- | --- | --- | --- |
| Positive perfect square | Two rational roots | 2x² − 4x − 6 = 0, D = 64 | x = 3, x = −1 |
| Positive, not a perfect square | Two irrational roots | x² − 2x − 1 = 0, D = 8 | x = 1 ± √2 |
| Zero | One repeated root | x² − 6x + 9 = 0, D = 0 | x = 3 |
| Negative | Two complex roots | x² + 2x + 5 = 0, D = −16 | x = −1 ± 2i |

Graphically, the discriminant tells you how many times the parabola y = ax² + bx + c crosses the x-axis: twice, once (it just touches) or not at all.

## Worked example: 2x² − 4x − 6 = 0

| Step | Working | Result |
| --- | --- | --- |
| Coefficients | a = 2, b = −4, c = −6 | |
| Discriminant | (−4)² − 4 × 2 × (−6) = 16 + 48 | D = 64 |
| Square root | √64 | 8 |
| First root | (4 + 8) ÷ 4 | x = 3 |
| Second root | (4 − 8) ÷ 4 | x = −1 |
| Vertex | x = 4 ÷ 4 = 1, y = 2 − 4 − 6 | (1, −8) |
| Factored form | | 2(x − 3)(x + 1) = 0 |

A quick check: substitute x = 3 into the original equation and you get 18 − 12 − 6 = 0.

## Irrational and complex roots

When the discriminant is not a perfect square, the roots are irrational. The calculator gives them as decimals and in exact simplified radical form. For x² − 2x − 1 = 0, D = 8 and √8 = 2√2, so x = (2 ± 2√2) ÷ 2 = 1 ± √2, which is about 2.414214 and −0.414214. The [square root calculator](https://calculatorswithsteps.com/square-root-calculator) shows how radicals like √8 are simplified.

When the discriminant is negative, there are no real solutions, but there are two complex ones of the form p ± qi. For x² + 2x + 5 = 0 the answer is −1 ± 2i. Complex roots always come in conjugate pairs when a, b and c are real.

## Other ways to solve a quadratic

- **Factoring:** fastest when D is a perfect square. x² − 5x + 6 = (x − 3)(x − 2).
- **Completing the square:** x² − 2x − 1 = 0 becomes (x − 1)² = 2, so x = 1 ± √2. This is exactly how the formula is derived.
- **Graphing:** the roots are where the parabola crosses the x-axis. The axis of symmetry runs through the vertex at x = −b ÷ 2a.

## A real-life example

A ball thrown straight up at 20 m/s from a height of 1.5 m follows h = −4.9t² + 20t + 1.5, with t in seconds. Setting h = 0 and solving gives t ≈ 4.155303 or t ≈ −0.07367. Only the positive root makes sense, so the ball lands after about 4.16 seconds. The vertex tells you it peaks after about 2.04 seconds at a height of about 21.91 m. The same kind of equation appears in area problems, profit models and physics, and the [slope calculator](https://calculatorswithsteps.com/slope-calculator) covers the straight-line case.

## Frequently asked questions

### What is the quadratic formula?

For an equation ax² + bx + c = 0 with a ≠ 0, the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. For 2x² − 4x − 6 = 0 that gives x = (4 ± 8) ÷ 4, so x = 3 or x = −1.

### What does the discriminant tell you?

The discriminant D = b² − 4ac tells you what kind of roots to expect. If D is positive there are two real roots, if D = 0 there is one repeated root, and if D is negative there are two complex roots. For x² − 6x + 9 = 0, D = 0 and the only root is x = 3.

### How do you solve a quadratic equation with imaginary roots?

Use the formula as normal and write the square root of the negative discriminant with i, where i² = −1. For x² + 2x + 5 = 0, D = −16 and √(−16) = 4i, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i.

### Can I use the quadratic formula if a = 0?

No. The formula divides by 2a, and with a = 0 the equation is linear, not quadratic. This calculator spots that case and solves bx + c = 0 instead: 2x − 6 = 0 gives x = 3.

### Can I enter fractions or decimals?

Yes. Type 1/2 or 0.5 for a. For ½x² + 3x − 4 = 0 the discriminant is 17, so the exact roots are x = −3 ± √17, which is about 1.123106 and −7.123106.

### When should I factor instead of using the formula?

Factoring is quicker when the discriminant is a perfect square, because the roots are then rational. x² − 5x + 6 = 0 has D = 1 and factors as (x − 3)(x − 2), so x = 3 or x = 2. The formula works every time, factorable or not.

### How do you find the vertex of a parabola?

The vertex is at x = −b ÷ 2a, and its y-value is c − b² ÷ 4a. For y = 2x² − 4x − 6 the vertex is (1, −8). Because a is positive the parabola opens upward, so −8 is its minimum value.

### What are the sum and product of the roots?

For ax² + bx + c = 0 the roots add up to −b ÷ a and multiply to c ÷ a (Vieta's formulas). For 2x² − 4x − 6 = 0 the sum is 2 and the product is −3, which matches the roots 3 and −1.

## Sources

- [Wikipedia – Quadratic formula](https://en.wikipedia.org/wiki/Quadratic_formula)
- [Wolfram MathWorld – Quadratic Formula](https://mathworld.wolfram.com/QuadraticFormula.html)
- [Khan Academy – Quadratic functions and equations](https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:quadratic-functions-equations)
