Quadratic Formula Calculator
Solve ax² + bx + c = 0. Find both real or complex roots, or a repeated root, and see how the discriminant determines the answer.
Result
How is this calculated?
For ax² + bx + c = 0, D = b² − 4ac and the roots are (−b ± √D) ÷ (2a). Here a, b and c are the three coefficients and a cannot be zero.
Worked example: Solve an equation with complex roots
For x² − 2x + 5 = 0 the discriminant is −16. The two solutions are 1 + 2i and 1 − 2i.
Method and limits
Solves ax² + bx + c = 0 for nonzero a. The discriminant is calculated exactly from the typed decimal coefficients; roots are displayed to at most 14 significant digits. Very close distinct roots may display the same rounded value. Use at most 110 characters per number, with exponents from −420 to 420 and magnitude at most 1e120.
How to use this calculator
- Move all terms to the left so the equation equals zero, then enter the three signed coefficients. For an absent x or constant term, enter zero.
- Compute D = b² − 4ac to understand the result: positive means two real roots, zero one repeated root, and negative a conjugate pair. Open “How is this calculated?” to see the calculation for your inputs.
Find the roots when the leading coefficient is not 1
For 3x² − 11x + 6 = 0, the discriminant is 121 − 72 = 49. The two roots are (11 + 7) ÷ 6 = 3 and (11 − 7) ÷ 6 = 2/3. Substituting either into the original equation gives zero.
Write the equation in standard form
The solver expects the left-hand side to equal zero. For 2x² + 7 = 3x, subtract 3x from both sides to get 2x² − 3x + 7 = 0, so the three entries are 2, -3 and 7. A missing term has coefficient zero; an x² coefficient of zero makes the equation linear or constant instead.
Interpret the discriminant before rounding
D = b² − 4ac tells you what kind of roots to expect. For x² + 6x + 9 = 0, D = 36 − 36 = 0 and the repeated root is -3. For x² − 2x + 5 = 0, D = 4 − 20 = -16 and the roots are 1 + 2i and 1 − 2i. Only real roots appear as intersections between the parabola and the x-axis.
Check a solution by substitution
When the solver gives x = 3 for 3x² − 11x + 6 = 0, substitute it into the original expressions: 3 × 9 − 11 × 3 + 6 = 0. A rounded irrational root may produce a small nonzero residual, so recheck with more digits or substitute a symbolic expression when exact proof is required.
Frequently asked questions
- What if the equation has no x term?
- Enter 0 for b. For x² − 16 = 0, enter a = 1, b = 0 and c = -16 to get -4 and 4.
- Can I turn off complex roots?
- A negative discriminant means there is no real solution. The two complex roots are shown so you can distinguish “no real roots” from an invalid input.
- Why do two real results sometimes look identical?
- The root type uses the discriminant computed from the exact typed coefficients. Very close roots can round to the same display, even though the discriminant is positive and the roots are distinct.
- Does the order of Root 1 and Root 2 matter?
- No. Either order describes the same solution set. The numerical implementation computes the roots in an order that helps retain the smaller root when roots have very different magnitudes.
Common mistakes and limits
- An a of zero is not a quadratic. Move an equation’s right-hand side to the left before entering coefficients, including their signs.
- The discriminant sign uses the exact decimals you type. The displayed roots are rounded, so two different roots can look the same if they are extremely close.
Sources & methodology
Related calculators
- Root Calculator: Square, Cube and nth Roots
Find the real nth root of a number, including negative inputs with an odd degree.
- Exponent Calculator: Solve for a Power, Base or Exponent
Solve b to the power p = y. Enter any two values, leaving the unknown field blank.
- Scientific Calculator: Degrees and Radians
Evaluate real-number expressions with trig functions, logs, roots, powers and factorials. Switch between degrees and radians.
- Basic Calculator with Memory
Evaluate an arithmetic expression with brackets, percentages, and memory using the keypad or your keyboard.