How to use the quadratic equation calculator
Enter the three coefficients for a supported single-variable equation in x, or switch to Full equation and type the complete expression. The calculator shows the discriminant, the formula steps, and the roots. It keeps exact rational roots as fractions and uses decimal approximations when an exact fraction is not available.
- Choose Coefficients (a, b, c) or Full equation.
- Enter the three coefficient values, or type a supported equation that uses
x. - Select Solve to display the discriminant, calculation steps, and roots.
- Select Copy result or Download result (.txt) to keep the displayed text. Select Reset to clear the fields and hide the result.
How to enter a quadratic equation
In Coefficients (a, b, c), enter an integer, decimal, or fraction such as 1/2 in each field. In Full equation, use the variable x, numbers, spaces, parentheses, and the operators + - * / ^. The parser accepts implicit multiplication such as 2x. Your equation needs exactly one = sign.
For example, enter the expression shown in the input placeholder:
Input: 2x^2 + 3x - 5 = 0
Output: D = 49
x₁ = 1
x₂ = -2
What the quadratic equation calculator shows
The calculator uses x = (-b ± √(b² - 4ac)) / (2a) and reports D = b² - 4ac. The sign of D determines which roots appear:
- D > 0: two distinct real roots.
- D = 0: one repeated real root.
- D < 0: two complex conjugate roots with no real solution.
A positive perfect-square discriminant gives exact rational roots when the resulting fractions can be represented exactly. A positive nonsquare discriminant gives decimal approximations. A negative discriminant gives a complex conjugate pair.
When the calculator rejects an input
Empty or malformed coefficient values are rejected. The coefficient a must be nonzero, since a = 0 makes the equation linear. A coefficient value can contain up to 40 characters, and a full equation can contain up to 200 characters.
In Full equation, the parser rejects unknown variables, unsupported characters, unbalanced parentheses, division by zero, a variable in a denominator, exponents above 12, and exponents that are not non-negative integers. The resulting polynomial must have degree 2 or lower, so the calculator does not solve inequalities, systems of equations, or higher-degree equations.
Ways to use the displayed result
For a worked problem, enter the coefficients and inspect each displayed step alongside the equation. The result includes the discriminant and the roots, so you can check the root type before copying the calculation.
If you already have the complete expression, type it in Full equation. The calculator extracts the coefficients, then creates plain text that you can copy or download with Copy result or Download result (.txt).
A negative discriminant produces two complex conjugate roots. The result displays both values and labels the number of real roots as zero.
When to use another math calculator
Use the Linear Equation Calculator when the variable has no squared term and you need a one-variable linear solution. Choose the Algebra Calculator for one-variable linear or quadratic equations, or for a small system of linear equations. Browse Math Calculators for work with fractions, sequences, geometry, matrices, vectors, or number theory.
Frequently asked questions
How do I use a quadratic equation calculator with coefficients?
Choose Coefficients (a, b, c), enter the three values, and select Solve. The calculator applies the quadratic formula and displays the discriminant, steps, and roots.
Can I solve a quadratic equation by typing the full equation?
Yes. Choose Full equation and type a supported expression such as 2x^2 + 3x - 5 = 0. The parser combines both sides and extracts the coefficients.
What does the discriminant show in a quadratic equation?
Positive D gives two distinct real roots. Zero gives one repeated real root. Negative D gives two complex conjugate roots.
Why does the quadratic equation calculator reject my equation?
The equation may contain an unsupported symbol, malformed parentheses, more than one equals sign, division by zero, or a degree above 2. Use x as the variable and keep a nonzero.
Does the quadratic equation calculator show complex roots?
Yes. A negative discriminant produces both complex conjugate roots. The calculator uses exact fractions when available and decimal approximations for other values.