This free online quadratic formula calculator solves any equation of the form ax² + bx + c = 0 for x. Enter the coefficients a, b, and c to instantly get the real or complex roots, worked out with the quadratic formula.
How to Use the Quadratic Formula Calculator
Enter the coefficient of x² in field "a".
Enter the coefficient of x in field "b".
Enter the constant term in field "c".
Click "Calculate" to see the roots (solutions) of the equation.
The Discriminant Decides the Type of Roots
Before applying the formula, the calculator works out the discriminant D = b² − 4ac. Its sign tells you what kind of answer to expect:
Equation
D
Type of roots
Calculator output
2x² − 7x + 3 = 0
25
Positive: two different real roots
3, 0.5
x² − 2x − 1 = 0
8
Positive but not a perfect square: irrational roots
2.414214, −0.414214
x² − 6x + 9 = 0
0
Zero: one repeated root
3
x² + 2x + 5 = 0
−16
Negative: two complex roots
−1 ± 2i
On a graph, these cases correspond to the parabola y = ax² + bx + c crossing the x-axis twice, touching it once, or not meeting it at all.
Worked Example: A Word Problem
A rectangular plot is 5 m longer than it is wide and has an area of 84 sq m. If the width is x, then x × (x + 5) = 84, which rearranges to x² + 5x − 84 = 0. Enter a = 1, b = 5, c = −84. The discriminant is 25 + 336 = 361, whose square root is 19, so x = (−5 + 19) ÷ 2 = 7 or x = (−5 − 19) ÷ 2 = −12. A width cannot be negative, so the plot is 7 m wide and 12 m long.
The calculator returns every mathematical root. Deciding which ones make sense, such as rejecting negative lengths or times, is up to you.
Tips and Limitations
Put the equation in standard form first, with everything on one side and zero on the other. For 3x² = 12x − 5, the coefficients are a = 3, b = −12, c = 5.
Watch the signs. A missing term has coefficient 0, and "− 7x" means b = −7.
Check your roots: their sum should equal −b/a and their product c/a. For 2x² − 7x + 3, 3 + 0.5 = 3.5 = 7/2 and 3 × 0.5 = 1.5 = 3/2.
Real roots are rounded to six decimal places and complex parts to four. With decimal coefficients, computers store numbers like 0.2 only approximately, so the tool treats a discriminant that is vanishingly small compared with b² as exactly zero. That way x² + 0.2x + 0.01 = 0 is correctly reported as one repeated root, −0.1.
Frequently Asked Questions
It applies the quadratic formula x = (-b ± √(b² - 4ac)) / 2a, first computing the discriminant b² - 4ac to determine what kind of roots exist.
A negative discriminant means there are no real solutions, so the calculator returns two complex roots in the form "real part ± imaginary part i", for example x = 1 ± 2i, and labels the result "Two complex roots".
With a = 0 the equation becomes linear, bx + c = 0, and has a single solution x = −c ÷ b (as long as b is not zero). You do not need the quadratic formula for it, which is why the calculator asks for a non-zero a.
Factorising is quicker when the roots are whole numbers or simple fractions, as in x² − 5x + 6 = (x − 2)(x − 3). The quadratic formula always works, including for irrational and complex roots, so it is the safe choice when no factors are obvious.
The x-coordinate of the vertex is −b ÷ 2a, which is also the midpoint of the two roots. Substitute it back into ax² + bx + c to get the y-coordinate. For x² − 6x + 9 the vertex is at x = 3, y = 0.