How to use this calculator
- Enter coefficient a, coefficient b, coefficient c.
- Review the assumptions and units shown beside the fields.
- Read the live result, calculation note, and worked examples before using the answer.
Recognizing a quadratic in standard form
The calculator solves equations written as ax² + bx + c = 0, where a, b, and c are real coefficients and a is not zero. The x² term is what makes the equation quadratic. If a equals zero, the squared term disappears and the equation is linear, so the quadratic formula and this calculator's output no longer apply.
Before entering coefficients, move every term to one side and combine like powers. The coefficient includes its sign. For x² − 5x + 6 = 0, the entries are a = 1, b = −5, and c = 6. A missing x term means b = 0, as in x² + 1 = 0. A missing constant means c = 0. Treating a missing term as blank rather than zero can shift the remaining coefficients into the wrong fields.
The output is limited to real roots. A root is an x value that makes the polynomial equal zero. Depending on the coefficients, a quadratic has two distinct real roots, one repeated real root, or no real roots. The discriminant identifies which case occurs before the root calculation is completed.
Using the discriminant before calculating roots
The discriminant is Δ = b² − 4ac. Its sign controls the number of real solutions. A positive discriminant has two distinct square-root branches and therefore two real roots. A zero discriminant makes those branches identical, giving one repeated root. A negative discriminant has no real square root, so the calculator reports no real solutions.
For x² − 5x + 6 = 0, Δ = (−5)² − 4 × 1 × 6 = 25 − 24 = 1. The discriminant is not 9. That correction matters because √1 = 1, which produces roots 2 and 3. Using 9 would create √9 = 3 and lead to values that do not satisfy the original equation.
Compute the two pieces separately when signs are complicated: first b², then 4ac, and finally subtract the second from the first. If a and c have opposite signs, 4ac is negative, so subtracting it increases the discriminant. Parentheses around negative coefficients prevent the common mistake of reading (−5)² as −25; the square is positive 25.
Solving x² − 5x + 6 without skipping steps
Once Δ is nonnegative, use x = (−b ± √Δ)/(2a). For a = 1, b = −5, c = 6, the numerator begins with −b = 5, the square root is 1, and the denominator is 2. The minus branch gives (5 − 1) ÷ 2 = 2. The plus branch gives (5 + 1) ÷ 2 = 3.
Substitution provides an independent check. At x = 2, 2² − 5 × 2 + 6 = 4 − 10 + 6 = 0. At x = 3, 3² − 5 × 3 + 6 = 9 − 15 + 6 = 0. Both roots satisfy the equation. A candidate such as 1 or 4 produces 2 rather than zero, revealing the error immediately.
Factoring gives another check for this particular equation: x² − 5x + 6 = (x − 2)(x − 3). The factors show the same roots, but not every quadratic factors neatly using integers. The quadratic formula remains systematic, while substitution remains a reliable verification regardless of how the roots were found.
Two real roots when a is not one
Consider 2x² − 7x + 3 = 0. Here a = 2, b = −7, and c = 3. The discriminant is 49 − 24 = 25. Since it is positive, two distinct real roots exist. The denominator is 2a = 4, not simply 2, and the square root of the discriminant is 5.
The two branches are (7 − 5) ÷ 4 = 0.5 and (7 + 5) ÷ 4 = 3. Substitution checks both values. For x = 0.5, 2 × 0.25 − 7 × 0.5 + 3 = 0.5 − 3.5 + 3 = 0. For x = 3, 2 × 9 − 21 + 3 = 0.
Forgetting that the entire numerator is divided by 2a is a frequent source of wrong answers. Write a fraction bar or parentheses around −b ± √Δ before dividing. Applying the denominator only to the square-root term solves a different expression. The coefficient a affects both the discriminant and the denominator, so it cannot be treated as if every quadratic were monic.
A repeated root when the discriminant is zero
For x² + 4x + 4 = 0, a = 1, b = 4, and c = 4. The discriminant is 16 − 16 = 0. The plus and minus branches both use √0, so they collapse to the same value: x = −4 ÷ 2 = −2. The calculator returns one value because there is one distinct real root, even though its algebraic multiplicity is two.
The factorization (x + 2)² confirms the repeated root. Substituting −2 gives 4 − 8 + 4 = 0. On a graph, the parabola touches the x-axis at the repeated root rather than crossing it. That geometric description follows from this equation; it should not be generalized into a claim about an unrelated physical system without a model.
A discriminant very close to zero is not necessarily exactly zero. Decimal coefficients and binary floating-point arithmetic can produce a small positive or negative value when the mathematical inputs were rounded. Use the coefficients at their intended precision and inspect the reported discriminant rather than forcing a repeated-root interpretation based only on appearance.
A negative discriminant and the real-number limit
For x² + 1 = 0, the coefficients are 1, 0, and 1. The discriminant is 0² − 4 × 1 × 1 = −4. Because no real number squared equals −4, the calculator returns an empty list of real solutions. This does not mean the equation is malformed; it means its roots lie outside the real-number scope of the tool.
The equation can be rearranged as x² = −1, which makes the same limitation visible without the formula. In the complex number system its roots are i and −i, but this calculator deliberately does not report complex roots. A different tool that supports complex arithmetic may therefore show two solutions while this one correctly shows no real solutions.
Substitution and sign reasoning also agree. For every real x, x² is nonnegative, so x² + 1 is at least 1 and cannot equal zero. When the output says there are no real roots, interpret that statement narrowly. It does not establish that a broader application is impossible; it only describes the real solutions of the entered equation.
Decimal coefficients and rounding
Decimal coefficients use the same formula. For 0.5x² − 1.5x + 1 = 0, the discriminant is (−1.5)² − 4 × 0.5 × 1 = 2.25 − 2 = 0.25. The denominator 2a equals 1, so the roots are (1.5 − 0.5) ÷ 1 = 1 and (1.5 + 0.5) ÷ 1 = 2.
Multiplying the entire equation by 2 gives x² − 3x + 2 = 0, which has the same roots. Multiplying every coefficient by the same nonzero constant does not change the solution set because it scales both sides of the equation equally. This is a useful check when decimal coefficients can be cleared cleanly.
Irrational roots will usually be displayed as decimals. Keep the discriminant and square root at full available precision until both root branches are complete, then round the final answers. Substituting a rounded root may leave a small nonzero residual, so use the unrounded value for a stronger computational check and state the chosen display precision.
Coefficient signs, input limits, and validation
Three checks prevent most failures. First, ensure the equation equals zero before reading off a, b, and c. Second, include every sign: in −x² + 3x − 2 = 0, a is −1 rather than 1. Third, confirm that a is nonzero. The function returns no quadratic result when a = 0 because a linear equation requires a different method.
After calculating, use the discriminant sign to predict the number of reported roots, and substitute each reported root into the original equation. For two roots, their sum should also equal −b/a and their product should equal c/a. In x² − 5x + 6, 2 + 3 = 5 and 2 × 3 = 6, matching those coefficient relationships.
The calculator handles numeric coefficients and real-root classification; it does not simplify symbolic expressions, infer coefficients from prose, or attach physical meaning to a root. A model may also impose restrictions such as time being nonnegative, in which case a mathematically valid negative root can be irrelevant to that context. Solve the equation first, then apply any clearly stated domain restrictions separately.
Reference and example table
| Case | Meaning |
|---|---|
| Example 1 | x² − 5x + 6 = 0 has roots 2 and 3. |
| Example 2 | x² − 2x + 1 = 0 has one repeated root 1. |
| Example 3 | x² + 1 = 0 has discriminant −4 and no real roots. |
Frequently asked questions
What formula does the quadratic calculator use?
It calculates Δ = b² − 4ac and, when Δ is nonnegative, uses x = (−b ± √Δ)/(2a). Coefficient a must not be zero.
What is the discriminant of x² − 5x + 6 = 0?
It is 1: (−5)² − 4 × 1 × 6 = 25 − 24. The resulting roots are 2 and 3.
Why does a positive discriminant give two roots?
A positive discriminant has a positive square root, so the plus and minus branches of the quadratic formula produce two distinct real values.
What does a zero discriminant mean?
The two formula branches coincide, giving one distinct repeated root. For x² + 4x + 4 = 0, Δ = 0 and the repeated root is −2.
Why are there no results for x² + 1 = 0?
Its discriminant is −4, so it has no real roots. It does have complex roots, but the calculator reports real solutions only.
Can the coefficients be decimals?
Yes. For 0.5x² − 1.5x + 1 = 0, the discriminant is 0.25 and the real roots are 1 and 2.
Why must I divide by 2a rather than 2?
The denominator in the quadratic formula is 2a. For 2x² − 7x + 3 = 0 it equals 4, and using 2 would produce incorrect roots.
How can I verify the roots?
Substitute each root into ax² + bx + c and check that the result is zero. You can also check that the roots sum to −b/a and multiply to c/a.