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.
By the Calculators With Steps team · Updated November 10, 2026 · How we check our math
- Discriminant (b² − 4ac)
- 64Perfect square: two rational roots
- Factored form
- 2(x − 3)(x + 1)
- Vertex (h, k)
- (1, -8)Minimum point; parabola opens up
- Axis of symmetry
- x = 1
- y-intercept
- (0, -6)
- Sum of roots (−b/a)
- 2
- Product of roots (c/a)
- -3
Step-by-step working
- Write the equation in standard form ax² + bx + c = 0: 2x² − 4x − 6 = 0, so a = 2, b = -4, c = -6.
- Discriminant: D = b² − 4ac = (-4)² − 4 × 2 × (-6) = 16 − (-48) = 64
- D > 0 and 64 is a perfect square, so there are two rational roots.
- Quadratic formula: x = (−b ± √D) / 2a = (4 ± √64) / 4
- √64 = 8
- x₁ = (4 + 8) / 4 = 3
- x₂ = (4 − 8) / 4 = -1
- Vertex: h = −b / 2a = 4 / 4 = 1; k = c − b² / 4a = -8, so the vertex is (1, -8).
- Factored form: 2(x − 3)(x + 1) = 0
How to use the quadratic formula calculator
- Rearrange your equation so one side is zero: ax² + bx + c = 0. For example, 2x² = 4x + 6 becomes 2x² − 4x − 6 = 0.
- 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.
- 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 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 covers the straight-line case.
Quadratic Formula Calculator: 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.
How we checked this page: every figure in the examples and FAQs above is produced by this calculator and verified by automated tests against known answers, and the rules and rates come from the sources below. Last updated . Spotted a problem? Tell us.
Sources and further reading