← All Calculators

Quadratic Equation

Solve ax² + bx + c = 0

Quadratic Equation
Solve ax² + bx + c = 0

Quadratic formula and the discriminant

A quadratic equation has the form ax² + bx + c = 0, where a must not be zero. The calculator uses the quadratic formula to find the equation’s roots—values of x that make the equation equal zero.

Formula

x = (−b ± √(b² − 4ac)) ÷ (2a). The expression D = b² − 4ac is called the discriminant. If it is positive, there are two distinct real roots; if it is zero, there is one repeated real root; if it is negative, the roots are complex rather than real.

Worked example

For x² − 5x + 6 = 0, the coefficients are a = 1, b = −5, and c = 6. The discriminant is 25 − 24 = 1, so the roots are (5 ± 1) ÷ 2: x = 2 and x = 3.

Enter the coefficients with their signs exactly as they appear in the equation. For example, the coefficient of −5x is −5. If a = 0, the equation is linear rather than quadratic and this formula does not apply.

Tips for accurate results

Write the equation as ax² + bx + c = 0 before entering the coefficients, with the terms moved to one side. The discriminant b² − 4ac tells you what to expect: positive gives two real roots, zero gives one repeated root, and negative gives two complex roots. For x² − 5x + 6 = 0, the roots are 2 and 3.

Common mistakes and limits

Check that a is not zero, because then the equation is linear. Sign errors in b and c are common, so substitute the roots back into the original equation to confirm. Real-world problems may have roots that are mathematically valid but physically meaningless, such as a negative time.

About AllCalc

AllCalc is a free calculator hub. Everything runs in your browser — no accounts, no downloads, no clutter. Results are for reference only and are not a substitute for professional financial, medical, or legal advice.

Read more →

Privacy

Calculator inputs are processed in your browser. See the Privacy Policy for details about local storage, third-party advertising, and contact-form submissions.

Read the full policy →

Terms

AllCalc provides general reference calculations. Verify important results independently. Use is at your own risk.

Read the full terms →