AI Tools Free

Quadratic Equation Solver

Enter coefficients a, b, and c from ax² + bx + c = 0 into this quadratic equation solver to calculate the discriminant Δ = b² − 4ac and the real, repeated, or complex conjugate roots in one click. All calculations run locally in your browser rounded to 4 decimal places.

Free to useNo sign-upRuns in your browser
Enter your details

Update the inputs to see your result.

Your result
Enter your details

Result will appear here

How to solve quadratic equations with the quadratic formula

A quadratic equation solver finds the two roots (x-intercepts or complex solutions) of any second-degree polynomial written in standard form ax² + bx + c = 0 (a ≠ 0). Enter your three real coefficients (1, -3, and 2 preloaded for x² − 3x + 2 = 0) to see how to solve quadratic equations (x = 2 or 1 with Discriminant = 1) right in your browser.

Discriminant Δ = b² − 4ac; roots x = (−b ± √Δ) / (2a) for Δ ≥ 0, or (−b / 2a) ± (√(−Δ) / |2a|)i for Δ < 0.

Evaluates Δ = b² − 4ac to classify Two real roots, One repeated real root, or Complex roots (see our Parabola Vertex Calculator), rounding displayed values to at most 4 decimal places.

Diagram showing coefficients a, b, c feeding the discriminant check Δ = b² − 4ac to branch into two real roots, one repeated root, or complex conjugates
With a = 1, b = -3, and c = 2, the discriminant is Δ = 1 and the roots are x = 2 or 1.

Quadratic Equation Solver Formula & Discriminant Table (10 Cases)

Compare 10 standard quadratic equations ax² + bx + c = 0 across all three discriminant regimes (Δ > 0, Δ = 0, Δ < 0), showing the coefficients (a, b, c), discriminant Δ, displayed headline output, and root classification.

Quadratic Equation (ax² + bx + c = 0)Coefficients (a, b, c)Discriminant Δ = b² − 4acCalculator Headline OutputRoot Classification & Factored Form
x² − 3x + 2 = 0 (Preloaded Default)1, -3, 21 (Δ > 0, square)x = 2 or 1Two real roots: (x − 2)(x − 1) = 0
x² − 5x + 6 = 01, -5, 61 (Δ > 0, square)x = 3 or 2Two real roots: (x − 3)(x − 2) = 0
x² − 9 = 0 (Difference of Squares)1, 0, -936 (Δ > 0, square)x = 3 or -3Two symmetric real roots: (x − 3)(x + 3) = 0
2x² + 5x − 3 = 0 (a > 1 Factorable)2, 5, -349 (Δ > 0, square)x = 0.5 or -3Two rational roots: (2x − 1)(x + 3) = 0
x² − 2x − 1 = 0 (Irrational Roots)1, -2, -18 (Δ > 0, non-square)x = 2.4142 or -0.4142Two irrational roots: 1 ± √2
x² − x − 1 = 0 (Golden Ratio)1, -1, -15 (Δ > 0, non-square)x = 1.618 or -0.618Two irrational roots: (1 ± √5) / 2
x² − 6x + 9 = 0 (Perfect Square)1, -6, 90 (Δ = 0)x = 3One repeated real root: (x − 3)² = 0
4x² + 12x + 9 = 04, 12, 90 (Δ = 0)x = -1.5One repeated real root: (2x + 3)² = 0
x² + 1 = 0 (Pure Imaginary)1, 0, 1-4 (Δ < 0)0 ± 1iComplex conjugates: x = ±i
x² − 2x + 5 = 0 (Complex Conjugates)1, -2, 5-16 (Δ < 0)1 ± 2iComplex conjugates: (x − 1)² = -4

How to use this solving quadratic equations calculator in 3 steps

Follow these three steps to run this solving quadratic equations calculator in your browser.

Enter coefficients a, b, and c

Write your equation in standard form ax² + bx + c = 0 and enter Coefficient a (1 preloaded), Coefficient b (-3 preloaded), and Coefficient c (2 preloaded), entering 0 for any missing bx or c term.

Coefficient a
Quadratic Equation Solver input panel showing Coefficient a = 1, Coefficient b = -3, and Coefficient c = 2
Step 1: Enter nonzero Coefficient a alongside Coefficient b and Coefficient c.

Select Calculate to run the solver

Click Calculate to submit your three numbers and update the output panel immediately in your browser.

0 ± 1i
Quadratic Equation Solver result panel displaying 0 ± 1i and Complex roots label
Step 2: Select Calculate to evaluate Δ = b² − 4ac and the real or complex roots.

Read the 4-decimal component cards

Inspect the three summary cards below the headline (Discriminant, First root, Second root for Δ ≥ 0, or Discriminant, Real part, Imaginary magnitude for Δ < 0), rounded to at most 4 decimal places.

Discriminant
Quadratic Equation Solver summary cards showing Discriminant, Real part, and Imaginary magnitude
Step 3: Review Discriminant, First/Second root or Real/Imaginary components rounded to 4 decimal places.

Worked examples: solving quadratic equations by factoring and formula

Review three worked algebra problems demonstrating how to solve quadratic equations by factoring and via the quadratic formula across distinct real, repeated, and complex cases.

Preloaded factorable trinomial (x² − 3x + 2 = 0)

With the preloaded defaults a = 1, b = -3, c = 2, clicking Calculate returns x = 2 or 1 (Two real roots) with Discriminant: 1, First root: 2, and Second root: 1. When learning how to solve quadratic equations by factoring, you look for two integers that multiply to a × c = 2 and add to b = -3 (-2 and -1), factoring the equation into (x − 2)(x − 1) = 0. Substituting into the quadratic formula gives the identical result: x = (3 ± √(9 − 8)) / 2 = (3 ± 1) / 2, yielding First root = 2 and Second root = 1. To factor larger integers when testing candidate pairs, use our Prime Factorization Calculator.

Factorable quadratic example x² − 3x + 2 = 0 with Δ = 1 producing two real roots x = 2 and x = 1
Coefficients 1, -3, 2 give Δ = 1 and two distinct real roots: x = 2 or 1.

Perfect-square repeated root (x² − 6x + 9 = 0)

When a quadratic is a perfect-square trinomial such as x² − 6x + 9 = 0, entering a = 1, b = -6, c = 9 yields Discriminant: 0 and outputs x = 3 (One repeated real root), with both First root and Second root equal to 3. Geometrically, Δ = (-6)² − 4(1)(9) = 0 means the parabola's vertex sits directly on the x-axis at (3, 0) rather than crossing it twice. You can verify the vertex coordinates and focal distance in our Parabola Vertex Calculator and Parabola Focus Calculator.

Perfect-square quadratic example x² − 6x + 9 = 0 with Δ = 0 producing one repeated real root x = 3
Coefficients 1, -6, 9 give Δ = 0 and a single repeated tangent root at x = 3.

Complex conjugate pair (x² − 2x + 5 = 0)

When the parabola never intersects the real x-axis, such as x² − 2x + 5 = 0 (a = 1, b = -2, c = 5), the discriminant is negative: Δ = (-2)² − 4(1)(5) = -16. Clicking Calculate returns 1 ± 2i (Complex roots) and breaks out Discriminant: -16, Real part: 1 (-b/(2a) = 2/2), and Imaginary magnitude: 2 (√16 / 2 = 2). For higher-degree polynomial evaluation or root radical checks, see our Polynomial Calculator and Nth Root Calculator.

Complex conjugate example x² − 2x + 5 = 0 with Δ = -16 producing roots 1 ± 2i
Coefficients 1, -2, 5 give Δ = -16 and complex conjugate roots 1 ± 2i.

Solving quadratics by completing the square, factoring, and Vieta's rules

Use these two algebraic relationships to compare solution methods and double-check your roots:

First, every method for solving ax² + bx + c = 0 is algebraically linked to Δ = b² − 4ac. Factoring into a(x − r₁)(x − r₂) = 0 works cleanly over the integers or rationals only when Δ is a perfect square (0, 1, 4, 9, 16, 25, 49...); if you obtain decimal roots like 0.5 or -1.5, you can convert them back into exact fractions with our Decimal to Fraction Converter. For how to solve quadratic equations by completing the square, divide the equation by a to get x² + (b/a)x = −c/a, add (b/(2a))² to both sides to form the perfect square (x + b/(2a))² = (b² − 4ac)/(4a²), and take the square root of both sides, which directly derives the quadratic formula x = (−b ± √(b² − 4ac)) / (2a).

Second, you can verify any pair of real or complex roots (r₁ and r₂) in seconds using Vieta's formulas without expanding the entire polynomial. The sum of the two roots must equal r₁ + r₂ = −b/a, and the product of the two roots must equal r₁ × r₂ = c/a. For example, in 2x² + 5x − 3 = 0 (x = 0.5 or -3), the sum is 0.5 + (-3) = -2.5 = -5/2 and the product is 0.5 × (-3) = -1.5 = -3/2. If you need to solve simultaneous linear equations instead of a single quadratic, use our System of Equations Solver.

Diagram connecting completing the square (x + b/2a)² = Δ/4a² to Vieta's root sum −b/a and product c/a
Completing the square derives the quadratic formula, while Vieta's rules verify r₁ + r₂ = −b/a and r₁r₂ = c/a.

Quadratic equation solver input rules, nonzero a check, and 4-decimal rounding

Verify these two input and formatting rules before substituting the displayed roots into downstream engineering or homework formulas:

First, rearrange your equation so all terms sit on the left side of = 0 (ax² + bx + c = 0) before reading off a, b, and c. Coefficient a must be nonzero; entering a = 0 triggers "Coefficient a must not be zero for a quadratic equation." because removing the x² term reduces the equation to a first-degree linear equation bx + c = 0 (which you can solve directly in our Linear Equation Solver). When an equation lacks a linear bx term (such as x² − 9 = 0) or a constant c term (such as x² − 4x = 0), explicitly enter 0 into that field.

Second, all calculations execute locally in IEEE 754 double-precision floating-point arithmetic, and the display formatter rounds Discriminant, First root, Second root, Real part, and Imaginary magnitude to at most 4 decimal places (maximumFractionDigits: 4). Irrational roots such as 1 + √2 display as 2.4142 rather than symbolic radical expressions.

Summary of standard form ax² + bx + c = 0 requirement, nonzero a check, and 4-decimal rounding
Requires nonzero Coefficient a in standard form ax² + bx + c = 0 and rounds outputs to 4 decimal places.

Frequently asked questions about the quadratic equation solver

Answers about using Quadratic Equation Solver and understanding its results.

What is the formula for solving quadratic equations?

To solve any quadratic equation written in standard form ax² + bx + c = 0 (a ≠ 0), apply the quadratic formula: x = (−b ± √(b² − 4ac)) / (2a). Here a is the x² multiplier, b is the x multiplier, and c is the constant term.

What does the discriminant b² − 4ac tell you about the roots?

The discriminant Δ = b² − 4ac determines both the number and type of roots: when Δ > 0, the equation has two distinct real roots (two x-intercepts); when Δ = 0, it has one repeated real root x = −b/(2a) (the parabola vertex touches the x-axis); and when Δ < 0, it has a pair of complex conjugate roots Re ± Im i (no real x-intercepts).

How do you solve a quadratic equation by factoring?

Move all terms to one side (ax² + bx + c = 0) and find two integers p and q whose product equals a × c and whose sum equals b. Rewrite the middle term as px + qx, factor by grouping into (dx + e)(fx + g) = 0, and set each binomial factor equal to zero to solve for x.

How do we solve quadratic equations by completing the square?

Divide ax² + bx + c = 0 by a and move the constant term to the right side: x² + (b/a)x = −c/a. Add the square of half the linear coefficient, (b/(2a))², to both sides to form (x + b/(2a))² = (b² − 4ac)/(4a²), then take the square root of both sides and subtract b/(2a).

Why can't Coefficient a equal zero in this solver?

When a = 0, the ax² term vanishes and ax² + bx + c = 0 becomes the linear equation bx + c = 0, which would cause division by zero (2a = 0) in the quadratic formula. Entering a = 0 displays "Coefficient a must not be zero for a quadratic equation."

Does this Quadratic Equation Solver output exact radicals or rounded decimals?

It outputs numerical decimals rounded to at most 4 decimal places (maximumFractionDigits: 4). Exact integer or terminating quarter/tenth roots (such as 2, 0.5, or -1.5) display without trailing zeros, while irrational roots (such as 1 ± √2) round to 4 decimal places (2.4142 and -0.4142).

Solve your quadratic equation now

Choose another tool for your next calculation, conversion, or text task.

Calculate