Skip to content
ToolsLeb ToolsLeb

Quadratic Equation Calculator

Solve ax² + bx + c = 0 for its roots.

Standard Math

Calculator Inputs

Your Result

Enter your details and press Calculate to see your result.

Formula

Quadratic Equation = Quadratic Roots(a (coefficient of x²), b (coefficient of x), c (constant))
a (coefficient of x²)
b (coefficient of x)
c (constant)

How it works

  1. Enter the coefficients a, b, and c for ax² + bx + c = 0.
  2. View the discriminant and the roots of the equation.

Share on Social Media:

This calculator solves quadratic equations of the form ax² + bx + c = 0. Enter the coefficients a, b and c and it returns the discriminant and the roots (the values of x that make the equation true), whether they are two real numbers, one repeated number, or a pair of complex numbers.

The quadratic formula

x = (−b ± √(b² − 4ac)) ÷ 2a

The part under the square root, D = b² − 4ac, is the discriminant. It tells you what kind of roots to expect:

DiscriminantRootsGraph of y = ax² + bx + c
D > 0Two different real rootsCrosses the x-axis twice
D = 0One repeated real rootTouches the x-axis once
D < 0Two complex roots (p ± qi)Doesn't reach the x-axis

Worked examples

  • x² − 5x + 6 = 0 (a = 1, b = −5, c = 6): D = 25 − 24 = 1. x = (5 ± 1) ÷ 2, so x = 3 or x = 2.
  • x² − 4x + 4 = 0: D = 16 − 16 = 0. One repeated root, x = 2.
  • x² + 2x + 5 = 0: D = 4 − 20 = −16. x = (−2 ± 4i) ÷ 2, so x = −1 ± 2i.

Checking your answer

Substitute the root back in: for x = 3, 9 − 15 + 6 = 0. ✓ Another quick check uses Vieta's formulas: the roots add up to −b/a and multiply to c/a. For the first example, 3 + 2 = 5 and 3 × 2 = 6. ✓

Other ways to solve

  • Factoring: x² − 5x + 6 = (x − 2)(x − 3). Quick when the roots are whole numbers.
  • Completing the square: rewrite as (x + p)² = q. The quadratic formula comes from doing this in general.

Notes

a can't be 0; that would make it a linear equation, bx + c = 0, with the single solution x = −c/b. Roots are rounded to 4 decimal places. If your equation isn't in standard form, move every term to one side first: 2x² = 3x + 5 becomes 2x² − 3x − 5 = 0.

Related: Root Calculator, Slope Calculator.

Frequently Asked Questions

A negative discriminant means the equation has no real roots — instead it has a pair of complex conjugate roots, which this calculator shows in a + bi form.

x = (−b ± √(b² − 4ac)) / 2a, used to solve any equation of the form ax² + bx + c = 0.

The discriminant (b² − 4ac) tells you the nature of the roots: positive means two distinct real roots, zero means one repeated real root, and negative means two complex roots — all without fully solving the equation.