How to solve a quadratic equation with this calculator
Use this calculator for a single-variable quadratic equation in x with a nonzero quadratic coefficient. Enter coefficients or a full equation to get the discriminant, the quadratic-formula steps, and real or complex roots. Exact fractions are shown when available; other values are decimal approximations.
Choose an input mode
Select one of the two visible input modes:
- Coefficients (a, b, c): enter the values for
a,b, andcinax² + bx + c = 0. Each value may be an integer, decimal, or simple fraction such as1/2. - Full equation: type an equation such as
2x^2 + 3x - 5 = 0. Use the variablex, operators+ - * / ^, parentheses, decimal points, and spaces. Implicit multiplication such as2xis supported, and the equation must contain exactly one=sign.
Solve the equation
- Enter the coefficients or full equation.
- Select Solve to display the discriminant, calculation steps, and roots.
- Select Reset to clear the coefficient and equation fields and hide the current result.
- Use Copy result to copy the displayed output, or select Download result (.txt) to save it as a plain-text file.
Understand the result
The calculator applies x = (-b ± √(b² - 4ac)) / (2a). It calculates the discriminant D = b² - 4ac and uses its sign to classify the roots:
- D > 0: two distinct real roots.
- D = 0: one repeated real root.
- D < 0: two complex conjugate roots with no real solution.
Exact fractions are used when the calculation supports them. Non-exact results are decimal approximations, generally shown with up to six decimal places; trailing zeroes may be trimmed for some displayed values.
Validation and supported limits
Enter a nonzero value for a. The calculator reports an error for empty or invalid coefficient values, unsupported characters or variable names, unbalanced parentheses, a missing or repeated = sign, division by zero, or unsupported uses of x in a denominator or exponent. Equations whose resulting polynomial degree exceeds 2 are rejected. The parser accepts the documented operators, parentheses, decimal points, whitespace, and variable x; it does not solve general higher-degree equations, inequalities, or systems of equations.
Privacy and calculation behavior
The page parses the supported input and performs the calculation locally in your browser. The local implementation confirms this calculator behavior, but it does not establish what page analytics or other page-level services may record.
Frequently Asked Questions
What is a quadratic equation?
A quadratic equation is a degree-2 polynomial equation in one variable, written as ax² + bx + c = 0, where a, b, and c are coefficients and a is not zero.
What formula does this calculator use?
The quadratic formula: x = (-b ± √(b² - 4ac)) / (2a). The value under the square root, b² - 4ac, is called the discriminant and determines how many real roots the equation has.
What does the discriminant tell me?
If the discriminant is positive, the equation has two distinct real roots. If it is zero, there is exactly one repeated real root. If it is negative, the equation has two complex conjugate roots with no real solution.
Can I enter a full equation instead of separate coefficients?
Yes. Select Full equation and type something like 2x^2 + 3x - 5 = 0. The calculator reads it with a fixed expression parser and extracts the a, b, and c coefficients automatically.
Does this calculator handle complex roots?
Yes. When the discriminant is negative, the calculator reports both complex conjugate roots in the form real ± imaginary·i, using exact fractions when possible or a decimal approximation otherwise.