Beginner

Quadratic Equation Solver

Solve any quadratic equation and see its roots and discriminant.
Two real roots
x₁
2
x₂
1
Discriminant
1
x₁x₂Vertex
Step by step
  1. 1

    (-3)² = 9
  2. 2

    4ac

    4 × 1 × 2 = 8
  3. 3

    Discriminant

    9 − 8 = 1
  4. 4

    Root x₁

    (3 + √1) ÷ (2 × 1) = 2
    x₁ is the larger of the two roots.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Formula
x = (−b ± √(b² − 4ac)) ÷ 2a
How this is calculated

A quadratic equation has the form ax² + bx + c = 0, where a, b, and c are the numbers you enter. The coefficient a multiplies x² and must not be zero — if it were, the equation would be linear, not quadratic. The coefficient b multiplies x, and c is the standalone constant term. The solver applies the quadratic formula x = (−b ± √(b² − 4ac)) ÷ 2a, which gives the exact x-values where the parabola crosses zero.

The key quantity is the discriminant, D = b² − 4ac, computed first. Its sign decides the nature of the roots without any extra work: D > 0 yields two distinct real roots, D = 0 yields one repeated real root (the parabola just touches the x-axis), and D < 0 yields a pair of complex-conjugate roots written as re ± im·i.

The inputs are pure numbers with no units, so results carry whatever units your problem implies. Calculations use standard floating-point arithmetic, so very large coefficients or roots extremely close together can show tiny rounding differences in the displayed values.

Examples
InputResult
Solve x^2 - 5x + 6 = 0 (a=1, b=-5, c=6)Discriminant 1, two real roots: x = 3 and x = 2
Solve x^2 - 4x + 4 = 0 (a=1, b=-4, c=4)Discriminant 0, one repeated root: x = 2
Solve x^2 + 2x + 5 = 0 (a=1, b=2, c=5)Discriminant -16, two complex roots: x = -1 + 2i and x = -1 - 2i
Solve 2x^2 + 3x - 2 = 0 (a=2, b=3, c=-2)Discriminant 25, two real roots: x = 0.5 and x = -2

About this calculator

A quadratic equation solver finds the values of x that satisfy an equation of the form ax^2 + bx + c = 0, where a, b, and c are constants and a is not zero. These solutions are called the roots of the equation, and graphically they are the points where the parabola y = ax^2 + bx + c crosses the horizontal axis.

The solver applies the quadratic formula, x = (-b plus or minus the square root of (b^2 - 4ac)) divided by 2a. The expression under the square root, b^2 - 4ac, is called the discriminant, and it decides the nature of the roots before you even finish the calculation. If the discriminant is positive there are two distinct real roots, if it is exactly zero there is one repeated real root, and if it is negative there are two complex conjugate roots involving the imaginary unit i.

To use the tool, enter the three coefficients a, b, and c exactly as they appear in your equation, including any negative signs. The solver reports the discriminant, tells you how many real or complex roots exist, and then gives the roots themselves. Showing the discriminant first lets you understand the result rather than just read a number.

Interpreting the output is about matching the roots to the discriminant. Two real roots mean the parabola cuts the axis in two places; one repeated root means it just touches the axis at its vertex; and complex roots mean the parabola never reaches the axis at all. You can always verify a real root by substituting it back into the original equation, which should return zero.

Common mistakes include entering a as zero, which is not a quadratic at all but a linear equation, and dropping a minus sign when transcribing coefficients, which silently changes the answer. People also sometimes forget that subtracting inside the formula can flip signs, and that a negative discriminant does not mean there is no solution, only that the solutions are complex rather than real.

Frequently asked questions

The discriminant is b^2 - 4ac, the part under the square root in the quadratic formula. It tells you the nature of the roots: positive means two distinct real roots, zero means one repeated real root, and negative means two complex conjugate roots.

Then it is not a quadratic equation at all but a linear one, bx + c = 0, with a single solution x = -c/b. A genuine quadratic requires a to be non-zero, otherwise the x^2 term disappears and the quadratic formula cannot apply.

Yes, when the discriminant equals exactly zero. In that case the formula gives a single repeated root x = -b/(2a), and graphically the parabola just touches the horizontal axis at its vertex rather than crossing it.

It means the equation has no real solutions but two complex ones, written as conjugates of the form p plus or minus qi. The parabola never crosses the horizontal axis, but the roots still exist within the complex number system.

Substitute it back into the original equation ax^2 + bx + c. If the value is a true root, the expression should evaluate to zero (or extremely close to it, allowing for rounding). This works for both of the two real roots.

For ax^2 + bx + c = 0, the two roots add up to -b/a and multiply to c/a. These relationships, known as Vieta's formulas, give a quick way to sanity-check the solver's output without redoing the full calculation.

Also known as

quadratic formula
roots of equation
discriminant
solve quadratic
quadratic roots
ax^2+bx+c

APA

TG we-Calculate Editorial Team. (2026). Quadratic Equation Solver [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/quadratic-equation-solver

Chicago

TG we-Calculate Editorial Team. "Quadratic Equation Solver." TG we-Calculate. 2026. https://we-calculate.com/calculator/quadratic-equation-solver.

IEEE

TG we-Calculate Editorial Team, "Quadratic Equation Solver," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/quadratic-equation-solver

BibTeX

@misc{wecalculate_quadratic_equation_solver, title = {Quadratic Equation Solver}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/quadratic-equation-solver}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?