alleasycalc
Suggest
Quadratic Formula Calculator

Quadratic Formula Calculator

Enter a, b and c from ax² + bx + c = 0 to solve for x with every step of the substitution shown: the discriminant, the exact roots (as fractions, simplified surds or a complex pair), the factored form, and the vertex of the parabola.

Your equation: ax² + bx + c = 0

Leave this at 0 to solve a linear equation, bx + c = 0, instead.

Decimals and negative numbers are all welcome, for instance a = 0.5 or b = -3.25.

What the quadratic formula does

Any equation you can arrange into the standard form ax² + bx + c = 0, with a not equal to zero, has exactly the same two solutions every time, and the quadratic formula hands them to you directly from the three coefficients.

x = (−b ± √(b² − 4ac)) / (2a)

The formula itself comes from a technique called completing the square: dividing through by a, moving the constant across, then adding the right amount to both sides so the left-hand side becomes a single squared bracket, (x + b/2a)². Once the x terms are trapped inside one square, a square root on both sides peels the bracket open, and rearranging for x produces the formula above. You never need to repeat that derivation to use the calculator; it is only worth knowing that the ± and the square root both trace back to that one "undo the square" step, not two separate rules.

Reading the discriminant

Everything under the square root, b² − 4ac, is called the discriminant and is usually written as the Greek letter delta (Δ). Its sign alone tells you what kind of roots to expect before you even finish the calculation.

DiscriminantWhat it meansRoots
Δ > 0The square root is a real numberTwo distinct real roots
Δ = 0The square root is zeroOne repeated real root
Δ < 0The square root of a negative numberTwo complex roots, no real solution

Graphically, the discriminant is telling you how the parabola sits relative to the horizontal axis: a positive discriminant means the curve crosses the axis at two points, zero means it just touches the axis at a single point (the vertex), and a negative discriminant means the whole curve stays on one side of the axis and never reaches it. If Δ also happens to be a perfect square, such as 1, 4, 9 or 25, the square root comes out as a whole number and the roots are rational, often nice enough to write as simple fractions or whole numbers.

When factoring beats the formula

Factoring means spotting two numbers that multiply to give a×c and add to give b, then splitting the middle term and grouping. For small, whole-number coefficients this is often faster than reaching for the formula at all: x² − 5x + 6 factors on sight into (x − 2)(x − 3), since −2 and −3 multiply to 6 and add to −5. The quadratic formula, by contrast, always works, whatever the coefficients are, including the many cases where no pair of nice integers exists and factoring by inspection would take longer than it is worth (or simply is not possible over rational numbers at all). This calculator runs the formula regardless, then checks afterwards whether the result also factors neatly, so you get the shortcut version whenever one exists.

Common sign mistakes

Three slips account for most wrong answers when the formula is worked by hand.

First, −b does not mean "copy b's sign": if b is −5, then −b is +5, not −5 again. It is easy to see a negative coefficient and instinctively write another minus sign in front of it.

Second, the division by 2a applies to the whole numerator, −b plus or minus the square root, not only to the square root on its own. Writing −b + √Δ/(2a) instead of (−b + √Δ)/(2a) is a very common and completely different (and wrong) calculation.

Third, when a is negative, 2a is negative too, which flips which root is the larger of the two once the division happens; the arithmetic still works, but it is worth double-checking the sign of the final answer against the sign of a rather than assuming a positive lead coefficient throughout.

Vertex, axis of symmetry and the parabola's shape

Every quadratic graphs as a parabola, and its lowest or highest point, the vertex, sits at x = −b/(2a), exactly halfway between two real roots when they exist. Substituting that x back into the equation gives the vertex's y-value, which works out to −Δ/(4a). The vertical line through the vertex, x = −b/(2a), is the axis of symmetry: fold the parabola along it and both halves match exactly.

The sign of a decides which way the parabola opens: positive a opens upward, so the vertex is the lowest point of the curve, while negative a opens downward and the vertex is the highest point. Put together with the discriminant, the vertex explains the three root cases visually: an upward parabola with a vertex below the axis must cross it twice (Δ > 0), one sitting exactly on the axis touches it once (Δ = 0), and one sitting above the axis never reaches it (Δ < 0), with the mirror image applying when the parabola opens downward instead.

Rational, irrational and complex roots

When the discriminant is a perfect square, the square root resolves to a whole number (or a whole number over a whole number, once any fraction in a, b or c is accounted for), so both roots are rational and this calculator shows them as exact fractions alongside their decimal equivalents. When the discriminant is positive but not a perfect square, the roots are real but irrational: the calculator simplifies the surd where it can, pulling out any perfect-square factor so √48 becomes 4√3, and prints the exact form such as (−3 + √17)/4 next to its decimal approximation. When the discriminant is negative, there is no real number whose square is negative, so the two roots become a complex conjugate pair, p ± qi, where p = −b/(2a) and q = √|Δ|/(2a); the parabola simply never meets the x-axis in that case, which is why "no real solution" and "complex roots" describe the same outcome from two different angles.

Vieta's formulas offer a fast way to sanity-check any of the three cases without redoing the whole calculation: for ax² + bx + c = 0, the two roots always add up to −b/a and always multiply to c/a, whether the roots are rational, irrational or complex. If your two computed roots do not sum and multiply to those two values, something went wrong earlier in the working, which is why this calculator prints both checks alongside the vertex.

Questions people ask

What happens if a is 0?

The x² term disappears and the equation is no longer quadratic, just linear: bx + c = 0, which solves to x = −c/b. This calculator switches to that simpler working automatically whenever a is 0, provided b is not also 0.

What does a negative discriminant actually mean?

It means the equation has no real solution: the parabola it describes never crosses or touches the x-axis. The two roots still exist mathematically as a complex conjugate pair, p ± qi, but neither one is a real number you could plot on an ordinary number line.

Should I factor first or just use the formula?

If the coefficients are small whole numbers and a pair of factors of a×c that add to b is easy to spot, factoring is usually quicker. The quadratic formula is the reliable fallback: it always works, including for coefficients where factoring by inspection is slow, or impossible over whole numbers entirely.

Why does the formula have a ± sign in it?

Because a square root undoes a square in two possible ways: both a positive and a negative number square to the same positive result. Completing the square leaves you with (x + b/2a)² = something, and taking the square root of both sides has to allow for either sign, which is where the two roots of a quadratic come from.

What is the difference between the roots and the vertex?

The roots are the x-values where the parabola crosses or touches the horizontal axis (y = 0); there can be two, one or none of them among the real numbers. The vertex is the single turning point of the parabola, its lowest point if a is positive or its highest if a is negative, and it exists for every quadratic regardless of how many real roots there are.

Can rounding too early give a wrong answer?

Yes, particularly when the discriminant is close to a perfect square or the coefficients involve several decimal places. This calculator keeps every coefficient as an exact fraction throughout the working and only converts to a decimal at the very end, which is why it can tell a truly rational root from one that merely looks tidy when rounded.

What are Vieta's formulas for?

They are a shortcut linking the coefficients directly to the roots without solving anything: the two roots of ax² + bx + c = 0 always sum to −b/a and always multiply to c/a. They are useful both as a quick mental check on a solved equation and, run in reverse, as a fast way to build a quadratic when you already know the two roots you want it to have.

This tool solves any real-valued quadratic (or linear, when a is 0) exactly where the maths allows it, and to several decimal places otherwise. For a plain worksheet fraction, ratio or percentage problem rather than an equation to solve, try the fraction calculator on this site instead.

Report a bug

Say what went wrong and where. One sentence is plenty; we read every report.

Embed this calculator

Paste this into your page. The frame sizes itself to fit. Embedding is free while AllEasyCalc grows; the small credit link stays visible.

Email this result

The email comes from AllEasyCalc and carries a link that reopens this calculator with the numbers filled in. One-off, no mailing list.

Suggest a calculator

Name the question you want answered. If it can be worked out, it goes on the build list.