In short
A quadratic equation ax² + bx + c = 0 has solutions x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the square root, b² − 4ac, is the discriminant. If it is positive there are two real solutions, if it is zero there is one, and if it is negative there are two complex solutions. Enter a, b and c, with signs.
How it works
x = (−b ± √(b² − 4ac)) ÷ 2a
b² − 4ac > 0: two real solutions b² − 4ac = 0: one real solution b² − 4ac < 0: two complex solutions
Write the equation as ax² + bx + c = 0 first, moving every term to one side. When the discriminant is a perfect square the solutions are fractions; otherwise the square root is simplified, so √12 becomes 2√3. For decimals the calculator uses a rearranged formula that avoids losing digits when b is much larger than a and c.
Worked examples
Solve 2x² + 9x − 5 = 0
The discriminant is 81 + 40 = 121 = 11², so x = (−9 ± 11) ÷ 4 = 1/2 or −5, as in OpenStax Intermediate Algebra Example 9.21.
Solve 2x² + 10x + 11 = 0
b² − 4ac = 100 − 88 = 12, and √12 = 2√3, so x = (−5 ± √3)/2 (Example 9.23), about −1.633974596 or −3.366025404.
Solve 3p² + 2p + 9 = 0
The discriminant is 4 − 108 = −104, so the solutions are complex: (−1 ± i√26)/3, which Example 9.24 writes as −1/3 ± (√26/3)i.
Using this calculator well
- Get the signs right. For x² − 6x = −5, rewrite as x² − 6x + 5 = 0, so a = 1, b = −6 and c = 5.
- Check by substituting. Put each solution back into ax² + bx + c; the result should be 0, or very close for rounded decimals.
- Factoring is faster when the discriminant is a perfect square, because the equation then factors over the integers.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0 with a not zero, x = (−b ± √(b² − 4ac)) ÷ 2a. The ± gives two solutions, one adding the square root and one subtracting it. It works for every quadratic, including ones that cannot be factored.
What does the discriminant tell you?
The discriminant b² − 4ac says how many real solutions there are. Positive means two, zero means one repeated solution, and negative means none that are real, only two complex ones. A positive perfect square means the solutions are rational.
What are complex solutions?
When the discriminant is negative, its square root is imaginary, written with i, where i² = −1. The solutions come as a pair a + bi and a − bi. On a graph, the parabola never crosses the x-axis.
What if a is zero?
Then there is no x² term and the equation is linear, bx + c = 0, with the single solution x = −c ÷ b. The calculator solves it that way and says so, because the quadratic formula would divide by zero.
Sources and methodology
- Intermediate Algebra 2e, 9.3 Solve Quadratic Equations Using the Quadratic Formula, OpenStax, Rice University, x = (−b ± √(b² − 4ac)) ÷ 2a; Example 9.21: 2x² + 9x − 5 = 0 → 1/2, −5; Example 9.23: (−5 ± √3)/2; Example 9.24: −1/3 ± (√26/3)i; Example 9.27: 5/2 (double); Example 9.28: discriminants 157, −79, 0 (accessed November 24, 2026)
- College Algebra 2e, 2.5 Quadratic Equations, OpenStax, Rice University, Example 9: x² + 5x + 1 = 0 → (−5 ± √21)/2; Example 10: x² + x + 2 = 0 → (−1 ± i√7)/2; Example 11 and Table 1: discriminant 0, 100, 49, −80 and what each means (accessed November 24, 2026)
Rounding: Decimals are shown to 10 significant digits. The exact form is given when a, b and c are whole numbers.
Review status: formulas verified against the cited sources by automated tests; editorial review pending. Version 1.0.0, content updated November 24, 2026.
Changelog
- 1.0.0 · November 24, 2026: First published.
How we build and test calculators
Embed this calculator on your site
Paste this code into your page. The calculator runs in a frame, with no tracking and no cookies, and links back here for the formula and sources.
<iframe src="https://northcalculator.com/embed/en/quadratic" title="Quadratic Formula Calculator" width="100%" height="760" style="border:0" loading="lazy"></iframe>