Quadratic Equation Calculator

This quadratic equation calculator puts your equation in standard form, checks the discriminant, then solves by factoring when it can and with the quadratic formula when it must, giving exact and decimal roots.

Tip: drag a photo here or paste a screenshot (Ctrl+V)
How are solve allowances used?

Math, physics, chemistry and all AI tools share your plan allowance.

Each successful standard AI submission uses one standard solve. Deep reasoning uses one deep solve instead. Both count toward the daily solve limit.

Photos and selected PDF pages also use one daily photo solve per submission. Uploading a file or selecting a page does not start a solve. PDF upload requires Plus or Pro.

Local calculations, worked examples, hints, copying answers and cached answers use no solves.

Technical failures return the reserved solve. An automatic retry is included in the same submission. A new successful AI submission counts again, even if it follows an earlier answer.

Try:

Worked example

Step-by-step solution

2x2−5x−3=02x^2 - 5x - 3 = 0

Step 1 / 4

Identify a, b and c

The equation is already in standard form.

a=2,  b=−5,  c=−3a = 2,\; b = -5,\; c = -3

How to use the Quadratic Equation Calculator

  1. Type the equation, for example 2x² − 5x − 3 = 0 (use ^ for powers: 2x^2).
  2. Press Solve it. The calculator rewrites it as ax² + bx + c = 0 and reads off a, b and c.
  3. Follow the discriminant step to see how many real roots there are.
  4. Use the exact roots for homework and the decimals to check a graph.

The quadratic formula and the discriminant

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Every quadratic equation ax² + bx + c = 0 with a ≠ 0 can be solved with the quadratic formula. The expression under the square root, b² − 4ac, is the discriminant: positive means two real roots, zero means one repeated root, and negative means two complex roots.

When the discriminant is a perfect square the quadratic factors over the integers, and factoring is usually the faster method taught in class. The calculator uses factoring in that case and the formula otherwise.

Quadratic formula vs factoring vs completing the square

Δ=b2−4ac:Δ>0 two real roots,Δ=0 one repeated root,Δ<0 two complex roots\Delta = b^2 - 4ac:\qquad \Delta > 0 \text{ two real roots},\quad \Delta = 0 \text{ one repeated root},\quad \Delta < 0 \text{ two complex roots}

All three methods give the same roots, so the choice is about speed. Compute the discriminant first. For 2x² − 7x + 3 = 0 it is 49 − 24 = 25, a positive perfect square, so the roots are rational and factoring is fastest: (2x − 1)(x − 3) = 0 gives x = 1/2 and x = 3. For 4x² − 12x + 9 = 0 the discriminant is 144 − 144 = 0, which signals a perfect square: (2x − 3)² = 0 has the single repeated root x = 3/2.

When the discriminant is positive but not a perfect square, the roots are irrational and factoring over the integers fails. Completing the square is neat when a = 1 and b is even: x² + 6x + 2 = 0 becomes (x + 3)² = 7, so x = −3 ± √7. In every other case, and always when the discriminant is negative, use the quadratic formula. For 2x² + 2x + 5 = 0 the discriminant is 4 − 40 = −36, so x = (−2 ± 6i)/4 = −1/2 ± (3/2)i.

Quadratic formula calculator: three worked examples

3x2+5x−2=0:x=−5±25+246=−5±76,x=13 or x=−23x^2 + 5x - 2 = 0:\quad x = \frac{-5 \pm \sqrt{25 + 24}}{6} = \frac{-5 \pm 7}{6},\qquad x = \tfrac{1}{3} \text{ or } x = -2

Leading coefficient not 1: in 3x² + 5x − 2 = 0, a = 3, b = 5 and c = −2. The discriminant is 25 − 4 · 3 · (−2) = 49, and the denominator is 2a = 6, not 2. The roots are (−5 + 7)/6 = 1/3 and (−5 − 7)/6 = −2. Two rational roots mean the quadratic also factors, as (3x − 1)(x + 2).

Fraction coefficients: for ½x² − (3/2)x − 1 = 0, multiply every term by 2 first to get x² − 3x − 2 = 0. Clearing fractions does not change the roots. Now a = 1, b = −3, c = −2, the discriminant is 9 + 8 = 17, and x = (3 ± √17)/2. Keep that exact form for homework; the decimals x ≈ 3.562 and x ≈ −0.562 show where the parabola crosses the x-axis.

No real roots: for x² − 4x + 13 = 0 the discriminant is 16 − 52 = −36. The square root of −36 is 6i, so x = (4 ± 6i)/2 = 2 ± 3i. Read this result as "the parabola never touches the x-axis". Its vertex is at (2, 9), above the axis, and the graph opens upward.

Check your roots by substitution

x1+x2=−ba,x1x2=cax_1 + x_2 = -\frac{b}{a},\qquad x_1 x_2 = \frac{c}{a}

Put each root back into the original equation, not into a rearranged copy. For 3x² + 5x − 2 = 0 and x = −2: 3 · 4 + 5 · (−2) − 2 = 12 − 10 − 2 = 0. For x = 1/3: 3 · (1/9) + 5/3 − 2 = 1/3 + 5/3 − 2 = 0. Both sides agree, so both roots are right.

A faster check uses the sum and product of the roots. The two roots must add to −b/a and multiply to c/a. Here 1/3 + (−2) = −5/3, which equals −b/a, and (1/3)(−2) = −2/3, which equals c/a. The same check works for complex roots: 2 + 3i and 2 − 3i add to 4 and multiply to 4 + 9 = 13, matching x² − 4x + 13 = 0.

Common mistakes with the quadratic formula

The most common mistake is a sign error in the discriminant. When c is negative, −4ac becomes positive: for 3x² + 5x − 2 = 0 it is 25 + 24 = 49, not 25 − 24 = 1. When b is negative, b² is still positive and −b is positive: in x² − 3x − 2 = 0, b² = 9 and −b = 3. The second mistake is dividing only part of the numerator. The whole expression −b ± √(b² − 4ac) sits over 2a, so (−5 ± 7)/6 is correct and −5 ± 7/6 is not.

Other slips are dropping the ± and reporting one root, and reading a, b and c before the equation equals zero. Rewrite x² = 3x + 10 as x² − 3x − 10 = 0 first; then a = 1, b = −3, c = −10 and the roots are 5 and −2. Finally, never divide both sides by x. Doing that to x² = 5x gives only x = 5 and loses the root x = 0.

Frequently asked questions

When should I factor instead of using the quadratic formula?

Factor when the discriminant b² − 4ac is a perfect square; the roots are then rational. Otherwise use the quadratic formula, which always works.

Can the calculator give complex roots?

Yes. When the discriminant is negative the roots are written as a ± bi, for example x² + 2x + 5 = 0 has roots −1 ± 2i.

Does the equation have to equal zero?

No. Enter it in any form, such as x² = 3x + 10; the first step moves every term to one side.

Have a different kind of math problem? Try the free math solver. Use the subject menu for physics and chemistry.