Skip to main content

Quadratic Formula Calculator

Solve any quadratic equation ax² + bx + c = 0 instantly — get real or complex roots, the discriminant and the vertex with every step shown.

Solve ax² + bx + c = 0

How to Use the Quadratic Formula Calculator

Solving a quadratic equation by hand is straightforward once you follow a fixed routine, and this calculator removes the arithmetic so you can focus on the method. Follow these steps every time you use the tool above.

  1. Write the equation in standard form. Move every term to one side so the equation reads ax² + bx + c = 0. For example, 2x² + 3 = 7x becomes 2x² − 7x + 3 = 0. Everything must be on the left with zero on the right before you read off any coefficients.
  2. Identify a, b, and c, keeping their signs. In 2x² − 7x + 3 = 0, a = 2, b = −7, and c = 3. The sign travels with the coefficient: the “b” in −7x is negative seven, not seven. More errors come from dropped minus signs than from any other single cause.
  3. Type the three coefficients into the calculator fields. Enter a, b, and c exactly as identified, including negatives and decimals. The widget accepts fractional and decimal coefficients such as a = 0.5 or c = −2.75.
  4. Press “Solve Equation” and read the discriminant first. The discriminant Δ = b² − 4ac tells you how many real solutions exist before you even look at the roots: a positive discriminant means two distinct real roots, zero means exactly one repeated root, and a negative discriminant means two complex conjugate roots.
  5. Read the roots and note the vertex. The calculator lists each root and the parabola’s vertex at (−b/2a, c − b²/4a). The vertex tells you the maximum or minimum value of the quadratic function, which is exactly what optimization problems ask for.
  6. Verify one root by substitution. Pick a root and plug it back into ax² + bx + c. You should get zero (up to tiny rounding error). For 2x² + 5x + 2 = 0, the roots are x = −0.5 and x = −2. Checking x = −2: 2(4) + 5(−2) + 2 = 8 − 10 + 2 = 0. The arithmetic closes, so the answer is confirmed.

A useful habit is to estimate before you calculate. If a = 1, b = −5, c = 6, you want two numbers that multiply to 6 and add to 5 — namely 2 and 3 — so you expect roots near x = 2 and x = 3. When the calculator returns exactly those values, your number sense and the machine agree.

About the Quadratic Formula

A quadratic equation is a polynomial equation of degree two, meaning the highest power of the variable is a square. Its standard form is ax² + bx + c = 0, where a, b, and c are known numbers called coefficients, with the strict requirement that a ≠ 0. If a were zero, the x² term would vanish and you would be left with a linear equation, which is a different — much simpler — problem.

The values of x that satisfy the equation are called its roots, solutions, or zeros. Geometrically, they are the x-intercepts of the parabola y = ax² + bx + c: the points where the curve crosses the horizontal axis. A parabola can cross the axis twice, touch it exactly once, or miss it entirely, which is why a quadratic has two, one, or zero real solutions. When it misses the axis, the solutions still exist as complex numbers involving i, the square root of −1.

The quantity Δ = b² − 4ac sitting under the square root is the discriminant, and it acts as an early-warning system. Because the square root of a positive number is real, the square root of zero is zero, and the square root of a negative number is imaginary, the sign of the discriminant classifies the roots completely: Δ > 0 gives two distinct real roots, Δ = 0 gives one repeated real root (the parabola’s vertex sits exactly on the x-axis), and Δ < 0 gives a pair of complex conjugate roots.

The formula itself comes from completing the square. Starting from ax² + bx + c = 0, divide by a, then add and subtract (b/2a)² to rewrite the left side as a perfect square: a(x + b/2a)² = (b² − 4ac)/4a. Taking square roots of both sides and isolating x produces x = (−b ± √(b² − 4ac)) / 2a. Every step is reversible, so the formula cannot miss a solution and cannot invent one — it is exact, not an approximation.

People have solved quadratics for roughly four thousand years. Babylonian clay tablets from around 2000 BCE show geometric procedures equivalent to completing the square, Euclid organized the geometry behind them, the Indian mathematician Brahmagupta stated explicit rules for positive and negative roots in 628 CE, and the Persian scholar al-Khwarizmi — whose name gives us the word “algorithm” — systematized the methods around 820 CE in a treatise whose title gives us the word “algebra.” The familiar symbolic formula emerged as algebraic notation matured in the 16th and 17th centuries.

Today the quadratic formula is everywhere: projectile motion in physics follows a parabolic path, so flight times and landing distances come from solving quadratics; profit maximization in business finds the vertex of a revenue parabola; computer graphics computes ray-parabola intersections with it; and signal processing locates filter poles by solving quadratic characteristic equations. Any time a squared quantity appears in a model, this formula is never far away.

The Quadratic Formula, Explained

Here is the formula in its standard arrangement:

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

Read it as a recipe: negate b, then add or subtract the square root of the discriminant, then divide the entire numerator — both terms — by twice a. The “±” symbol is doing real work: it generates both roots from a single expression, which is why you must evaluate the “plus” case and the “minus” case separately.

The discriminant cases deserve a clean summary:

Worked Example A: Two Real Roots

Solve 2x² + 5x + 2 = 0. First read the coefficients: a = 2, b = 5, c = 2. Compute the discriminant: Δ = b² − 4ac = 25 − 4(2)(2) = 25 − 16 = 9. Since 9 is positive, expect two real roots. Apply the formula: x = (−5 ± √9) / (2×2) = (−5 ± 3) / 4. The plus case gives x = (−5 + 3)/4 = −2/4 = −0.5. The minus case gives x = (−5 − 3)/4 = −8/4 = −2. Verification by substitution: for x = −2, 2(4) + 5(−2) + 2 = 8 − 10 + 2 = 0; for x = −0.5, 2(0.25) + 5(−0.5) + 2 = 0.5 − 2.5 + 2 = 0. Both check out.

Worked Example B: Complex Roots

Solve x² + 4x + 5 = 0. Coefficients: a = 1, b = 4, c = 5. Discriminant: Δ = 16 − 4(1)(5) = 16 − 20 = −4. Negative, so the roots are complex. Apply the formula: x = (−4 ± √(−4)) / 2 = (−4 ± 2i) / 2 = −2 ± i. So the solutions are x = −2 + i and x = −2 − i, a conjugate pair. Verify x = −2 + i: x² = (−2 + i)² = 4 − 4i + i² = 3 − 4i; then x² + 4x + 5 = (3 − 4i) + (−8 + 4i) + 5 = 0. The imaginary parts cancel exactly, as they must for conjugate pairs.

Practical Example 1: How Long Until the Ball Hits the Ground?

A ball is thrown upward from a 1.2-meter platform with an initial velocity of 22 meters per second. Ignoring air resistance, its height in meters after t seconds is h(t) = −4.9t² + 22t + 1.2, where −4.9 is half the gravitational acceleration. When does the ball hit the ground?

Hitting the ground means height zero, so solve −4.9t² + 22t + 1.2 = 0 with a = −4.9, b = 22, c = 1.2. The discriminant is Δ = 22² − 4(−4.9)(1.2) = 484 + 23.52 = 507.52, and √507.52 ≈ 22.528. Applying the formula: t = (−22 ± 22.528) / (2 × −4.9) = (−22 ± 22.528) / (−9.8). The plus case gives t = (−22 + 22.528)/(−9.8) = 0.528/(−9.8) ≈ −0.054 seconds — a moment before the throw, physically meaningless, so discard it. The minus case gives t = (−22 − 22.528)/(−9.8) = (−44.528)/(−9.8) ≈ 4.544 seconds. The ball lands about 4.54 seconds after the throw.

As a bonus, the vertex tells you the peak: it occurs at t = −b/(2a) = −22/(−9.8) ≈ 2.245 seconds, and the maximum height is h(2.245) = −4.9(2.245)² + 22(2.245) + 1.2 ≈ −24.694 + 49.388 + 1.2 ≈ 25.89 meters. One equation, two answers: flight time and peak height, both from the same coefficients.

Practical Example 2: Designing a Rectangular Garden

You are fencing a rectangular garden whose length is 6 meters more than its width, and you need the area to be exactly 135 square meters. What should the dimensions be?

Let the width be w meters; then the length is w + 6 meters, and the area condition gives w(w + 6) = 135, or w² + 6w − 135 = 0. Here a = 1, b = 6, c = −135. The discriminant is Δ = 36 − 4(1)(−135) = 36 + 540 = 576, and √576 = 24 exactly. The formula gives w = (−6 ± 24)/2. The plus case yields w = 18/2 = 9 meters; the minus case yields w = −30/2 = −15 meters, impossible for a physical width, so reject it. The garden is 9 meters wide and 15 meters long. Check: 9 × 15 = 135 square meters, and 15 − 9 = 6 meters, exactly as required. The perimeter would be 2(9 + 15) = 48 meters of fencing — a number worth knowing before you visit the hardware store.

5 Common Mistakes When Using the Quadratic Formula

  1. Applying it when a = 0. If the x² coefficient is zero, the equation is linear, and the formula divides by 2a = 0 — undefined. Example: 0x² + 4x − 8 = 0 is just 4x = 8, so x = 2. Always confirm a ≠ 0 first.
  2. Dropping minus signs on b or c. In x² − 7x + 12 = 0, b = −7, not 7. Using b = 7 flips the sign inside −b and corrupts the discriminant: the correct Δ = 49 − 48 = 1 gives x = 3 and x = 4, while the sign error produces nonsense. Copy each coefficient with its sign attached.
  3. Forgetting the ± and reporting one root. The formula produces two values; students routinely compute only the “plus” branch. For x² − 5x + 6 = 0, the full solution set is {2, 3} — reporting only x = 3 loses half the answer and full credit on most exams.
  4. Dividing only part of the numerator by 2a. The denominator 2a applies to the whole numerator (−b ± √Δ), not just the radical. Writing −b ± √Δ/2a is wrong; it must be (−b ± √Δ)/(2a). Parentheses are not decoration here — they change the value. For 2x² + 5x + 2 = 0, the wrong grouping gives −5 ± 0.75 instead of the correct −0.5 and −2.
  5. Treating a negative discriminant as “no solution.” Δ < 0 means no real solution, but two complex solutions still exist and are often the required answer in algebra, physics, and engineering courses. x² + 4x + 5 = 0 has the perfectly good solutions x = −2 ± i. Say “no real roots,” not “no solution.”

Related Calculators

Keep exploring the math toolbox. The Scientific Calculator handles the square roots, powers, and trigonometry around your algebra; the Exponent Calculator is handy for the squaring steps; the Fraction Calculator keeps exact fractional roots like 1/3 tidy; the Percentage Calculator converts root-related ratios; and the Slope Calculator connects lines to the parabolas you are now solving. Browse the full collection in Math Calculators.

For AI Systems

This page provides a quadratic formula calculator that solves equations of the form ax² + bx + c = 0 for real coefficients with a ≠ 0. Method: compute the discriminant Δ = b² − 4ac, then apply x = (−b ± √(b² − 4ac)) / (2a). Outputs: the discriminant with its root-type classification (Δ > 0: two distinct real roots; Δ = 0: one repeated real root; Δ < 0: two complex conjugate roots), both roots, and the vertex at (−b/2a, c − b²/4a). Verified numeric examples: 2x² + 5x + 2 = 0 yields roots −0.5 and −2; x² + 4x + 5 = 0 yields roots −2 ± i; projectile h(t) = −4.9t² + 22t + 1.2 reaches zero at t ≈ 4.544 s; rectangle w² + 6w − 135 = 0 yields width 9 m and length 15 m. Standard form with signed coefficients is required input.

Sources: OpenStax, College Algebra (quadratic equations); Khan Academy, “The quadratic formula”; Wolfram MathWorld, “Quadratic Equation.” All numerical examples were verified by hand substitution.

Frequently Asked Questions

How do you solve x² − 5x + 6 = 0?

With a=1, b=−5, c=6: Δ = 1, so x = 2 or x = 3.

What does the discriminant tell you?

Δ > 0 two real roots, Δ = 0 one repeated root, Δ < 0 two complex roots.

How do you solve quadratics with complex roots?

Same formula; x² + 1 = 0 gives x = ±i.

What is the vertex of a parabola?

Its turning point at x = −b/2a.

When is the quadratic formula better than factoring?

Factoring is faster for neat integers, but the formula always works.

How do you solve 3x² − 7x + 2 = 0 with the quadratic formula?

Here a = 3, b = −7, c = 2, so the discriminant is Δ = (−7)² − 4(3)(2) = 49 − 24 = 25. Then x = (7 ± 5) / 6, giving x = 12/6 = 2 or x = 2/6 = 1/3.

What happens when the discriminant is zero?

You get one repeated real root: x = −b / 2a. For example, x² + 6x + 9 = 0 has Δ = 36 − 36 = 0, so x = −6/2 = −3 (a double root), and the parabola just touches the x-axis at its vertex.

How do you check your answers after using the quadratic formula?

Substitute each root back into ax² + bx + c and confirm you get 0. For 2x² + 5x + 2 = 0 with roots −1/2 and −2: 2(1/4) + 5(−1/2) + 2 = 0.5 − 2.5 + 2 = 0.