Quadratic Formula Calculator
Choose how you want to enter your equation, then solve.
Decimals and simple fractions are both fine, for example -1.5 or 1/4. Leave a = 0 to see how the calculator handles a non-quadratic equation.
Solve any quadratic equation ax² + bx + c = 0 by entering coefficients or typing a full equation. See exact real or complex roots, the discriminant, vertex, axis of symmetry, y-intercept, factored form, vertex form, and a live parabola graph.
Choose how you want to enter your equation, then solve.
Decimals and simple fractions are both fine, for example -1.5 or 1/4. Leave a = 0 to see how the calculator handles a non-quadratic equation.
A quadratic equation is any equation that can be written in standard form as ax² + bx + c = 0, where a, b, and c are numbers (called coefficients) and a is never zero. The x² term is what makes the equation "quadratic," a word that comes from the Latin for "square." If a were allowed to be zero, the x² term would vanish and the equation would collapse into an ordinary linear equation, which is exactly what this calculator does automatically when you set a to zero.
Solving a quadratic equation means finding every value of x that makes the equation true. Graphically, y = ax² + bx + c draws a curve called a parabola, and the solutions to ax² + bx + c = 0 are the x-values where that curve crosses the horizontal axis. A parabola can cross the axis twice, touch it once, or never touch it at all, and the quadratic formula tells you which of those three situations you are looking at before you even finish the arithmetic.
The quadratic formula is not a rule handed down from nowhere. It is the result of a technique called completing the square, applied once to the general equation ax² + bx + c = 0 so that the answer works for every quadratic equation you will ever meet. Completing the square turns a trinomial that is hard to take a square root of into a perfect square binomial that is easy to take a square root of. Walking through the derivation is worth doing at least once, because it explains why the formula has exactly the shape it has instead of asking you to memorize it blindly.
The ± symbol at step 6 is the entire reason a quadratic equation can have two answers instead of one. Once you reach x = (−b ± √(b²−4ac)) / 2a, the formula is really shorthand for two separate calculations that share every piece except the sign in front of the square root.
Every part of the formula (−b, D, 2a) is identical for both branches. Only the sign in front of the square root changes, which is why the two roots are always symmetric around −b/2a, the axis of symmetry.
The expression under the radical, D = b² − 4ac, is called the discriminant, and it deserves attention on its own because its sign alone tells you what kind of roots to expect, before you ever compute a square root. You can compute D in seconds and immediately know whether you are about to find two crossing points, one touching point, or a pair of complex numbers.
Two distinct real roots where the curve crosses the axis.
One repeated root where the vertex just touches the axis.
No real roots. The two solutions are complex conjugates.
When the discriminant is negative, many students are taught to write "no solution" and move on. That phrasing is misleading. A negative discriminant means there is no real number solution, but the equation still has exactly two solutions once you allow complex numbers. A complex number has the form p + qi, where i is defined as √−1, so that i² = −1. When D is negative, √D becomes √(−1) · √|D|, which simplifies to i√|D|, and the two roots come out as a conjugate pair: p + qi and p − qi, where p = −b/2a and q = √|D|/2a.
Complex roots are not a mathematical failure or a sign that something went wrong; they are the correct answer for that equation. Engineers, physicists, and mathematicians work with complex roots constantly, particularly in electrical engineering, control theory, and signal processing, where they describe oscillation and damping. This calculator always reports complex roots explicitly, in the form p ± qi, rather than telling you the problem has no answer.
Both roots sit on the ordinary real number line.
The conjugate pair sits symmetrically above and below the real axis.
For further worked examples of solving quadratics with the quadratic formula, the BCcampus Pressbooks Quadratic Formula lesson and worked examples is a useful independent reference.
Every parabola has a single turning point called the vertex. Its x-coordinate is h = −b/2a, the same expression that sits at the center of the quadratic formula, which is no coincidence: the vertex is exactly halfway between the two roots. Its y-coordinate is k = f(h), found by substituting h back into the original equation. The vertical line x = h is the axis of symmetry: fold the parabola along that line and the two halves match perfectly, which is also why the two roots are always the same distance from h.
When the roots are rational numbers, you can rewrite ax² + bx + c in factored form as a(x − x₁)(x − x₂). For x² − 5x + 6, the roots 2 and 3 give the factored form (x − 2)(x − 3), and multiplying that back out returns the original trinomial. Factored form is convenient because it shows the roots directly, without needing the formula at all, but it only works cleanly when the roots are rational; irrational or complex roots technically still factor, just not into simple integer or fraction expressions.
For x² − 5x + 6 = 0: roots 2 and 3 (green), vertex (2.5, −0.25) shown at its minimum (purple), axis of symmetry x = 2.5 (dashed), and y-intercept (0, 6) (amber), found simply by setting x = 0.
The vertex is a minimum. The parabola opens like a bowl.
The vertex is a maximum. The parabola opens like an arch.
Example 7 above, −x² + 4x + 5 = 0, has a = −1, so it opens downward and its vertex (2, 9) is the highest point on the curve rather than the lowest.
Completing the square is also how you convert standard form into vertex form: y = a(x − h)² + k. Vertex form is convenient for graphing because it shows the vertex (h, k) directly, and it shows how the basic parabola y = x² has been transformed: shifted h units horizontally, shifted k units vertically, and stretched, compressed, or flipped by the factor a. Every quadratic equation can be written in standard form, factored form (when the roots are rational), and vertex form; they describe the same curve from three different angles.
The dashed curve is y = x², centered at the origin. Sliding its vertex to (h, k) and adjusting the width with a produces y = a(x − h)² + k, the vertex form of any quadratic.
The quadratic formula is not just a textbook exercise; it routinely shows up any time a quantity depends on the square of another quantity.
Height over time follows h(t) = −16t² + v₀t + h₀. The positive root of h(t) = 0 tells you when the object lands.
With a fixed amount of fencing, area as a function of one side is quadratic, and its vertex gives the largest possible enclosed area.
Revenue minus cost is often quadratic in price or quantity. The vertex marks the price that maximizes profit.
In each case, the discriminant and the vertex do real work. A negative discriminant in a projectile problem, for instance, would mean the object never reaches a certain height at all, while the vertex of an area or profit function directly answers "what is the best possible outcome," not just "when does the outcome equal zero." Recognizing a quadratic relationship, writing it in standard form, and then applying the formula (or simply reading off the vertex) is a repeatable process that works across geometry, physics, and business problems alike.
Do not leave this page knowing only a pair of numbers. Leave knowing what standard form is and why a cannot be zero. Understand where the quadratic formula actually comes from by completing the square, and understand why the ± symbol is what produces two roots from one formula. Know how to read the discriminant before you calculate anything, and know that a negative discriminant is not a dead end, it is a signal to switch to complex numbers. Understand how the vertex, axis of symmetry, factored form, and vertex form all describe the same parabola from different angles, and be able to connect a quadratic equation to a real situation such as projectile motion, area optimization, or profit maximization. Most importantly, you should be able to look at the calculator's output above and see exactly how the calculator got there, not just what the final numbers are.
| What You Need | Formula |
|---|---|
| Standard Form | ax² + bx + c = 0 |
| Quadratic Formula | x = (−b ± √(b²−4ac)) / 2a |
| Discriminant | D = b² − 4ac |
| Vertex | (−b/2a, f(−b/2a)) |
| Axis of Symmetry | x = −b/2a |
| Y-Intercept | (0, c) |
| Factored Form | a(x − x₁)(x − x₂) |
| Vertex Form | a(x − h)² + k |
| Complex Roots | p ± qi, where p = −b/2a, q = √|D|/2a |
I need to solve ax²+bx+c=0, or I need the vertex, discriminant, or factored form.
You are hereI need general trigonometry, powers, roots, or advanced arithmetic.
Open Calculator ›What is the quadratic formula?
x = (−b ± √(b²−4ac)) / 2a, used to solve any equation in the form ax²+bx+c=0.
What does the discriminant tell you?
Its sign tells you whether the equation has two real roots (positive), one repeated real root (zero), or two complex roots (negative), before you finish solving.
Can a quadratic equation have no solution at all?
If a is not zero, no. It always has exactly two solutions counting a repeated root twice, they may just be complex rather than real.
What happens if a = 0?
The equation is no longer quadratic. This calculator falls back to solving it as a linear equation bx + c = 0 instead.
What if a = 0 and b = 0?
If c is also 0, every real number is a solution. If c is not 0, the equation has no solution at all, since a nonzero constant can never equal zero.
Why is a negative discriminant not "no solution"?
It means there is no real solution. The two solutions still exist as complex conjugate numbers, p ± qi.
What is a complex root?
A root of the form p + qi, where i is defined so that i² = −1. Complex roots from a real quadratic always come in conjugate pairs.
What is the vertex of a parabola?
Its single turning point, at x = −b/2a. It is a minimum when a > 0 and a maximum when a < 0.
What is the axis of symmetry?
The vertical line x = −b/2a that the parabola is a mirror image across.
What is the y-intercept of a quadratic?
The point (0, c), found by setting x = 0 in ax²+bx+c.
What is factored form?
a(x − x₁)(x − x₂), available whenever the roots x₁ and x₂ are rational numbers.
What is vertex form?
a(x − h)² + k, where (h, k) is the vertex. It is produced by completing the square.
Where does the quadratic formula come from?
It is derived once, in general, by completing the square on ax²+bx+c=0, so it then works for every quadratic equation.
Why is there a ± sign in the formula?
Because taking a square root of both sides of an equation always introduces two possibilities, a positive and a negative root.
Can this calculator handle fractional coefficients?
Yes. Coefficients like 1/4 or -1.5 are accepted and, where possible, solved using exact fraction arithmetic rather than rounded decimals.
Can I type a full equation instead of a, b, and c?
Yes. Switch to Full Equation mode and type something like 2x^2 + 7x - 4 = 0 or x^2 = 9.
What happens if my equation cannot be parsed?
The calculator will not guess. It shows a message asking you to switch to Coefficients mode and enter a, b, and c directly.
Does the order I enter the roots matter?
No. The formula's ± symbol produces both roots as a symmetric pair; which one is labeled "first" is just a display choice.
How do I know if the roots will be rational?
Check whether the discriminant is a perfect square. If it is, the roots are rational; if not, they are irrational but still real, as long as D ≥ 0.
What does it mean for a parabola to "open downward"?
The leading coefficient a is negative, so the vertex is the highest point on the curve rather than the lowest.
Is the vertex always one of the roots?
Only when the discriminant is zero. Otherwise the vertex is a separate point from either root.
How is the quadratic formula used in real life?
Common uses include projectile motion (finding when a thrown object lands), area optimization with a fixed perimeter, and profit maximization in business models.
What is the difference between this and the Fraction Calculator?
This calculator solves equations involving x². The Fraction Calculator performs arithmetic on plain fractions with no unknown variable.
Can two different quadratic equations have the same roots?
Yes. Multiplying every term of an equation by the same nonzero number changes a, b, and c but leaves the roots unchanged.
Does this calculator show a graph?
Yes. After solving, a scaled parabola graph appears showing the vertex, axis of symmetry, y-intercept, and any real roots.
Why do my decimal roots not exactly match a hand calculation?
They should, within normal rounding. This calculator keeps exact fractions and radicals internally and only rounds for the final display.
Coefficients entered as whole numbers or simple fractions (such as 1/4) are converted internally into exact fractions rather than rounded decimals. When a, b, and c are whole numbers, the discriminant is computed as an exact integer, checked against a perfect square, and, if it is not a perfect square, simplified into an exact radical (for example 1 ± √3) rather than only a decimal approximation. Complex roots are computed the same way and displayed exactly whenever the underlying numbers allow it. When coefficients are fractional and the discriminant is not a perfect square, the calculator still solves the equation correctly but shows a decimal approximation rather than a fully simplified radical fraction. A = 0 is treated as a genuine edge case rather than an error: the equation is solved as linear when b is nonzero, as "all real numbers" when b and c are both zero, and as "no solution" only in the single case where a = 0, b = 0, and c is nonzero. The equation parser in Full Equation mode recognizes terms of the form nx^2, nx, and n on either side of an equals sign; if it cannot confidently identify every term, it declines to guess and asks you to switch to Coefficients mode.