Quadratic equation solver
Solve ax² + bx + c = 0 and see the discriminant and the roots, including complex roots.
Graph
Drag to pan, scroll or pinch to zoom, or use the + / − / ⟲ buttons. The graph can also be reached with the keyboard: Tab to it, then use the arrow keys and + / −.
Formula
How it works
The discriminant b² − 4ac tells you the kind of roots. If it is positive there are two real roots, if zero one repeated root, and if negative two complex roots. The quadratic formula gives their values.
Worked example
The same calculation with the default values:
- Coefficient a (of x²) 1
- Coefficient b (of x) -3
- Constant c 2
- b² − 4ac = (-3)² − 4 × (1) × (2) = 1
- √1 = 1
- x₁ = (−(-3) + 1) ÷ (2 × 1) = 2
- x₂ = (−(-3) − 1) ÷ (2 × 1) = 1
Result: Discriminant (b² − 4ac): 1 · Root x₁: 2 · Root x₂: 1
Common mistakes
- Forgetting the ± in the quadratic formula - there are generally two roots, not one; dropping the minus branch silently discards a valid solution.
- Making a sign error with b or substituting -b incorrectly - the formula uses negative b, so a positive b in the equation becomes negative inside the formula, and this sign is easy to drop by mistake.
- Assuming every quadratic has two real-number solutions - when the discriminant is negative, the solutions are complex, which is a mathematically valid but non-real result, not a sign of an error in the input.
Related calculators
Binomial probability calculator
The probability of exactly k successes in n independent trials, each with the same success probability.
Circle calculator
Diameter, circumference and area of a circle from its radius.
Combinations and permutations calculator
How many ways to arrange or choose r items from n, with and without order mattering.
Conditional probability calculator
P(A given B) and P(B given A) from P(A), P(B) and P(A and B), with an independence check.