Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

Quadratic formula calculator, exact roots, with steps.

Type a, b and c, or the whole equation like 2x^2 + 3x = 5, to solve it with the quadratic formula. You get both roots as exact answers, with decimals, the discriminant and what it says, the vertex, the sum and product of the roots, a factored form when it exists and a graph. Complex roots work too, the steps show the formula with your numbers in it, and the same equation is also worked by completing the square and, when the roots are rational, by factoring.

Need a custom tool, app or website? Contact us 

How to enter it

ax² + bx + c = 0

Use ^ for powers, like x^2, or paste x². Terms and brackets can be on both sides, like (x + 3)(x − 2) = 14, and fractions like 1/2 work. Another single letter such as t or y is read as x.

Whole numbers, decimals and fractions all work.

Examples (fills a, b and c)

Worked out in your browser. Nothing is sent anywhere.

Guide

How to use the quadratic formula, with worked examples.

The quadratic formula solves any equation of the form ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) ÷ 2a. This quadratic formula calculator takes a, b and c, or the whole equation typed as you would write it, and gives both roots as exact answers (fractions and simplified square roots, or complex numbers), the discriminant and what it means, the vertex, a factored form when one exists, a graph and the formula worked with your numbers.

How to use the quadratic formula calculator

  1. Choose Type a, b and c and fill in the three boxes, or choose Type the equation and write something like 2x^2 + 3x = 5.
  2. Read the big cards: the two roots, with decimals. A single card means the root is repeated, and a card with i in it means the roots are complex.
  3. The cards below show the discriminant, the vertex, the axis of symmetry, the sum and product of the roots, the y-intercept and the factored form.
  4. Open Steps to see the discriminant, the numbers put into the formula, the simplified root and a check. Under the answer, two closed boxes show the same equation by completing the square and by factoring. Copy result copies a line with the answer, and Copy link copies a link that opens the same numbers.

What the discriminant tells you

The part under the root, D = b² − 4ac, decides the kind of answer. If D is positive there are two real roots, and the parabola crosses the x axis twice. If D is 0 there is one repeated root, and the parabola just touches the axis. If D is negative the roots are complex numbers and the parabola stays above or below the axis. When D is also a perfect square (1, 4, 9, 49 and so on) the roots are rational and the quadratic factors.

Worked example: rational roots

Solve 2x² + 3x − 5 = 0. Here a = 2, b = 3, c = −5, so D = 3² − 4 × 2 × (−5) = 9 + 40 = 49 and √49 = 7. Then x = (−3 ± 7) ÷ 4, which gives x = 4 ÷ 4 = 1 and x = −10 ÷ 4 = −5/2. The factored form is 2(x − 1)(x + 5/2). Check x = 1: 2 + 3 − 5 = 0.

Worked example: roots with a square root

Solve x² + 6x + 7 = 0. D = 36 − 28 = 8 and √8 = 2√2, so x = (−6 ± 2√2) ÷ 2 = −3 ± √2. As decimals that is −1.5858 and −4.4142. The calculator simplifies the root and then cancels the common factor of 2, so you see the shortest exact form.

Worked example: complex roots

Solve x² + 2x + 5 = 0. D = 4 − 20 = −16, and √−16 = 4i, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i. The graph never touches the x axis. The sum of the roots is −2, which equals −b ÷ a, and the product is 5, which equals c ÷ a. Those two rules hold for complex roots too.

The same equation by completing the square and by factoring

Below the answer cards, open The same equation by completing the square to see another route to the same roots. For 2x² + 3x − 5 = 0 it divides by 2 to get x² + 3/2 x − 5/2 = 0, moves the number across to get x² + 3/2 x = 5/2, adds the square of half of 3/2, which is 9/16, to both sides to get (x + 3/4)² = 49/16, and then takes the square root: x + 3/4 = ±7/4, so x = 1 or x = −5/2. The same equation by factoring appears when the roots are rational. It multiplies a × c = 2 × (−5) = −10, finds the two numbers that multiply to −10 and add to 3 (they are 5 and −2), splits 3x into 5x − 2x, groups 2x² + 5x − 2x − 5 = x(2x + 5) − (2x + 5) = (x − 1)(2x + 5), and reads the roots from the brackets. When the roots are irrational or complex, factoring with whole numbers does not work, and the page says so; the formula and completing the square still do.

Equations that are not in standard form

Type 2x^2 + 3x = 5 and the calculator moves everything to one side: 2x² + 3x − 5 = 0. A missing term just means that coefficient is 0: 3x² − 2 = 0 has b = 0 and gives x = ±√6 ÷ 3. If a is 0 the equation is not quadratic at all, and the page says so and gives the single answer x = −c ÷ b of the straight-line equation. Brackets are multiplied out for you, so (x + 3)(x − 2) = 14 becomes x² + x − 20 = 0 with roots −5 and 4. The page also accepts x² pasted from a document, and a single other letter such as t is read as x.

Common problems

  • Sign slips on b. The formula starts with −b. If b = −5 then −b = 5. The steps show the sign you used.
  • Dividing only part of the top. The ÷ 2a divides the whole numerator, so (−6 ± 2√2) ÷ 2 becomes −3 ± √2, not −6 ± √2.
  • A negative discriminant on a real world problem. It means the situation never happens, for example a ball that never reaches a given height.

To rewrite a quadratic as a(x − h)² + k, use the . To plot the parabola with other functions, use the graphing calculator. To find factors of a whole number, see the factor calculator.

Questions

Good to know.

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ 2a. It gives the solutions of ax² + bx + c = 0 for any a that is not 0.

What does the discriminant mean?

It is b² − 4ac. Positive means two real roots, zero means one repeated root, and negative means two complex roots.

How do I solve a quadratic equation with the formula?

Write it as ax² + bx + c = 0, read a, b and c with their signs, work out the discriminant, put everything into the formula, and simplify both answers.

Why do I get an answer with i?

The discriminant is negative, so the square root is of a negative number. The result is a complex number, written with i, where i² = −1.

Can the formula solve any quadratic?

Yes. Factoring is quicker for simple ones, but the formula always works, including when the roots are irrational or complex.

What if a is 0?

Then there is no x² term and the equation is linear. It has one solution, x = −c ÷ b, and is not a quadratic. The page shows that answer instead of an error.

Can it solve by completing the square or by factoring?

Yes. Under the answer you can open the same equation worked by completing the square, and by factoring when the roots are rational numbers.

Can I type the equation with brackets?

Yes. Choose Type the equation and write something like (x + 3)(x − 2) = 14 or x(x + 4) = 21. Everything is multiplied out and moved to one side first.

What is a double root?

When the discriminant is 0 both roots are the same number, −b ÷ 2a. The parabola touches the x axis at one point, its vertex.

Does it show the steps?

Yes. Open Steps to see the discriminant, the formula with your numbers, the simplified square root and a check for exact roots.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch