Sum and Product of Roots Calculator

Enter the coefficients a, b and c to find the sum and product of the roots.

How it is calculated

For the equation ax² + bx + c = 0 the tool reads the three coefficients and applies Vieta's relations: sum of roots = −b ÷ a and product of roots = c ÷ a. It also computes the discriminant D = b² − 4ac and appends a label: positive D means two real roots, D = 0 one repeated real root, and negative D complex roots. All values are shown with four decimals. The coefficient a must not be zero, because then the equation is not quadratic and the tool returns nothing; an empty field gives no result either. The roots themselves are not calculated, and when D is negative the sum and product refer to a complex pair whose imaginary parts cancel in the sum.

Worked example

Take 2x² − 7x + 3 = 0, so a = 2, b = −7 and c = 3. Sum of roots: −(−7) ÷ 2 = 3.5, shown as 3.5000. Product of roots: 3 ÷ 2 = 1.5000. Discriminant: (−7)² − 4 × 2 × 3 = 49 − 24 = 25, shown as 25.0000 (two real roots). You can confirm it: the equation factors as (2x − 1)(x − 3), the roots are 0.5 and 3, which add to 3.5 and multiply to 1.5.

Try this example →

Common mistakes

  • Forgetting the sign of b. The sum is minus b over a, so for b = −7 the sum is positive; many people write −7/2 instead of 3.5.
  • Entering an equation that is not yet in the form ax² + bx + c = 0, such as 2x² = 7x − 3. Move every term to one side first so that c is 3 and b is −7.
  • Leaving a as 0 for a linear equation. The relations only apply to quadratics, and the tool gives no result when a is zero.
  • Reading the sum and product as the roots. They only describe the pair; to get the roots you still need the quadratic formula or a factorisation.
  • Ignoring the discriminant label. A negative discriminant does not mean the sum and product are wrong, only that the roots are complex and the parabola never crosses the x-axis; for a = 1, b = 2, c = 5 the sum is −2 and the product 5 even though no real root exists.

About this calculator

For any quadratic ax² + bx + c = 0, Vieta’s formulas give the sum and product of the two roots without ever solving for them individually: the sum of roots equals −b/a, and the product equals c/a. The discriminant, b² − 4ac, meanwhile reveals what kind of roots exist — positive means two distinct real roots, zero means one repeated real root, and negative means a complex-conjugate pair.

This calculator plugs your coefficients into all three relationships at once. It’s a quick shortcut in algebra coursework for checking a factored quadratic or building one from known roots, and it’s the underlying logic behind problems that ask you to construct an equation given only the sum and product of its solutions.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The sum and product stay meaningful even when the discriminant is negative: for x² + 2x + 5 they are -2 and 5, and they describe the pair of complex roots without solving anything. They also give a fast check on roots you found by factoring, since the two roots must add up to -b/a and multiply to c/a. Do you use this to check homework factoring or to build an equation from roots you already know?

Popular calculators

All Calculators