Quadratic Formula
ax² + bx + c = 0
Stuck on an equation like 2x² + 4x − 6 = 0? This quadratic formula calculator solves any equation in the form ax² + bx + c = 0.
Enter the three numbers a, b and c, press Calculate, and you get both roots, whether they’re two different real numbers, one repeated number or a pair of complex numbers.
Below the calculator you’ll find the formula itself, how to read the discriminant, fully worked examples and a few tricks for checking your answers, so you can learn the method rather than just copy the result.
What Is a Quadratic Equation?
A quadratic equation is any equation where the highest power of x is 2. Its standard form is:
ax² + bx + c = 0
Here a, b and c are numbers (the coefficients) and a can’t be zero. If a were zero, the x² term would disappear and you’d have a straight-line equation instead.
The name comes from the Latin quadratus, meaning “square”, because x is squared.
If your equation isn’t in standard form yet, move everything to one side first. For example, 3x² = 5x − 2 becomes 3x² − 5x + 2 = 0, so a = 3, b = −5 and c = 2.
The Quadratic Formula
x = (−b ± √(b² − 4ac)) ÷ 2a
The ± sign means you calculate it twice: once adding the square root and once subtracting it. That’s why a quadratic usually has two answers, called roots or solutions.
The formula comes from “completing the square” on the general equation, and it works for every quadratic, even ones that can’t be factorised.
The Discriminant: What Kind of Answer to Expect
The part under the square root, b² − 4ac, is called the discriminant. Working it out first tells you what type of roots you’ll get:
| Discriminant | Roots | On a graph |
|---|---|---|
| Positive (> 0) | Two different real roots | The curve crosses the x-axis twice |
| Zero (= 0) | One repeated real root | The curve just touches the x-axis |
| Negative (< 0) | Two complex roots | The curve never reaches the x-axis |
If the discriminant is a perfect square, like 1, 4, 9 or 25, the roots are whole numbers or simple fractions. That’s a hint the equation could also be solved by factorising.
Worked Examples
Two real roots: x² − 5x + 6 = 0
a = 1, b = −5, c = 6.
Discriminant = (−5)² − 4(1)(6) = 25 − 24 = 1.
x = (5 ± 1) ÷ 2, so x = 3 or x = 2.
Check: 3² − 5(3) + 6 = 9 − 15 + 6 = 0 ✓
One repeated root: x² + 6x + 9 = 0
Discriminant = 36 − 36 = 0, so there’s one answer: x = −6 ÷ 2 = −3. This equation is really (x + 3)² = 0.
Complex roots: 2x² + 4x + 5 = 0
Discriminant = 16 − 40 = −24.
You can’t take the square root of a negative number in real numbers, so we use i, where i² = −1.
√(−24) = 2√6 i ≈ 4.899i.
x = (−4 ± 4.899i) ÷ 4, so x ≈ −1 + 1.225i and x ≈ −1 − 1.225i.
A real-world problem: throwing a ball
A ball is thrown upwards from 2 m above the ground at 14.7 m/s. Its height after t seconds is h = −4.9t² + 14.7t + 2. When does it land?
Set h = 0: −4.9t² + 14.7t + 2 = 0, so a = −4.9, b = 14.7, c = 2.
Discriminant = 14.7² − 4(−4.9)(2) = 216.09 + 39.2 = 255.29, and √255.29 ≈ 15.978.
t = (−14.7 ± 15.978) ÷ (−9.8), giving t ≈ 3.13 or t ≈ −0.13.
Time can’t be negative, so the ball lands after about 3.13 seconds. Choosing the answer that makes sense is just as important as the maths.
Other Ways to Solve a Quadratic
- Factorising: quickest when it works. Find two numbers that multiply to ac and add to b.
- Completing the square: rewrite the equation as (x + p)² = q. It’s also how you find the turning point.
- Graphing: the roots are where the parabola y = ax² + bx + c crosses the x-axis.
- The quadratic formula: always works, which makes it the safest choice in an exam when factorising isn’t obvious.
Quick Ways to Check Your Answer
- Substitute it back. Put each root into the original equation. You should get 0, or very close with decimals.
- Sum of the roots = −b ÷ a. In the first example, 3 + 2 = 5 = −(−5) ÷ 1 ✓
- Product of the roots = c ÷ a. 3 × 2 = 6 = 6 ÷ 1 ✓
- Turning point: the parabola’s vertex is at x = −b ÷ 2a, exactly halfway between the two roots.
Frequently Asked Questions
What if b or c is zero?
The formula still works. Just enter 0. For x² − 9 = 0 (b = 0), the roots are ±3. For x² − 4x = 0 (c = 0), the roots are 0 and 4.
Can a be negative?
Yes. A negative a just means the parabola opens downwards, like the ball example.
Can I enter decimals or fractions?
Yes. Enter decimals directly. For a fraction such as ½, type 0.5.
Why does my answer include “i”?
The discriminant was negative, so the roots are complex numbers. In GCSE-level work this usually means “no real solutions”.
Working through algebra or statistics? Try the Square Root Calculator, Derivative Calculator, Slope Calculator and Fraction Calculator.
Related Calculators
More free tools from our Math Calculators collection:
Link to this calculator
Teacher, blogger or student? Share this free Quadratic Formula Calculator with your readers or class by pasting this code into your website:

About the author
Tahir Mehmood
Tahir Mehmood is the founder of Digital Designs SEO LTD, a UK company, with five years of hands-on experience in SEO, content writing and web development. He builds and maintains the calculators on All in Calculators and keeps them up to date. Spotted an error? Contact us and we will fix it.
Last updated: 27 November 2026