Quadratic Equation Solver

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. It appears in physics, geometry, finance and school exams. Enter the three coefficients and the solver gives you the roots, the discriminant and the type of roots, so you can check your own working or get a quick answer.

Rootsx₁ = 3, x₂ = 2
Discriminant (b² − 4ac)
1
Nature of roots
Two different real roots

How to use the Quadratic Equation Solver

  1. Write your equation in the standard form ax² + bx + c = 0.
  2. Enter a, b and c. Use a minus sign for negative values and 0 if a term is missing.
  3. Read the roots and the discriminant.
  4. Substitute a root back into the equation if you want to check it.

Formula used

x = (−b ± √(b² − 4ac)) ÷ 2a. The discriminant D = b² − 4ac decides the roots: D > 0 gives two real roots, D = 0 gives one repeated root and D < 0 gives two complex roots.

Worked example

Here is the Quadratic Equation Solver worked through with the example values shown above, so you can check each step by hand.

Inputs
a (coefficient of x²)1
b (coefficient of x)-5
c (constant)6
Result
Rootsx₁ = 3, x₂ = 2
Discriminant (b² − 4ac)1
Nature of rootsTwo different real roots

The quadratic formula

The roots are x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the root, D = b² − 4ac, is called the discriminant. For x² − 5x + 6 = 0 we have a = 1, b = −5 and c = 6, so D = 25 − 24 = 1. The roots are (5 + 1) ÷ 2 = 3 and (5 − 1) ÷ 2 = 2, which the solver shows as x₁ = 3, x₂ = 2.

You can check: 3² − 5 × 3 + 6 = 9 − 15 + 6 = 0, and 2² − 5 × 2 + 6 = 4 − 10 + 6 = 0.

What the discriminant tells you

If D is positive, there are two different real roots. If D is zero, there is one repeated root. If D is negative, there are no real roots and the two roots are complex numbers. For x² − 4x + 4 = 0, D = 0 and the root is x = 2 (repeated). For x² + 2x + 5 = 0, D = -16 and the roots are -1 ± 2i.

In graph terms, a positive D means the parabola crosses the x-axis twice, zero means it touches it once, and negative means it never reaches it.

Where quadratics appear

A ball thrown upwards follows a quadratic path, so you can solve for the time it hits the ground. A rectangle with a fixed perimeter and area leads to a quadratic for its sides: a rectangle with area 35 and a perimeter of 24 has sides that solve x² − 12x + 35 = 0, which gives x₁ = 7, x₂ = 5.

In finance, break-even and compound interest problems sometimes reduce to a quadratic, and in exams the topic is a regular source of marks.

Common mistakes

The most frequent mistake is a sign error when b is negative. In the formula, −b becomes positive when b is negative. Another is forgetting to move all terms to one side, so that the right side equals zero, before reading off a, b and c.

If a is zero, the equation is linear and the calculator asks for a non-zero a. Roots are shown to up to eight significant digits.

Frequently asked questions

What is a quadratic equation?

An equation of the form ax² + bx + c = 0 with a not equal to zero.

What is the discriminant?

D = b² − 4ac. Its sign tells you whether the roots are real and different, real and equal, or complex.

What are complex roots?

When D is negative, the roots involve the square root of a negative number and are written with i, where i² = −1.

Can a be zero?

No. If a is zero, the equation is linear and has only one root.

How do I solve by factoring?

Find two numbers that multiply to a × c and add to b, then split the middle term and factor. This calculator uses the formula, which works for every case.

Are the answers exact?

They are rounded to eight significant digits. Roots like √2 will appear as decimals.

This calculator gives estimates for information only. Actual figures from a bank, employer, tax authority or doctor may differ. It is not financial, tax, legal or medical advice.