Quadratic Equation Calculator
Solve ax² + bx + c = 0 with the quadratic formula, including the discriminant and complex roots.
The Quadratic Equation Calculator solves any equation of the form ax² + bx + c = 0 using the quadratic formula, reporting the roots, the discriminant, and whether the solutions are real or complex. Quadratics describe every situation where a quantity depends on the square of another: projectile paths, braking distances, optimal pricing, the area of a shape whose dimensions both vary, and countless physics and engineering relationships. Rather than returning bare numbers, this page shows the discriminant explicitly, because that single value tells you the shape of the answer before you see it — two roots, one repeated root, or none in the real numbers.
How to use this calculator
- Rewrite your equation in the form ax² + bx + c = 0.
- Enter a, b, and c (including their signs).
- The calculator shows the discriminant and all roots.
The formula
x = (−b ± √(b² − 4ac)) ÷ 2a- a
- Coefficient of x² (cannot be zero)
- b
- Coefficient of x
- c
- Constant term
- b² − 4ac
- The discriminant — its sign decides how many real roots exist
How it works
The quadratic formula is derived by 'completing the square' on the general equation, and it works for every quadratic.
The discriminant tells the story before you solve: positive means two distinct real roots, zero means one repeated root, negative means two complex roots.
Worked example
Solve x² − 3x − 4 = 0.
- 1a = 1, b = −3, c = −4
- 2Discriminant = 9 + 16 = 25; √25 = 5
- 3x = (3 ± 5) / 2
x = 4 or x = −1. Check: (x − 4)(x + 1) = x² − 3x − 4. ✓
What the discriminant tells you
The discriminant is b² − 4ac, the part of the quadratic formula under the square root. When it is positive there are two distinct real roots and the parabola crosses the x-axis twice. When it is exactly zero there is one repeated root and the parabola touches the axis at its vertex. When it is negative the roots are complex and the curve never meets the axis.
Checking the discriminant first is a fast sanity test: if a physical problem demands a real answer and the discriminant is negative, one of the coefficients is almost certainly wrong.
The formula and where it comes from
The quadratic formula, x = (−b ± √(b² − 4ac)) ÷ 2a, is derived by completing the square on the general equation. It works for every quadratic, including those that cannot be factorised with integers, which is why it is the reliable default method.
Factoring is quicker when the numbers are friendly, and graphing gives intuition, but neither is universal. The formula always terminates with the correct answer.
Interpreting roots in a real problem
Mathematics returns both roots; context decides which ones are meaningful. A projectile problem may yield a negative time, and a pricing problem may yield a negative price — those solutions are valid algebraically but must be discarded physically.
The vertex, at x = −b ÷ 2a, sits exactly midway between the roots and marks the maximum or minimum of the curve. It is often the value you actually want when the question concerns optimisation rather than break-even.
Reading the discriminant
The discriminant is b squared minus 4ac. Positive means two distinct real roots, zero means one repeated root, and negative means no real roots — the parabola never crosses the x-axis.
Checking the discriminant before solving tells you in a single step what kind of answer to expect and whether a real-world interpretation exists at all.
A perfect-square discriminant also signals that the equation factorises neatly over the integers, which can be quicker than the formula.
Factoring, completing the square, and the formula
Factoring is fastest when integer roots exist: x squared - 5x + 6 = (x - 2)(x - 3), giving roots 2 and 3 by inspection.
Completing the square always works and reveals the vertex directly, which is what you need for maximum or minimum problems.
The quadratic formula is the general fallback and is what this calculator applies, so it handles awkward coefficients that resist factoring.
The parabola behind the numbers
The sign of a decides the shape: positive opens upward with a minimum, negative opens downward with a maximum. The vertex sits at x = -b / 2a.
The roots are where the curve crosses the x-axis, and the y-intercept is simply c. Together these three facts let you sketch the curve from the coefficients alone.
The curve is symmetric about the vertical line through the vertex, so the two roots are always equidistant from it — a useful check on your answers.
Common mistakes when solving
Forgetting to rearrange the equation into the standard form ax squared + bx + c = 0 before reading off the coefficients.
Dropping a minus sign on b or on the discriminant. Substituting a negative b into -b requires brackets to stay correct.
Ignoring a coefficient of a other than one when factoring, which quietly changes the equation being solved.
Where quadratics appear in real problems
Projectile motion is quadratic in time, so height equations give the moment of landing and the peak height directly from the roots and vertex.
Revenue and profit models are often quadratic in price, where the vertex gives the price that maximises revenue.
Area problems with a fixed perimeter, braking distances, and lens equations all reduce to quadratics in one variable.
Glossary and verification
Coefficient: the multiplier of each term. Root (or zero): a value of x that makes the expression zero. Vertex: the turning point. Discriminant: the expression under the radical.
Verify roots by substituting them back into the original equation — each should give zero to within rounding.
Two further checks: the roots should sum to -b/a and multiply to c/a. Both are quick and catch sign errors immediately.
What the discriminant tells you first
The discriminant, b² − 4ac, decides the shape of the answer before you solve anything. Positive gives two distinct real roots, zero gives one repeated root, negative gives a complex pair.
Checking it first prevents wasted effort and explains an unexpected result. A negative discriminant in a physics problem usually means the projectile never reaches the height asked about.
It also indicates numerical sensitivity: a discriminant close to zero means the two roots nearly coincide and small input errors move them noticeably.
Factoring, completing the square, and the formula
Factoring is fastest when the coefficients are small integers and the roots are rational. Completing the square works always and reveals the vertex directly.
The quadratic formula is completing the square carried out once in general, which is why it never fails. It is the reliable default when factors are not obvious.
Graphing gives the intuition: the roots are where the parabola crosses the horizontal axis, and the vertex sits midway between them.
Reading the parabola
A positive leading coefficient opens the curve upward, giving a minimum; a negative one opens downward, giving a maximum. The vertex sits at x = −b / 2a.
This is what makes quadratics useful for optimisation — maximum revenue, minimum cost, peak height — because the turning point is where the interesting answer lies.
The axis of symmetry through the vertex means the two roots are always equally spaced either side of it, which is a fast plausibility check.
Applications and verification
Projectile motion, area problems with a fixed perimeter, break-even analysis, lens equations, and any relationship where a quantity depends on the square of another.
Verify by substituting each root back into the original equation; both should return zero within rounding.
Verify a pair jointly: the roots must sum to −b/a and multiply to c/a, which catches sign errors immediately.
Choosing a solution method
Factoring is fastest when the coefficients are small whole numbers and the roots are rational, but it fails quietly when they are not.
Completing the square always works and reveals the vertex directly, which is why it is the derivation behind the quadratic formula itself.
The formula handles every case including irrational and complex roots, so it is the safe default when the coefficients are messy.
Graphing gives an approximate answer and a sanity check, but should not replace an algebraic solution where precision matters.
Quadratics in applied problems
Projectile motion, profit maximisation, and area optimisation all reduce to quadratics, with the vertex giving the maximum or minimum.
Negative roots frequently appear but are often physically meaningless, so always test each root against the context before reporting it.
The sum of the roots equals minus b over a and their product equals c over a, which gives a quick verification of any pair you calculate.
Rounding roots too early distorts later steps, so carry full precision until the final answer is presented.
Reading the parabola
The sign of the leading coefficient tells you immediately whether the curve opens upward with a minimum or downward with a maximum.
The vertex sits at minus b over twice a, and substituting that value back gives the extreme value the equation can reach.
The axis of symmetry runs through the vertex, so the two roots are always equally spaced either side of it — a useful check.
The constant term is the value where the curve meets the vertical axis, which anchors a quick sketch without any further calculation.
When this calculator is useful
- Algebra homework checking
- Projectile motion problems
- Finding break-even points
- Geometry optimization
Frequently asked questions
What if my equation isn't in standard form?
Move every term to one side first. For example, x² = 5x − 6 becomes x² − 5x + 6 = 0, so a = 1, b = −5, c = 6.
What does a negative discriminant mean?
The equation has no real solutions — graphically, the parabola never touches the x-axis. The calculator reports the complex roots.
What makes an equation quadratic?
The highest power of the variable is two, and the coefficient a is not zero. If a is zero the equation is linear and the quadratic formula does not apply.
What does it mean when the discriminant is negative?
There are no real solutions — the parabola never crosses the x-axis. The roots exist as complex conjugates involving the imaginary unit.
Why do quadratics usually have two answers?
Because squaring loses sign information. Two different x values can produce the same y, so undoing the square generally yields a pair of solutions.
Can I use this for equations not written in standard form?
Rearrange first so everything is on one side and the equation equals zero, then read off a, b, and c in order.
How do I find the vertex of the parabola?
Use x = −b ÷ 2a, then substitute that value back into the equation to get the corresponding y. It is the minimum when a is positive and the maximum when a is negative.
Is factoring better than using the formula?
Factoring is faster when integer factors exist, but it fails on most real-world coefficients. The formula is slower to write yet always works.
Can a quadratic have only one root?
Yes, when the discriminant is zero. The two roots coincide and the parabola touches the x-axis at a single point.
Do I have to use the quadratic formula?
No. Factoring or completing the square work too, but the formula always works and is what this tool uses.
How do I check my roots are right?
Substitute each back into the equation, or confirm their sum equals -b/a and their product equals c/a.
What if a is zero?
The equation is linear, not quadratic, and has a single solution x = -c/b.
When can I factor instead of using the formula?
When the coefficients are small integers and the roots are rational. Otherwise the formula is faster and safer.
Where is the vertex of a quadratic?
At x = −b / 2a, midway between the two roots.
How do I check my roots quickly?
They must sum to −b/a and multiply to c/a.
How can I check my roots?
Their sum should equal minus b over a and their product c over a.
When is factoring worth trying?
When the discriminant is a perfect square, which guarantees rational roots.
Where is the vertex of a quadratic?
At minus b divided by twice a; substitute that back in to get the maximum or minimum value.