Solve any quadratic equation ax² + bx + c = 0. You get exact roots (like (5 ± √13)/6), complex roots, the discriminant, the vertex and the factored form, with every step.
The quadratic formula
Any equation of the form ax² + bx + c = 0, with a not 0, has the solutions
x = (−b ± √(b² − 4ac)) ÷ 2a
Discriminant: D = b² − 4ac
- D > 0: two different real roots. If D is a perfect square (and a, b, c are whole numbers), the roots are fractions and the equation factors.
- D = 0: one repeated root, x = −b ÷ 2a. The parabola just touches the x-axis.
- D < 0: no real roots. The two roots are complex numbers, −b ÷ 2a ± (√(−D) ÷ 2a)i.
The calculator also gives the vertex, the turning point of the parabola y = ax² + bx + c:
h = −b ÷ 2a · k = c − b² ÷ 4a · vertex = (h, k)
Sum of the roots = −b ÷ a · product of the roots = c ÷ a
Square roots are simplified, so √8 becomes 2√2, and the whole answer is reduced. That's how x = (2 ± 2√2) ÷ 2 becomes x = 1 ± √2.
Worked examples
Two rational roots. For 2x² + 3x − 2 = 0, a = 2, b = 3 and c = −2. The discriminant is 3² − 4 × 2 × (−2) = 9 + 16 = 25, and √25 = 5. So x = (−3 ± 5) ÷ 4, which gives x = 2 ÷ 4 = 1/2 or x = −8 ÷ 4 = −2. Because the roots are rational, it factors: (x + 2)(2x − 1) = 0. The vertex is at h = −3 ÷ 4 = −0.75 and k = −2 − 9 ÷ 8 = −3.125.
Irrational roots. For 3x² − 5x + 1 = 0, D = 25 − 12 = 13, which isn't a perfect square. So x = (5 ± √13) ÷ 6, about 1.434258546 and 0.2324081208.
Complex roots. For x² + 2x + 5 = 0, D = 4 − 20 = −16. √−16 = 4i, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i.
Getting a realistic answer
- Move everything to one side first. For 2x² = 3 − x, rewrite it as 2x² + x − 3 = 0, then enter a = 2, b = 1, c = −3.
- If there's no x term or no number term, enter 0 for b or c.
- In a word problem, a negative or complex root often has no real meaning, like a negative time or length. Keep the root that fits the situation.
- Decimal answers are rounded to 10 significant figures. The exact form above them is the precise answer.
- If a = 0 the equation is linear, not quadratic. The calculator solves it as bx + c = 0 and says so.
Want the derivation? Read the quadratic formula guide. To solve other kinds of equations, use the equation solver.
Sources
How we checked this
Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:
- x² − 5x + 6 = 0 gives x = 2 or x = 3 ✓
- x² − 5x + 6 = 0 has its vertex at (2.5, −0.25) ✓
- 2x² + 3x − 2 = 0 factors as (x + 2)(2x − 1) ✓
- 3x² − 5x + 1 = 0 gives x = (5 ± √13)/6 ✓
- x² − 2x − 1 = 0 simplifies to x = 1 ± √2 ✓
- x² + 2x + 5 = 0 has complex roots x = −1 ± 2i ✓
- Edge: x² − 6x + 9 = 0 has one double root, x = 3 ✓
- Decimals: 0.5x² − 1.5x + 1 = 0 gives x = 1 or x = 2 ✓
- Edge: a = 0 is solved as the linear equation 2x − 3 = 0 ✓
Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.
Questions people ask
How do you solve a quadratic equation?
Write it as ax² + bx + c = 0 and use x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 5x + 6 = 0 that's (5 ± √1) ÷ 2, so x = 3 or x = 2. You can also factor, complete the square or graph it.
What does the discriminant tell you?
D = b² − 4ac tells you how many real roots there are. Positive means two real roots, zero means one repeated root, and negative means no real roots (two complex ones).
Can every quadratic be factored?
Every quadratic can be written as a(x − r₁)(x − r₂) using its roots. It factors neatly with whole numbers only when the discriminant is a perfect square and a, b and c are whole numbers.
How do I find the vertex of a parabola?
The x-coordinate is −b ÷ 2a. Put it back into the equation to get the y-coordinate, or use k = c − b² ÷ 4a. For y = x² − 5x + 6, the vertex is (2.5, −0.25).
What if the discriminant is negative?
Then the parabola never crosses the x-axis and there's no real solution. The roots are complex: for x² + 2x + 5 = 0 they are −1 + 2i and −1 − 2i.