Quadratic Formula Calculator
Enter the coefficients a, b, and c and get both real roots of ax² + bx + c = 0 — plus the discriminant that reveals whether the equation has two, one, or no real solutions.
Roots and discriminant together
Enter a, b, and c and the calculator returns both roots of ax² + bx + c = 0 along with the discriminant b² − 4ac that classifies them.
a cannot be zero
The leading coefficient a must be non-zero — otherwise the equation is linear, not quadratic, and the formula does not apply.
What is the quadratic formula?
One formula for every quadratic
The quadratic formula solves any equation of the form ax² + bx + c = 0, where a, b, and c are numbers and a is not zero. It gives the values of x that make the expression equal to zero — the points where the parabola crosses the x-axis. The calculator turns the three coefficients into both roots and the discriminant, the quantity b² − 4ac sitting under the square root. Because the formula works for every quadratic, it succeeds where factoring stalls: messy decimals, large numbers, and equations that have no neat factors all yield to it instantly.
Enter a, b, and c to get both real roots of ax² + bx + c = 0 and the discriminant that tells you how many there are.
The roots come from the quadratic formula, and the discriminant is the part under the square root that decides how many real roots there are.
x = (−b ± √(b² − 4ac)) ÷ 2aFirst compute the discriminant D = b² − 4ac. If D is positive there are two distinct real roots; if D is zero the two roots collapse into one repeated value; if D is negative the square root has no real value and there are no real roots. The plus and minus signs in the formula give root x₁ and root x₂ respectively.
Suppose you want to solve x² − 5x + 6 = 0, so a = 1, b = −5, and c = 6.
Compute the discriminant
D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1 — positive, so expect two real roots.
Take the square root
√1 = 1, and −b = 5, with the denominator 2a = 2.
Apply both signs
x₁ = (5 + 1) ÷ 2 = 3 and x₂ = (5 − 1) ÷ 2 = 2. The two roots are x = 2 and x = 3.
The calculator hands back three numbers, and each answers a different question. The discriminant comes first because its sign sets the scene: a positive discriminant (1 in the example above) means the parabola crosses the x-axis twice, so you get two distinct real roots; a discriminant of exactly zero means the parabola just touches the axis, giving a single repeated root where x₁ and x₂ are equal; and a negative discriminant means the parabola never reaches the axis, so there are no real roots at all. The two roots, x₁ and x₂, are simply the x-values where ax² + bx + c equals zero — read them as the solutions to your equation. For x² − 5x + 6 = 0 the roots are 2 and 3, which you can verify by substituting each back in. Note that this tool reports real roots only: when the discriminant is negative the true solutions are a pair of complex conjugates, and the calculator returns no real roots rather than an approximation.
The formula is exact, but a couple of practical points are worth keeping in mind.
Real roots only and a must be non-zero
This calculator returns real roots only. When the discriminant is negative the equation has two complex solutions, which the tool reports as no real roots rather than displaying. The leading coefficient a must not be zero — a zero makes the equation linear (bx + c = 0), not quadratic, and the formula no longer applies. Enter each coefficient with its correct sign, since a misplaced minus changes the roots entirely.