Quadratic Equation Solver
Solve any quadratic equation (ax^2 + bx + c = 0) for x using the quadratic formula. Enter the three coefficients to see real, repeated, or complex roots.
Not sure how to find your coefficients? See the step-by-step guide below →
Last updated August 3, 2026
Examples
x^2 - 3x + 2 = 0 (two real roots)
- a:
- 1
- b:
- -3
- c:
- 2
x = 2, 1 - the discriminant is 1, a positive number, so there are two distinct real roots.
- 1Step 1 - Identify the coefficients: a = 1, b = -3, c = 2.
- 2Step 2 - Calculate the discriminant: D = b² - 4ac = (-3)² - 4(1)(2) = 9 - 8 = 1.
- 3Step 3 - Since D > 0, there are two real roots, given by the quadratic formula x = (-b ± √D) / (2a).
- 4Step 4 - x = (-(-3) + √1) / (2 × 1) = (-(-3) + 1) / 2 = 2.
- 5Step 5 - x = (-(-3) - √1) / (2 × 1) = (-(-3) - 1) / 2 = 1.
x^2 + 2x + 1 = 0 (repeated root)
- a:
- 1
- b:
- 2
- c:
- 1
x = -1 (Repeated Root) - the discriminant is exactly 0, so both roots coincide at the same value.
x^2 + 2x + 5 = 0 (complex roots)
- a:
- 1
- b:
- 2
- c:
- 5
x = -1 + 2i, -1 - 2i - the discriminant is -16, a negative number, so there are no real roots, only a complex conjugate pair.
Quadratic Equation Calculator Guide
A complete guide to quadratic equations — what they are, what the discriminant tells you, how to solve one by hand three different ways, and exactly how this calculator solves one internally.
What Is a Quadratic Equation?
A quadratic equation is an equation of the form ax² + bx + c = 0, where a, b, and c are fixed numbers and x is the unknown being solved for. The x² term is what makes it quadratic — a second-degree equation, not a straight line — and solving it means finding every value of x that makes the equation true. A quadratic equation always has exactly two solutions, though those two solutions are sometimes equal to each other or sometimes not real numbers at all.
Understanding the Coefficients
In ax² + bx + c = 0, a is the coefficient of x², b is the coefficient of x, and c is the constant term, with no x attached to it at all. For x² - 3x + 2 = 0, a = 1, b = -3, and c = 2. This calculator won't accept a = 0 at all — without an x² term, there's nothing quadratic left to solve, only a plain linear relationship between x and a constant, which is a different calculator's job entirely. b and c, by contrast, are free to be positive, negative, or zero.
The Discriminant
The discriminant, D = b² - 4ac, is a single number computed from a, b, and c that decides the root type before the rest of the quadratic formula is even applied. Whenever D works out positive, the square root inside the formula is a real, nonzero number, so the ± splits into two distinct real roots. When D lands exactly on zero, that square root vanishes entirely, so both branches of the ± collapse onto the same single value — a repeated root. And when D turns out negative, the square root has no real value at all, which is exactly what pushes the result into complex numbers instead. For x² - 3x + 2 = 0: D = (-3)² - 4(1)(2) = 9 - 8 = 1.
Types of Roots
A quadratic equation always produces exactly one of three outcomes.
Two Real Roots
Happens when D > 0 — the equation's graph, a parabola, crosses the x-axis at two distinct points, and the quadratic formula produces two different real numbers. x² - 3x + 2 = 0 falls into this case: its roots are x = 2 and x = 1.
One Repeated Root
Happens when D = 0 — the parabola just touches the x-axis at a single point instead of crossing it, so both solutions from the quadratic formula land on the exact same value. x² + 2x + 1 = 0 has D = 0, giving a single repeated root at x = -1.
Two Complex Roots
Happens when D < 0 — the parabola never touches the x-axis at all, so no real number satisfies the equation, but two complex conjugate numbers do. x² + 2x + 5 = 0 has D = -16, giving roots x = -1 + 2i and x = -1 - 2i.
The Quadratic Formula
x = (-b ± √D) / (2a) solves ax² + bx + c = 0 directly, once D is already known — the ± is what produces two roots from one formula, collapsing to a single value only when D is 0. This is the exact method this calculator uses internally: it computes D from your a, b, c, then applies this formula to produce the result. It never factors the equation and never completes the square.
How to Solve a Quadratic Equation Manually
Three methods are commonly used to solve a quadratic equation by hand.
Factoring
Rewrites ax² + bx + c as a product of two simpler expressions, then uses the fact that a product equals zero only when one of its factors does. x² - 3x + 2 factors as (x - 1)(x - 2), so setting each factor to 0 gives x = 1 and x = 2 directly. It's fast whenever the equation factors neatly with whole numbers, but not every quadratic does.
Completing the Square
Rewrites the equation so its x terms form a perfect square, then isolates x by taking a square root of both sides. x² - 3x + 2 = 0 becomes (x - 1.5)² = 0.25 once the square is completed; taking the square root gives x = 1.5 ± 0.5, the same x = 2 and x = 1 found above.
Quadratic Formula
Skips both of the above and solves any quadratic equation directly from its coefficients — the one method that always works, whether or not the equation factors neatly, and the method this calculator uses internally.
Worked Example
Take x² - 3x + 2 = 0, with a = 1, b = -3, c = 2, as one concrete illustration of how these ideas fit together. Its discriminant is D = (-3)² - 4(1)(2) = 9 - 8 = 1, positive, confirming two real roots exist before the exact values are even computed. Applying the quadratic formula: x = (3 ± √1) / 2, giving x = (3 + 1) / 2 = 2 and x = (3 - 1) / 2 = 1. This calculator's own step-by-step output above works through this same equation numerically, using the real quadratic-formula engine rather than narrating the manual methods described here.
What the CloudCalcApp Quadratic Equation Solver Does
This calculator solves any quadratic equation ax² + bx + c = 0 from three coefficients you provide, computing the discriminant and applying the quadratic formula internally to return whichever of the three outcomes actually applies — two real roots, one repeated root, or two complex roots — without you needing to identify the case yourself in advance. Results are rounded to 4 decimal places; a whole-number result displays without unnecessary trailing zeros. Because a = 0 would mean the input isn't quadratic at all, it's rejected rather than answered with a guess.
How to Find Your Coefficients
Reading a, b, and c off your own equation is usually direct once it's written as ax² + bx + c = 0. For x² - 3x + 2 = 0, the coefficients are visible as written: a = 1, b = -3, c = 2. A bare x² term, with no visible number in front of it, has a coefficient of 1, not 0 — "x²" alone means "1x²." If the x term is missing entirely, like x² - 4 = 0, its coefficient b is 0, not blank; the same applies to a missing constant, like x² - 3x = 0, where c = 0. The one coefficient that can never be 0 is a — an equation with no x² term at all isn't quadratic, and this calculator rejects it rather than guessing what you meant.
How to Use the Calculator
1. Enter the coefficient of x² (a) - it can never be 0. 2. Enter the coefficient of x (b) - use 0 if there's no x term. 3. Enter the constant (c) - use 0 if there's no constant term. 4. Select Calculate. 5. Read the x value or values from the result. 6. Follow the generated steps to see exactly how the discriminant led to that result. 7. Check whether the result is real, repeated, or complex, and why.
Common Mistakes
A handful of mistakes account for most wrong answers here: treating a missing x² coefficient as a = 0 instead of recognizing the equation isn't quadratic at all; forgetting that the ± in the quadratic formula produces two roots, not one, and reporting only the first; miscalculating the discriminant by dropping a sign on a negative b² or 4ac term; treating a negative discriminant as "no solution" instead of the two valid complex roots it actually produces; and skipping verification, which is the only way to catch an arithmetic slip inside the discriminant or the square root.
How to Verify a Solution
A value only counts as a genuine root if substituting it back into the original equation makes the left side equal 0. For x² - 3x + 2 = 0 with x = 2: (2)² - 3(2) + 2 = 4 - 6 + 2 = 0. With x = 1: (1)² - 3(1) + 2 = 1 - 3 + 2 = 0. Both roots need to check out independently — confirming one doesn't guarantee the other is correct too.
Real-World Applications
Quadratic equations describe situations where a rate of change itself changes at a constant rate, most commonly area and motion: finding the dimensions of a rectangular space given its total area and a relationship between its sides, working out how long a thrown or dropped object takes to reach the ground under gravity, or finding the price that maximizes revenue when a higher price reduces how much sells. Each of these becomes an equation of the form ax² + bx + c = 0 once set up correctly.
Quadratic Equation vs. a Linear Equation
A quadratic equation is the right tool whenever an x² term is genuinely part of the problem — a single unknown raised to the second power, producing up to two solutions rather than exactly one. If a problem only involves x to the first power, with no squared term at all, like 3x + 5 = 20, it isn't quadratic, and the Linear Equation Solver handles that simpler, single-solution case directly, without the discriminant or the ± this calculator's quadratic formula requires.
Conclusion
A quadratic equation is any equation with an x² term, and how many real solutions it has — two, one, or none among the reals — depends entirely on the sign of its discriminant. Factoring, completing the square, and the quadratic formula all reach the same answer by different routes; this calculator uses the quadratic formula internally and shows the real computation behind your own numbers, not a generic narration. Whichever method you use by hand, always finish by substituting each root back into the original equation — that's the only way to confirm it's actually correct.
FAQ
What is the quadratic formula?
The quadratic formula solves any equation of the form ax^2 + bx + c = 0 (where a is not 0) for x: x = (-b +/- sqrt(b^2 - 4ac)) / (2a). For example, for x^2 - 3x + 2 = 0 (a=1, b=-3, c=2), this gives x = 2 and x = 1. The +/- means the formula always produces two results, though as the other FAQs below explain, those two results are sometimes equal or sometimes complex numbers rather than two distinct real numbers.
What is the discriminant, and why does it matter?
The discriminant is the expression b^2 - 4ac from inside the square root of the quadratic formula, and its sign alone determines what kind of roots the equation has: positive means two distinct real roots, zero means one repeated real root, and negative means two complex roots. For x^2 + 2x + 5 = 0, the discriminant is 2^2 - 4(1)(5) = 4 - 20 = -16, which is negative - correctly predicting the complex-root result this calculator returns.
What does it mean when a quadratic equation has no real solution?
It means the equation's graph (a parabola) never crosses the x-axis, so there is no real number that satisfies it - but it still has exactly two solutions, both complex numbers, since the negative discriminant's square root is only undefined for real numbers, not for complex ones. This calculator returns those complex roots directly (for example, -1 + 2i and -1 - 2i) rather than simply reporting "no solution," since the complex roots are the mathematically complete answer.
What is a repeated root?
A repeated root (also called a double root) happens when a quadratic equation's two solutions are equal to each other, which occurs precisely when the discriminant is exactly 0. Graphically, this means the parabola just touches the x-axis at a single point instead of crossing it at two points. For x^2 + 2x + 1 = 0, the discriminant is 2^2 - 4(1)(1) = 0, giving a single repeated root at x = -1.
Can a quadratic equation have three or more solutions?
No - a quadratic equation can have at most two solutions, because it is a second-degree polynomial, and the fundamental theorem of algebra guarantees a degree-2 polynomial has exactly 2 roots (counting a repeated root twice, and counting complex roots). This is different from higher-degree equations (cubic, quartic, and beyond), which can have more solutions.
What happens if I enter 0 for the "a" coefficient?
This calculator rejects a of 0 rather than returning a misleading result, because an equation with a = 0 is no longer quadratic - the x^2 term disappears entirely, leaving a linear equation (bx + c = 0) that needs a different solving method, or in the degenerate case where b is also 0, an equation with either no solution or infinitely many. The "a" coefficient must be a genuine non-zero number for the quadratic formula to apply.
Can the coefficients a, b, or c be negative or decimal numbers?
Yes - a (other than 0), b, and c can each be any positive number, negative number, or decimal, and the quadratic formula works identically regardless of their signs. For example, 2x^2 - 8x + 6 = 0 (a=2, b=-8, c=6) correctly returns x = 3, 1, using exactly the same formula as an equation with all-positive coefficients.
How accurate are the results from this calculator?
Results are rounded to 4 decimal places, matching the precision convention used across this platform's other Math calculators, which is more than enough precision for virtually any practical use. For equations with whole-number coefficients that happen to produce whole-number roots (such as x^2 - 3x + 2 = 0, which gives exactly 2 and 1), the result displays as a clean whole number rather than an unnecessary string of trailing zeros.
Related Calculators
System of Equations Solver
Algebra & EquationsEnter six coefficients to solve two linear equations for x and y using Cramer's Rule - see the determinant, Dx, Dy, and a verified answer at every step.
Linear Equation Solver
Algebra & EquationsPlug in a, b, and c to solve ax + b = c for x instantly, with full step-by-step working and a clear no-solution or infinite-solutions answer built in.
Long Multiplication Calculator
Numbers & ArithmeticMultiply two numbers with the standard long multiplication method - see every partial product, carry, and place-value shift for whole numbers and decimals.