Quadratic Equation Calculator
Solve quadratic equations in the form ax² + bx + c = 0. Find real or complex roots, calculate the discriminant, and follow the complete step-by-step solution.
Solve a quadratic equation
Enter the three coefficients of a quadratic equation. The calculator determines the discriminant, identifies the type of roots, and shows the calculation steps.
Your result
—
| Equation | — |
| Coefficient a | — |
| Coefficient b | — |
| Constant c | — |
| Discriminant | — |
| Number of real roots | — |
Standard form: ax² + bx + c = 0
Discriminant: Δ = b² − 4ac
Quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a
Step-by-step calculation
What is a quadratic equation?
A quadratic equation is a polynomial equation of degree two. Its standard form is ax² + bx + c = 0, where a, b, and c are constants and a is not zero. The value of a determines the coefficient of the squared term, b is the coefficient of x, and c is the constant term.
The values of x that make the equation equal to zero are called its roots, solutions, or zeros. Depending on the coefficients, a quadratic can have two distinct real roots, one repeated real root, or two complex roots.
Quadratic equations occur in algebra, geometry, physics, engineering, economics, and many mathematical models where a squared variable is involved.
How to use this quadratic equation calculator
- Write the equation in standard form: ax² + bx + c = 0.
- Enter the value of a, the coefficient of x².
- Enter the value of b, the coefficient of x.
- Enter the value of c, the constant term.
- Select Solve Equation to calculate the roots and discriminant.
- Review the step-by-step calculation to check how the solution was obtained.
The coefficient a must be non-zero. If a equals zero, there is no x² term and the equation becomes linear, so a quadratic formula is not appropriate.
The quadratic formula
The quadratic formula provides a general method for solving a quadratic equation in standard form. It works for equations with real coefficients and can produce either real or complex solutions.
x = (−b ± √(b² − 4ac)) ÷ 2a
Discriminant
Δ = b² − 4ac
The ± symbol means that two values are considered: one using the plus sign and one using the minus sign. This is why a quadratic with a positive discriminant normally produces two distinct roots.
What is the discriminant?
The discriminant is the expression Δ = b² − 4ac inside the square root of the quadratic formula. Its value tells you the type and number of real roots before the roots are fully calculated.
If Δ = 0: There is one repeated real root.
If Δ < 0: There are two complex conjugate roots and no real roots.
The calculator reports the discriminant in the result summary so you can see immediately why a particular type of solution occurs.
Quadratic equation example
Consider the equation:
Here:
a = 1
b = −5
c = 6
Discriminant = (−5)² − 4(1)(6)
= 25 − 24
= 1
x = (5 ± √1) ÷ 2
x₁ = 3
x₂ = 2
Therefore, the two solutions are x = 3 and x = 2. Substituting either value into the original equation produces zero.
Two distinct real roots
When the discriminant is positive, the square root in the quadratic formula is a real, non-zero number. The plus and minus cases therefore produce two different real values of x.
Δ = 1 > 0
Therefore there are two distinct real roots: x = 2 and x = 3.
One repeated real root
When the discriminant is exactly zero, the square-root term becomes zero. The plus and minus versions of the quadratic formula then produce the same value, so the equation has one repeated real root.
Δ = 2² − 4(1)(1) = 0
x = −2 ÷ 2 = −1
Complex roots when the discriminant is negative
A negative discriminant means that the square root in the quadratic formula involves a negative number. Over the real numbers, this means there are no real roots. Using the imaginary unit i, where i² = −1, the equation can instead be expressed with two complex conjugate roots.
Δ = 2² − 4(1)(5) = −16
√(−16) = 4i
x = (−2 ± 4i) ÷ 2
Therefore, x = −1 ± 2i.
The calculator displays the two complex roots separately when the discriminant is negative.
Factoring versus the quadratic formula
Some quadratic equations can be solved quickly by factoring. For example, x² − 5x + 6 can be written as (x − 2)(x − 3), which immediately gives roots of 2 and 3.
Factoring is convenient when the factors are easy to recognize, but it does not work equally conveniently for every quadratic. The quadratic formula provides a general method that can be applied consistently, including to equations with irrational or complex roots.
Understanding the parabola and its roots
A quadratic function can be written as y = ax² + bx + c. Its graph is a parabola. The roots of the corresponding equation ax² + bx + c = 0 are the x-values where the parabola crosses or touches the x-axis.
With two distinct real roots, the parabola crosses the x-axis twice. With one repeated real root, it touches the x-axis at one point. With no real roots, it does not intersect the x-axis.
Common quadratic equation mistakes
- Using the wrong sign for b: If the equation contains −5x, then b is −5, not 5.
- Forgetting the 4ac term: The discriminant is b² − 4ac, not b² − 4a or b² − 4c.
- Dividing only part of the numerator: Both −b and the square-root term belong over 2a.
- Ignoring a = 0: If a is zero, the equation is not quadratic.
- Assuming every quadratic has two real roots: A negative discriminant produces complex roots instead.
- Rounding too early: Early rounding can slightly change the final roots, particularly when the discriminant is not a perfect square.
How to check a quadratic solution
A useful way to verify a calculated root is to substitute it back into the original equation. If x is a correct root, evaluating ax² + bx + c should give zero, allowing for any rounding used in a decimal approximation.
When two roots are available, checking both values provides an additional confirmation that the quadratic formula has been applied correctly.
Where are quadratic equations used?
Quadratic relationships appear in many areas of mathematics and applied science. Examples include projectile models, geometric dimensions, optimization problems, area calculations, engineering relationships, and economic models.
In applied problems, the mathematical roots may need additional interpretation. A negative time, for example, may not represent a physically meaningful event even though it is a valid mathematical solution.
Frequently asked questions
What is a quadratic equation?
A quadratic equation is a second-degree equation that can be written as ax² + bx + c = 0, with a not equal to zero.
What is the quadratic formula?
The quadratic formula is x = (−b ± √(b² − 4ac)) / 2a. It provides a general method for finding the roots of a quadratic equation.
What does the discriminant tell you?
The discriminant b² − 4ac tells you whether a quadratic has two distinct real roots, one repeated real root, or two complex roots.
What happens when the discriminant is positive?
A positive discriminant gives two distinct real roots.
What happens when the discriminant is zero?
A zero discriminant gives one repeated real root.
What happens when the discriminant is negative?
A negative discriminant gives two complex conjugate roots and no real roots.
Can a be zero in a quadratic equation?
No. If a = 0, the x² term disappears and the equation becomes linear rather than quadratic.
Can this calculator solve equations with decimal coefficients?
Yes. The calculator accepts decimal values for a, b, and c and reports the roots using a formatted decimal representation.
