Quadratic Equation Calculator
Enter a, b, and c to solve ax² + bx + c = 0 in this tab. Exact roots, the discriminant, and completing-the-square steps are shown. Complex roots and the linear case a = 0 are included.
Enter a, b, and c
Limits
- Each of a, b, and c must be a finite decimal or integer. Scientific notation is not accepted.
- Each coefficient can have at most 16 significant digits, and the reduced numerator and denominator can be at most 10^12.
- This page solves a single equation ax² + bx + c = 0. It does not plot the parabola (use the graphing calculator for that) and it does not solve cubic or higher-degree equations.
Read the roots
How to use Quadratic Equation
- Enter the coefficientsType a, b, and c for ax² + bx + c = 0. Integers and finite decimals are accepted. The default example is x² − 5x + 6 = 0, whose roots are 2 and 3.
- Read the discriminant and the rootsThe discriminant Δ = b² − 4ac tells you whether the roots are two distinct real numbers, one repeated real number, or a complex conjugate pair. Exact values are shown when a, b, and c are integers or finite decimals, together with a decimal approximation.
- Follow completing the squareThe table shows how the quadratic formula is obtained by completing the square. When a = 0 the equation is treated as the linear equation bx + c = 0, or as an identity or a contradiction if b is also 0.
Limits and how it works
- Each of a, b, and c must be a finite decimal or integer. Scientific notation is not accepted.
- Each coefficient can have at most 16 significant digits, and the reduced numerator and denominator can be at most 10^12.
- This page solves a single equation ax² + bx + c = 0. It does not plot the parabola (use the graphing calculator for that) and it does not solve cubic or higher-degree equations.
How the roots are calculated
For a ≠ 0, the roots of ax² + bx + c = 0 are given by the quadratic formula x = (−b ± √(b² − 4ac)) / (2a). This identity is obtained by dividing through by a and completing the square: (x + b/(2a))² = (b² − 4ac)/(4a²). The same formula is used when the discriminant Δ = b² − 4ac is negative, taking the principal square root over the complex numbers, √(−d) = i√d for d > 0. The two complex roots are then conjugates. When Δ = 0 there is one repeated real root, x = −b/(2a), which is also the vertex (the axis of symmetry) of the parabola y = ax² + bx + c.
The formula and the completing-the-square derivation are as in OpenStax Intermediate Algebra 2e, Section 9.3, “Solve Quadratic Equations Using the Quadratic Formula,” at openstax.org/books/intermediate-algebra-2e/pages/9-3-solve-quadratic-equations-using-the-quadratic-formula (CC BY 4.0). Coefficients are parsed as exact rationals when they are integers or finite decimals, so roots such as 2 and 3, or (−1 ± i√3)/2, are reported exactly rather than as rounded floating-point values.
When a = 0 the equation is no longer quadratic. If b ≠ 0 it reduces to the linear equation bx + c = 0, with the unique root x = −c/b. If a = 0, b = 0, and c = 0, every real x is a solution (0 = 0). If a = 0, b = 0, and c ≠ 0, there is no solution. This site’s scientific calculator evaluates expressions but does not solve equations, and the graphing calculator plots y = f(x) without reporting roots. This page is the solver for ax² + bx + c = 0.
Frequently asked questions
What happens when a is 0?
The equation is linear, not quadratic. If b ≠ 0 there is one root, x = −c/b. If b is also 0, the equation is either 0 = 0 (every real number is a solution) or a nonzero constant equal to 0 (no solution).
Are complex roots supported?
Yes. When the discriminant is negative, the roots are reported as a complex conjugate pair, for example i and −i for x² + 1 = 0, or (−1 ± i√3)/2 for x² + x + 1 = 0. The scientific calculator on this site does not use complex numbers.
Is this the same as the graphing calculator or the scientific calculator?
No. The graphing calculator plots a single expression y = f(x). The scientific calculator evaluates arithmetic and functions, and its limits say it does not solve equations. This page solves ax² + bx + c = 0 and shows the discriminant and completing-the-square steps.
Is anything uploaded?
No. The calculation runs in your browser. Nothing you type is sent to a server.
Related tools
All toolsGraphing Calculator
Plot a 2D function such as x^2 or sin(x) in your browser.
Scientific Calculator
Trigonometry, logs, factorials and expressions, in degrees or radians.
GCF and LCM Calculator
Find the greatest common factor and least common multiple of several integers.
Percentage Calculator
Calculate percentages, percent change, discounts, and markups fast.