This quadratic formula calculator solves ax² + bx + c = 0 for x. Enter coefficients a, b, and c. The default set a = 1, b = -5, c = 6 returns roots 3 and 2, which match the factored form (x – 3)(x – 2).
Students use it to check homework after they try the algebra by hand. For related math tools already published on the site, see the percentage calculator when a problem mixes percents with equations.
How the formula works
Compute the discriminant D = b² – 4ac. If D is negative the tool reports complex roots. Otherwise the roots are (-b ± √D) / (2a).
Worked example
a = 1, b = -5, c = 6. Discriminant = 25 – 24 = 1. Roots = (5 ± 1) / 2, so 3 and 2.
| Input | Value |
|---|---|
| a | 1 |
| b | -5 |
| c | 6 |
| Roots | 3, 2 |
How to use the fields
- a is the coefficient of x² and must be non-zero.
- b is the coefficient of x.
- c is the constant term.
Discriminant intuition
A positive discriminant means two distinct real solutions. Zero means the parabola touches the x axis once. Negative means the graph misses the x axis and this calculator labels the case as complex roots.
Common mistakes
- Forgetting the leading minus on b when b is already negative
- Dividing only by 2 instead of 2a
- Setting a to zero and still expecting quadratic roots
- Rounding the square root too early when checking by hand
Checking by substitution
Plug x = 3 into 1×x² – 5x + 6 to get 9 – 15 + 6 = 0. Plug x = 2 to get 4 – 10 + 6 = 0. Substitution catches sign errors faster than re-deriving the discriminant.
Graph meaning
The roots are x intercepts of y = ax² + bx + c. The default opens upward and crosses at 2 and 3. Changing a scales and can flip the parabola, which moves whether and where it crosses.
Classroom practice
Ask learners to estimate roots from a sketch before calculating. For the default, intercepts near 2 and 3 should be obvious. Then change c and predict whether roots move apart or vanish into the complex case.
Have them expand (x – 3)(x – 2) to recover a, b, and c, then confirm the calculator returns the same pair.
Word problems
Projectile and area problems often reduce to quadratics. Define a, b, and c from the expanded equation first, then solve. Keep units with the story variables, not with the pure roots unless the problem asks for it.
Completing the square link
The quadratic formula comes from completing the square on ax² + bx + c = 0. You do not need that derivation to use the calculator, but showing it once helps students trust why ± appears.
After roots are known, rewrite the monic polynomial as a(x – r1)(x – r2) when roots are real. That factoring check matches the default 3 and 2 case cleanly.
Complex root reporting
When the discriminant is negative, this tool reports complex roots rather than inventing a real answer. That message is a feature: it stops false graph intercepts.
Courses that require a + bi form can finish the arithmetic by hand from D and 2a after they see the complex flag.
Application sketches
Area problems that create a square length times width often expand into quadratics. Define variables, expand fully, then map to a, b, and c before solving.
Keep units with the original story quantities. Roots that represent lengths should be checked for positivity before you accept them in a design context.
Sign errors on b
When b is negative, -b becomes positive. Students often drop a sign and land on the wrong roots even when the discriminant is right. Write -b on its own line before you divide by 2a.
The default b = -5 makes -b = 5, which is why the plus and minus branches become (5 ± 1) / 2.
After any sign heavy problem, substitute both roots. Substitution is faster than redoing the entire discriminant when only a sign is in doubt.
Limitations
The tool solves a single quadratic in standard form. It does not plot the curve, complete the square step by step, or solve cubic equations.