ToolNimba Browse

🧮 Quadratic Equation Solver

By ToolNimba Math Team · Updated 2026-06-19

Solve ax2 + bx + c = 0. Enter the coefficients below.

Root x₁
-
Root x₂
-
Discriminant (b² − 4ac)
-

Enter coefficients a, b and c to solve the equation.

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. This solver finds its roots (the values of x that make the equation true) using the quadratic formula. Enter the three coefficients a, b and c and you will see the discriminant, whether the roots are real or complex, and the answers worked out straight away, no algebra by hand required.

What is the Quadratic Formula Solver?

The quadratic formula is x = (-b ± √(b² - 4ac)) ÷ (2a). It is the general solution to every quadratic equation ax² + bx + c = 0, derived by completing the square on the standard form. The part under the square root, b² - 4ac, is called the discriminant, and it alone tells you what kind of roots you will get before you finish the arithmetic.

The sign of the discriminant splits the outcomes into three cases. If b² - 4ac is positive, the square root is a real number and the ± gives two different real roots. If it is exactly zero, both roots collapse onto the same value, so there is one repeated (or "double") root at x = -b ÷ (2a). If the discriminant is negative, the square root of a negative number is not real, so the two roots are complex conjugates: they share the same real part, -b ÷ (2a), and have equal and opposite imaginary parts, √(-(b² - 4ac)) ÷ (2a).

The coefficient a must not be zero, because if a = 0 the x² term disappears and the equation is no longer quadratic. In that case ax² + bx + c = 0 becomes the linear equation bx + c = 0, which has the single solution x = -c ÷ b. This solver detects a = 0 and switches to the linear answer rather than dividing by zero, so you still get a sensible result.

When to use it

  • Solving homework or exam problems of the form ax² + bx + c = 0 and checking your own working.
  • Finding where a parabola y = ax² + bx + c crosses the x-axis (its real roots) when graphing.
  • Determining whether an equation has real or complex solutions by reading its discriminant.
  • Computing roots in physics or engineering problems such as projectile time-of-flight or RLC circuit analysis.

How to use the Quadratic Formula Solver

  1. Enter the coefficient a, the number multiplying x² (it must not be zero for a true quadratic).
  2. Enter the coefficient b, the number multiplying x.
  3. Enter the constant term c.
  4. Read off the discriminant and the two roots, which update instantly as you type.

Formula & method

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

Worked examples

Solve x² − 5x + 6 = 0 (a = 1, b = −5, c = 6), the two-real-roots case.

  1. Discriminant D = b² − 4ac = (−5)² − 4(1)(6) = 25 − 24 = 1
  2. D is positive, so expect two distinct real roots.
  3. √D = √1 = 1
  4. x = (−b ± √D) ÷ (2a) = (5 ± 1) ÷ 2
  5. x₁ = (5 + 1) ÷ 2 = 3
  6. x₂ = (5 − 1) ÷ 2 = 2

Result: Two real roots: x = 3 and x = 2

Solve x² − 4x + 4 = 0 (a = 1, b = −4, c = 4), the repeated-root case.

  1. Discriminant D = (−4)² − 4(1)(4) = 16 − 16 = 0
  2. D is zero, so there is one repeated real root.
  3. x = −b ÷ (2a) = 4 ÷ 2 = 2

Result: One repeated root: x = 2 (the perfect square (x − 2)² = 0)

Solve x² + 2x + 5 = 0 (a = 1, b = 2, c = 5), the complex-roots case.

  1. Discriminant D = (2)² − 4(1)(5) = 4 − 20 = −16
  2. D is negative, so the roots are complex conjugates.
  3. Real part = −b ÷ (2a) = −2 ÷ 2 = −1
  4. Imaginary part = √(−D) ÷ (2a) = √16 ÷ 2 = 4 ÷ 2 = 2
  5. x = −1 ± 2i

Result: Two complex roots: x = −1 + 2i and x = −1 − 2i

How the discriminant D = b² − 4ac determines the nature of the roots

DiscriminantNumber of rootsType of roots
D > 0TwoTwo distinct real roots
D = 0OneA single repeated (double) real root
D < 0TwoTwo complex conjugate roots (a ± bi)

Worked sample equations and their solutions

Equationa, b, cDiscriminantRoots
x² − 5x + 6 = 01, −5, 61x = 3, x = 2
x² − 4x + 4 = 01, −4, 40x = 2 (repeated)
x² + 2x + 5 = 01, 2, 5−16x = −1 ± 2i
2x² − 3x − 2 = 02, −3, −225x = 2, x = −0.5

Common mistakes to avoid

  • Dropping the sign of b. The formula uses −b, so if b is negative the term becomes positive. For x² − 5x + 6, b = −5 and −b = +5. Forgetting this flips the signs of your roots.
  • Computing b² wrong when b is negative. Squaring a negative gives a positive: (−5)² = 25, not −25. A sign slip here changes the discriminant and can turn real roots into apparent complex ones.
  • Dividing only part of the numerator by 2a. The whole quantity (−b ± √D) is divided by 2a, not just the square-root part. Keep the −b inside the division: x = (−b ± √D) ÷ (2a).
  • Treating a negative discriminant as an error. D < 0 does not mean there is no answer, it means the roots are complex rather than real. The equation still has two solutions, just with imaginary parts.
  • Using the formula when a = 0. If a = 0 the equation is linear, not quadratic, and dividing by 2a would divide by zero. Solve bx + c = 0 directly: x = −c ÷ b.

Glossary

Quadratic equation
A polynomial equation of degree two, written in standard form as ax² + bx + c = 0 with a ≠ 0.
Coefficient
A number multiplying a variable term. In ax² + bx + c, a, b and c are the coefficients (c is the constant term).
Root (solution)
A value of x that makes the equation equal zero. A quadratic has up to two roots.
Discriminant
The expression b² − 4ac under the square root. Its sign reveals whether the roots are real and distinct, real and repeated, or complex.
Complex conjugate
A pair of numbers of the form p + qi and p − qi that share a real part and have opposite imaginary parts. Complex roots of a real quadratic always come as a conjugate pair.
Double root
A single root that the formula returns twice, occurring when the discriminant is exactly zero.

Frequently asked questions

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) ÷ (2a). It solves any equation in the form ax² + bx + c = 0, where a is not zero, and is derived by completing the square on the standard form.

How do I use this quadratic equation calculator?

Enter the three coefficients a, b and c from your equation ax² + bx + c = 0. The calculator computes the discriminant b² − 4ac, decides whether the roots are real or complex, and displays both roots instantly as you type.

What does the discriminant tell me?

The discriminant D = b² − 4ac reveals the nature of the roots before you finish solving. If D is positive there are two distinct real roots, if D is zero there is one repeated real root, and if D is negative the two roots are complex conjugates.

What happens if the discriminant is negative?

A negative discriminant means the square root is of a negative number, so the roots are complex rather than real. They take the form p ± qi, sharing a real part −b ÷ (2a) and having imaginary parts ±√(−D) ÷ (2a). The equation still has two solutions.

Can a quadratic have only one solution?

Yes. When the discriminant is exactly zero, both roots fall on the same value, x = −b ÷ (2a). This is called a repeated or double root, and the quadratic is a perfect square such as (x − 2)² = 0.

What if a is zero?

If a = 0 the x² term disappears and the equation is no longer quadratic, it is linear: bx + c = 0. This solver detects that case and returns the single solution x = −c ÷ b instead of trying to apply the quadratic formula.