Quadratic Equation Calculator
Enter the coefficients a, b and c of ax² + bx + c = 0 and this quadratic equation calculator returns both solutions, real or complex. It also shows the discriminant, which tells you what kind of roots to expect, the vertex of the parabola, the factored form and the sum and product of the roots, so you can check homework steps as well as the final answer.
Updated
Results
- Discriminant Δ = b² − 4ac
- Type of roots
- Root x₁Smaller real root
- Root x₂Larger real root
- Vertex (x; y)Turning point of the parabola
- Factored formShown when the roots are real
- Sum of roots (−b/a)
- Product of roots (c/a)
Results are estimates. See the methodology below.
How to use the calculator
- Rewrite your equation in standard form, with everything on one side and 0 on the other. For example, x² = 3x + 10 becomes x² − 3x − 10 = 0.
- Enter a (the x² coefficient), b (the x coefficient) and c (the constant). Use negative signs where needed and 0 for a missing term. Decimals are fine.
- Read the solutions at the top. The individual roots x₁ and x₂ and the factored form appear only when the roots are real.
The coefficient a can't be 0: without an x² term the equation is linear, not quadratic.
How the calculator solves it
Everything starts with the discriminant:
Δ = b² − 4ac
- Δ > 0: two distinct real roots,
x = (−b ± √Δ) / 2a. - Δ = 0: one repeated real root,
x = −b / 2a; the parabola touches the x-axis at its vertex. - Δ < 0: two complex conjugate roots,
x = −b/2a ± (√−Δ / 2|a|) i; the parabola never crosses the x-axis.
When b is large compared with a and c, the textbook formula subtracts two nearly equal numbers and loses accuracy. The calculator avoids this by first computing q = −(b + sign(b)·√Δ) / 2, then taking x₁ = q/a and x₂ = c/q. Both roots stay accurate.
The other outputs follow directly from the coefficients:
- Vertex: (−b/2a; −Δ/4a), the turning point of y = ax² + bx + c.
- Vieta's formulas: sum of roots = −b/a, product = c/a.
- Factored form: a(x − x₁)(x − x₂), or a(x − x₁)² for a double root.
Displayed values are rounded to 10 significant digits. The text results (solutions, vertex, factored form) use a true minus sign and write every number out in plain decimal form, with no exponent notation and no thousands separators. When one root is 0, the factored form shows a bare x factor, such as −16x(x − 4).
Worked examples
1. Two real roots: x² − 3x − 10 = 0
With a = 1, b = −3, c = −10, the discriminant is 49. The roots are x₁ = −2 and x₂ = 5, so the factored form is (x + 2)(x − 5). The vertex is (1.5; −12.25), the sum of the roots is 3 and the product is −10.
2. A ball thrown upward
A ball leaves a 48-foot rooftop at 32 ft/s. Its height is h(t) = −16t² + 32t + 48. Solve −16t² + 32t + 48 = 0: the roots are t = −1 and t = 3. Time can't be negative, so the ball lands after 3 seconds. The vertex (1; 64) says it peaks at 64 feet after 1 second.
3. Complex roots: x² + 2x + 5 = 0
Here Δ = −16, so there are no real solutions. The calculator returns x = −1 ± 2i. The vertex (−1; 4) sits above the x-axis on an upward-opening parabola, which is why the graph never crosses it.
4. Where accuracy matters
For x² + 100,000,000x + 1 = 0, the small root is about −0.00000001. Evaluated directly in standard double-precision arithmetic, the textbook formula returns about −0.00000000745, roughly 25% off. The stable method used here gets both roots right and displays them as x₁ = −100000000, x₂ = −0.00000001.
Checking your answer
Use Vieta's formulas as a quick check: add your two roots and compare with −b/a, multiply them and compare with c/a. For word problems, decide which root makes sense. Negative times or lengths are usually discarded, as in the ball example. Irrational roots such as 1.618033989 are rounded; if your teacher wants an exact answer, keep the radical form (1 + √5)/2.
Frequently asked questions
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) / 2a. It solves any equation of the form ax² + bx + c = 0 with a ≠ 0, whether or not the expression can be factored.
What does the discriminant tell me?
Its sign gives the number and type of roots: positive means two real roots, zero means one repeated root, negative means two complex roots. If the discriminant is a perfect square and the coefficients are integers, the roots are rational and the quadratic factors nicely, as with Δ = 49 in the first example.
How do I enter an equation with a missing term?
Type 0 for the missing coefficient. For x² − 2 = 0, enter a = 1, b = 0, c = −2 to get x = ±1.414213562, which is ±√2. With c = 0, one root is always 0: −16x² + 64x = 0 gives x₁ = 0 and x₂ = 4, factored as −16x(x − 4).
What does i mean in the answer?
i is the imaginary unit, with i² = −1. Complex roots always come in conjugate pairs, such as −1 + 2i and −1 − 2i, when the coefficients are real.
Can I use decimals or fractions?
Decimals, yes. For a fraction like ½, enter 0.5. For example, 0.5x² − 3x + 4 = 0 has roots 2 and 4.
Why is the factored form missing?
It's shown only when the roots are real. With complex roots, the quadratic can't be written as a product of real linear factors.
Sources
Results are computed in floating-point arithmetic and rounded for display. For graded work, show your steps and keep exact forms such as radicals when required.