What this tool calculates
This calculator analyzes an equation written as ax² + bx + c = 0. When a is nonzero, it reports the discriminant and either two real roots or a message that the roots are complex. When a is zero but b is nonzero, it treats the input as a linear equation and reports its single root.
If both a and b are zero, there is no single solvable root under this interface. The input is rejected whether the remaining statement is inconsistent or true for every x.
Inputs
Enter finite real coefficients a, b, and c, including their signs. Supply zero for a missing term. For x² − 3x + 2 = 0, enter a = 1, b = −3, c = 2.
Coefficient units must be consistent with the variable's meaning. The tool performs numerical algebra only and does not infer a physical model, measurement uncertainty, or domain restrictions such as x being an integer or non-negative.
Method and formula
For a ≠ 0, first calculate the discriminant:
D = b² − 4ac
If D ≥ 0, the real roots are:
x = (−b ± √D) ÷ (2a)
D > 0 gives two distinct real roots; D = 0 gives the same real root twice. D < 0 indicates a complex conjugate pair, which this interface labels but does not expand numerically. If a = 0 and b ≠ 0, the fallback is x = −c ÷ b.
Worked example
Solve x² − 3x + 2 = 0. The coefficients are 1, −3, and 2.
D = (−3)² − 4 × 1 × 2 = 1. Therefore:
- Root 1: (3 + 1) ÷ 2 = 2.
- Root 2: (3 − 1) ÷ 2 = 1.
Substitution checks both answers: 2² − 3(2) + 2 = 0 and 1² − 3(1) + 2 = 0. For a = 0, b = 2, c = −4, the linear fallback returns 2.
How to interpret the result
Roots are x-values where the quadratic expression equals zero. On a graph, real roots are x-axis intersections. A negative discriminant means there are no real intersections, not that the equation has no solutions in the complex-number system.
Repeated roots indicate tangency to the axis in the basic parabola interpretation. Always substitute calculated values into the original equation when rounding or coefficient entry could matter.
Accuracy and limitations
Floating-point arithmetic can lose precision when coefficients have very different magnitudes or when subtracting nearly equal quantities. The conventional formula is clear for education but is not the most stable numerical algorithm for every scientific case. Display rounding can make a substituted residual appear nonzero.
The page does not show complex values, symbolic factors, exact radicals, vertex form, units, or uncertainty propagation. It also does not enforce contextual constraints on roots. Use a numerical library with stability controls for ill-conditioned or safety-critical work.
Sources
- NIST Digital Library of Mathematical Functions, Quadratic Equations provides institutional reference material for algebraic equations and their numerical treatment.
- NIST Digital Library of Mathematical Functions, Square Roots and Powers gives the root and power conventions used in the discriminant formula.
Editorial record
Author: SoupCalc Editorial Team
Last reviewed: August 14, 2026
Review scope: Discriminant branches, real and complex labeling, linear degeneration, floating-point caution, reference links, and the roots 2 and 1 example were checked.