Solve ax²+bx+c=0
Last reviewed: January 2026
Solve any quadratic equation ax²+bx+c=0 using the quadratic formula. Shows real and complex roots with steps. This calculator runs entirely in your browser — your data stays private, and no account is required.
For any equation ax² + bx + c = 0 (where a ≠ 0): x = (−b ± √(b² − 4ac)) ÷ 2a. The ± gives two solutions. The discriminant (b² − 4ac) determines the nature of roots: positive → two distinct real roots. Zero → one repeated real root (parabola touches x-axis). Negative → no real roots, two complex roots. When a = 1, factoring is often faster. Use the formula when factoring is not immediately obvious or when roots are irrational.
Factoring: fastest when it works, requires rational roots. For x² − 5x + 6 = 0: factor to (x − 2)(x − 3) = 0, roots are 2 and 3 immediately. The quadratic formula: always works, gives exact answers even for irrational roots like (1 + √5)/2. Completing the square: most useful when rewriting a parabola in vertex form y = a(x − h)² + k, or when deriving the formula itself. For most computational purposes, the formula is the most reliable method.
| Discriminant (b²-4ac) | Solutions | Type | Example |
|---|---|---|---|
| Positive (D > 0) | Two distinct real | Crosses x-axis twice | x²-5x+6=0 → x=2,3 |
| Zero (D = 0) | One repeated real | Touches x-axis once | x²-6x+9=0 → x=3 |
| Negative (D < 0) | Two complex | No real x-intercepts | x²+1=0 → x=±i |
The quadratic formula, x = (-b ± √(b² - 4ac)) / 2a, solves any quadratic equation of the form ax² + bx + c = 0. It's derived by completing the square on the general form and works for all quadratic equations regardless of whether they can be factored. The expression under the square root — b² - 4ac — is called the discriminant and determines the nature of the solutions. A positive discriminant produces two distinct real solutions (the parabola crosses the x-axis at two points). A discriminant of zero produces exactly one real solution, called a repeated root (the parabola touches the x-axis at its vertex). A negative discriminant produces two complex conjugate solutions (the parabola doesn't cross the x-axis). Understanding the discriminant before solving saves time — you immediately know whether the equation has real solutions and how many. For graphing quadratic functions, see our Graphing Calculator.
| Method | When to Use | Advantages | Limitations |
|---|---|---|---|
| Factoring | Integer solutions, simple coefficients | Fast, intuitive | Only works for factorable equations |
| Quadratic formula | Any quadratic equation | Always works, systematic | More computation |
| Completing the square | Deriving vertex form | Shows vertex, useful for graphing | Tedious with non-integer coefficients |
| Graphing | Approximate solutions, visualization | Visual understanding | Imprecise unless using technology |
| Square root method | No linear term (b = 0) | Simplest method | Only when b = 0 |
Factoring is the preferred method when applicable because it's fast and reveals the structure of the equation. For ax² + bx + c where a = 1 (the leading coefficient is 1), find two numbers that multiply to c and add to b. For example, x² + 7x + 12 = 0: find numbers that multiply to 12 and add to 7 — that's 3 and 4. So x² + 7x + 12 = (x + 3)(x + 4) = 0, giving x = -3 or x = -4. When a ≠ 1, use the AC method: multiply a × c, find two numbers that multiply to ac and add to b, then use grouping to factor. For 2x² + 7x + 3 = 0: ac = 6, find numbers multiplying to 6 and adding to 7 — that's 1 and 6. Rewrite: 2x² + x + 6x + 3 = x(2x + 1) + 3(2x + 1) = (x + 3)(2x + 1) = 0, giving x = -3 or x = -1/2.
Special factoring patterns save time when recognized. The difference of squares: a² - b² = (a + b)(a - b), so x² - 9 = (x + 3)(x - 3). Perfect square trinomials: a² + 2ab + b² = (a + b)², so x² + 6x + 9 = (x + 3)². These patterns appear frequently in algebra and should be recognized on sight. However, many quadratic equations with irrational or complex roots cannot be factored over the integers — for these, the quadratic formula is necessary. Approximately 60% of randomly generated quadratic equations with integer coefficients between -10 and 10 are factorable over the integers. For more equation-solving techniques, see our Equation Solver.
Quadratic equations model numerous real-world phenomena. Projectile motion follows a parabolic path described by h(t) = -½gt² + v₀t + h₀, where g is gravitational acceleration, v₀ is initial velocity, and h₀ is initial height. Solving this equation for h = 0 determines when a thrown ball hits the ground. Use our Projectile Motion Calculator for specific trajectory problems. Revenue optimization in business uses quadratic models — if price increases reduce unit sales linearly, revenue (price × quantity) forms a quadratic function whose vertex represents maximum revenue. Structural engineering uses quadratic equations to model beam deflection under load. Area problems naturally produce quadratics — finding the dimensions of a rectangle with a given perimeter that maximizes area, or determining fence dimensions for a given budget.
In finance, the time value of money creates quadratic relationships. Determining how long an investment takes to double at a given compound interest rate produces a quadratic when compounding is periodic. Break-even analysis for businesses — where revenue equals costs — often involves solving quadratic equations when cost or revenue functions are nonlinear. Physics applications extend beyond projectiles to include electrical circuits (power as a function of current through a resistor: P = I²R), optics (lens equations), and oscillatory motion. Statistics uses quadratic relationships in regression analysis — fitting parabolas to data sets that show curved relationships. For related mathematical operations, see our Square Root Calculator, Factorial Calculator, and Pythagorean Theorem Calculator.
The most frequent error in using the quadratic formula is misidentifying a, b, and c — especially when terms are missing or in non-standard order. The equation 3x - 5 + 2x² = 0 must be rewritten as 2x² + 3x - 5 = 0 before reading a = 2, b = 3, c = -5. Forgetting the ± sign gives only one solution instead of two. Sign errors in the discriminant (b² - 4ac) are common, particularly when c is negative — since 4ac involves multiplying two values, a negative c makes 4ac negative, and subtracting a negative number means adding. Another frequent mistake is dividing by 2a incorrectly — the entire numerator (-b ± √discriminant) must be divided, not just one term. Finally, students often forget to check solutions by substituting back into the original equation, which catches arithmetic errors and identifies extraneous solutions that may arise in related equations involving radicals or fractions.
See also: Scientific Calculator · Pythagorean Theorem Calculator · Exponent Calculator
→ Always write your equation in standard form first. Rearrange any quadratic to ax² + bx + c = 0 before entering coefficients. A common error is forgetting to move all terms to one side.
→ Use the discriminant as a quick check. Before solving, compute b² − 4ac mentally. If it's a perfect square, the roots will be rational — useful for factoring checks.
→ Verify by plugging roots back in. Substitute each solution back into the original equation. Both should produce zero (or very close, with rounding). This catches sign errors instantly.
→ Relate roots to the graph. The solutions are where the parabola crosses the x-axis. Visualize this with our Graphing Calculator to build geometric intuition.
See also: Graphing Calculator · Polynomial Solver · Slope Calculator · Scientific Calculator