iCalculator.
Math & statistics

Quadratic equation calculator

Solve a quadratic equation with real or complex roots.

Reviewed December 1, 2026

Your numbers

Calculations run in your browser. Your inputs stay on your device.

Your results

Enter your numbers and select Calculate.

The formula

For ax² + bx + c = 0, x = (−b ± √(b² − 4ac)) ÷ (2a).

Worked example

x² − 5x + 6 = 0 has roots 2 and 3.

What to keep in mind

a must be nonzero. A negative discriminant yields two conjugate complex roots.

Formula sources