Quadratic Formula Calculator

This quadratic formula calculator solves ax² + bx + c = 0 from three entered coefficients. For x² - 3x + 2 = 0, enter a = 1, b = -3 and c = 2. The discriminant is one, and the two real roots are x = 1 and x = 2.

Quadratic Formula Calculator inputs

Enter signed real coefficients, zero or a magnitude from 0.000000001 to 1000000000. Use a decimal point without grouping commas. Arrange the equation as ax² + bx + c = 0.

Loading calculator. JavaScript is required.

The quadratic formula calculator distinguishes two real roots, one repeated real root and a complex-conjugate pair. It reports the discriminant so you can understand that classification. When a is zero, the expression is no longer quadratic; the quadratic formula calculator treats the remaining bx + c = 0 equation as a linear case instead of dividing by zero.

On this page

How to use the quadratic formula calculator

Rearrange your equation so every term is on the left and the right side is zero. Combine like terms, then identify the coefficients of x squared, x and the constant. Enter their signs as well as their magnitudes. A missing x term means b is zero; a missing constant means c is zero.

For 2x² + 5x = 3, move the three to the left to get 2x² + 5x - 3 = 0. The inputs are a = 2, b = 5 and c = -3. Do not enter positive three as the constant. The quadratic formula calculator accepts numerical coefficients, not a complete equation typed as an expression.

Quadratic Formula Calculator: Enter the three signed coefficients. ax² + bx + c = 0. x² - 3x + 2 = 0. a = 1, b = -3, c = 2. Move every term to the left first
Quadratic Formula Calculator: Enter the three signed coefficients. ax² + bx + c = 0; x² - 3x + 2 = 0; a = 1, b = -3, c = 2; Move every term to the left first.

The formula and discriminant

For nonzero a, the quadratic formula is x = (-b ± √D)/(2a), where D = b² - 4ac. The plus and minus signs describe the two formula branches. If D is positive, there are two distinct real roots. If D is zero, the branches coincide at the repeated root -b/(2a).

If D is negative, there are no real roots. The two complex roots have real part -b/(2a) and opposite imaginary parts with magnitude √(-D)/(2|a|). The imaginary unit i satisfies i² = -1. A complex pair is still a solution set of the polynomial; it does not identify real x-axis crossings of its graph.

Quadratic Formula Calculator: Use the discriminant to classify roots. D = b² - 4ac. D > 0: two distinct real roots. D = 0: one repeated real root. D < 0: complex-conjugate roots
Quadratic Formula Calculator: Use the discriminant to classify roots. D = b² - 4ac; D > 0: two distinct real roots; D = 0: one repeated real root; D < 0: complex-conjugate roots.

Three worked root examples

Example one is x² - 3x + 2 = 0. The discriminant is (-3)² - 4 × 1 × 2 = 1. The quadratic formula calculator gives (3 + 1)/2 = 2 and (3 - 1)/2 = 1. Factoring the polynomial as (x - 1)(x - 2) supplies another check on the same two roots.

Example two is x² + 2x + 1 = 0. The discriminant is 2² - 4 × 1 × 1 = 0. Both formula branches give x = -1. There is one distinct root with multiplicity two, and the polynomial is (x + 1)². Substituting negative one gives zero.

Example three is x² + 1 = 0. Here a = 1, b = 0 and c = 1, giving D = -4. The real part is zero and the imaginary magnitude is one, so the roots are i and -i. Squaring either root produces negative one, which cancels the constant.

Quadratic Formula Calculator: Three equations and their roots. x² - 3x + 2 = 0: roots 1 and 2. x² + 2x + 1 = 0: repeated root -1. x² + 1 = 0: roots i and -i
Quadratic Formula Calculator: Three equations and their roots. x² - 3x + 2 = 0: roots 1 and 2; x² + 2x + 1 = 0: repeated root -1; x² + 1 = 0: roots i and -i.

Check roots without losing their meaning

For a real root r, substitute it into ar² + br + c and compare the result with zero. When the roots are distinct, their sum is -b/a and their product is c/a. These relations are useful checks, including when the roots are complex, although rounded numerical values can leave small differences. Multiplying all three coefficients by the same nonzero factor leaves the roots unchanged, providing another check on your calculation.

Keep the original equation beside the coefficients. A correctly solved set of copied coefficients may still describe the wrong equation if a term changed sign while being moved. If a practical problem allows only positive times or lengths, apply that condition after solving. Algebraic roots do not automatically satisfy every restriction of the original application.

Quadratic formula calculator precision limits

The quadratic formula calculator accepts zero or finite signed coefficients with magnitude from 0.000000001 to 1,000,000,000. Blank fields and unsupported magnitudes are rejected. Enter decimal points without grouping commas. A coefficient of zero is allowed, but a nonzero a is required for the equation to be genuinely quadratic.

The engine uses browser floating-point arithmetic with rearranged calculations that reduce some cancellation errors in the discriminant and real roots. This is not arbitrary-precision symbolic algebra. Very close roots or uncertain decimal coefficients can still be sensitive to rounding and measurement error. A displayed approximation cannot establish that two experimentally measured roots are exactly equal.

Zero leading coefficients and the remaining scope

When a = 0 and b is nonzero, the equation becomes bx + c = 0 and has root -c/b. If a and b are both zero, c decides the outcome. A zero c gives an identity satisfied by every real x. A nonzero c gives an inconsistent statement with no solution.

The quadratic formula calculator does not expand brackets, parse symbolic expressions, solve higher-degree polynomials or choose which physical model to use. Keep the original coefficients, root classification and rounding details with any shared answer. If the problem needs exact fractions or radicals, retain the formula expression or use a suitable symbolic method rather than treating every displayed decimal digit as exact.

Questions about quadratic formula calculator

What coefficients should I enter in the quadratic formula calculator?

First write the equation as ax² + bx + c = 0. Enter the numerical coefficient of x squared as a, the coefficient of x as b and the constant as c. Keep every sign. For 2x² + 5x = 3, move three to the left before entering two, five and negative three.

What does the discriminant tell me?

The discriminant D = b² - 4ac classifies the roots when a is nonzero. A positive value gives two distinct real roots, zero gives one repeated real root and a negative value gives two nonreal complex-conjugate roots. The sign of D is a mathematical property of the entered coefficients. It does not verify whether a practical model is appropriate.

Why does a negative discriminant still have solutions?

The equation has no real-number roots, but complex numbers allow a square root of a negative value through the imaginary unit i. The two roots share a real part and have opposite imaginary parts. For x² + 1 = 0, those roots are i and negative i. Both satisfy the polynomial in complex arithmetic.

Is one repeated root the same as two different roots?

No. When the discriminant is zero, both quadratic-formula branches give the same value. That root has multiplicity two. For x² + 2x + 1 = 0, the factorization is (x + 1)², so the only distinct root is negative one. Listing the same value twice does not create a second distinct solution.

What happens if a is zero?

The x-squared term disappears, leaving a linear or constant equation. With nonzero b, the root is -c/b. With b = 0 as well, a zero c produces an identity and a nonzero c produces no solution. The quadratic formula itself cannot be used because its denominator would be zero. The tool identifies the remaining case explicitly.

Can a quadratic have a zero root?

Yes. If c = 0, the equation factors as x(ax + b) = 0 when a is nonzero. One root is zero and the other is -b/a. If b is also zero, zero is a repeated root. Keep the zero constant in its labeled field rather than leaving the field blank or shifting another coefficient into its place.

Does a negative leading coefficient change the method?

The same formula applies to any nonzero a, including a negative value. Preserve the signs in b² - 4ac and in the denominator 2a. Multiplying every coefficient by the same nonzero number leaves the roots unchanged. A parabola may open downward for negative a, but its root equation is still solved by the quadratic formula.

Why can direct use of the formula lose a small root?

Floating-point subtraction can lose useful digits when two large, nearly equal terms are subtracted. The implemented numerical method rearranges the real-root calculation to reduce that problem and uses extra error terms in the discriminant calculation. The results remain finite-precision approximations. Retain the coefficients and use higher-precision tools if small differences are important to the application.

How should I check an approximate real root?

Substitute it into the original polynomial and compare the remainder with the scale of the terms. Also check the two-root sum and product when applicable. A small rounding remainder can be expected for an approximate decimal, but a large difference calls for checking coefficient signs, copying and rearrangement. A residual alone does not prove that an uncertain measured model is correct.

Can I enter an equation containing brackets or fractions?

This form takes three numerical coefficients rather than a symbolic expression. Expand brackets and combine like terms first. Convert fractional coefficients to suitable decimals within the input range, understanding that some fractions repeat. If an exact fractional or radical answer is required, preserve the symbolic coefficients and use an algebraic method that retains those exact forms.

What should accompany a result I share?

Keep the original equation, all three entered coefficients, the discriminant, the root classification and any rounding used. For complex roots, include both the real part and the imaginary magnitude with the plus/minus interpretation. For a practical problem, state domain restrictions separately. This lets another person reproduce the calculation and check which algebraic roots are admissible.

Sources and method notes

Method and source notes checked on 26 November 2026. The diagrams are original explanatory drawings. Read the privacy policy for other site services.