ToCalculator
Math

Quadratic Equation Calculator

Quadratic equation calculator: solve ax² + bx + c = 0 for real or complex roots, with the discriminant.

Editorial review: Farrow (pseudonym; identity and professional credentials are not disclosed). This page is for educational purposes, not professional advice.

Your inputs

Results update as you type. Nothing you enter leaves your device.

Results

Roots
2, 1
Discriminant
1

Example with the starting values

These results use the calculator's initial inputs. Change the values above to calculate your own estimate.

Inputs

a
1
b
-3
c
2

Results

Roots
2, 1
Discriminant
1

How does the Quadratic Equation Calculator work?

A quadratic equation is a polynomial equation of the form ax² + bx + c = 0 with a not equal to 0. Its roots come from the quadratic formula x = (−b ± √(b² − 4ac)) / 2a.

The discriminant b² − 4ac decides the roots: positive gives two real roots, zero gives one repeated root, and negative gives two complex roots. For example, x² − 3x + 2 = 0 has discriminant 1 and roots 2 and 1.

Frequently asked questions

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) / 2a. For 2x² + 4x − 6 = 0, x = (−4 ± √64) / 4, so x = 1 or x = −3.

How do I solve a quadratic equation by factoring?

Write it as a product of two binomials and set each to zero. x² − 5x + 6 = (x − 2)(x − 3), so x = 2 or x = 3.

What if a is 0?

Then the equation is linear, bx + c = 0, with the single root x = −c / b. For 4x − 8 = 0, x = 2. The calculator handles this case automatically.

What does the discriminant tell me?

If it is positive there are two real roots, if it is zero there is one repeated root, and if it is negative there are two complex roots.

Related calculators

All math calculators