Quadratic Formula Calculator
Enter the coefficients a, b and c of ax² + bx + c = 0 to find the solutions with the quadratic formula.
The quadratic formula and the discriminant
The solutions of a quadratic equation ax² + bx + c = 0 (with a ≠ 0) are
x = (−b ± √D) ÷ 2a, where the discriminant D = b² − 4ac.
The discriminant tells you how many real solutions there are.
| Discriminant D | Solutions |
|---|---|
| D > 0 | Two real solutions |
| D = 0 | One repeated real solution |
| D < 0 | No real solutions (this calculator does not give complex solutions) |
How the solutions are shown
- When D is a perfect square (for a fraction, when both the numerator and the denominator are perfect squares), the solutions are rational. They are shown as an exact fraction in lowest terms, with its decimal value.
- When D is not a perfect square, the solutions are irrational. The square root is approximated to 40 decimal places and the result is shown rounded to 7 significant digits (labeled "rounded value"). The expression inside the square root is not simplified.
- The smaller solution is called x₁ and the larger one x₂.
When a is 0
If a = 0, the equation is not quadratic. For reference, the calculator solves the linear equation bx + c = 0:
| b | c | Result |
|---|---|---|
| Not 0 | (anything) | x = −c ÷ b |
| 0 | 0 | Every x is a solution |
| 0 | Not 0 | No x satisfies the equation (no solution) |
Examples
| Equation | Discriminant D | Solutions |
|---|---|---|
| x² − 5x + 6 = 0 | 1 | 2 and 3 |
| 2x² + 3x − 2 = 0 | 25 | −2 and 1/2 |
| x² − 2 = 0 | 8 | ±1.414214 (rounded value) |
| x² + 2x + 1 = 0 | 0 | −1 (repeated root) |
| x² + 1 = 0 | −4 | No real solutions |
Notes
- Decimal coefficients are converted to fractions and calculated exactly.
- Complex solutions, step-by-step factoring or completing the square, graphs, and equations of degree 3 or higher are not covered.
- To work with fractions, use the Fraction Calculator.
Frequently asked questions
What is the discriminant?
It is b² − 4ac. If it is positive, there are two real solutions; if it is 0, there is one repeated solution; if it is negative, there are no real solutions.
When are the solutions fractions?
When the discriminant is a perfect square. For example, 2x² + 3x − 2 = 0 has the discriminant 25 (a perfect square), and its solutions are −2 and 1/2.
What if there are no real solutions?
That happens when the discriminant is negative. There are no solutions among the real numbers (there are solutions among the complex numbers, but this calculator does not cover them).