Quadratic Equation Solver

Solve ax^2 + bx + c = 0 with the quadratic formula: real or complex roots, the discriminant, and the vertex of the parabola.

Quadratic Formula: x = (-b +- sqrt(b^2 - 4ac)) / 2a, for the equation ax^2 + bx + c = 0

Discriminant: D = b^2 - 4ac decides the roots before you solve: D > 0 gives two real roots, D = 0 gives one repeated root, D < 0 gives two complex roots.

Example:

x^2 - 3x + 2 = 0, so a = 1, b = -3, c = 2

D = (-3)^2 - 4 x 1 x 2 = 9 - 8 = 1

x = (3 +- 1) / 2, giving roots x = 2 and x = 1

Vertex = (1.5, -0.25)

Check by factoring: x^2 - 3x + 2 = (x - 2)(x - 1), which is zero exactly at x = 2 and x = 1.

Frequently Asked Questions

When should I factor instead of using the formula?

When the roots are small whole numbers, factoring is faster: look for two numbers that multiply to c and add to b. The formula always works, including when factoring fails, which is why it is the general method this calculator uses.

What do complex roots mean?

The parabola never crosses the x-axis, so there is no real number that solves the equation. The roots exist in the complex plane instead, written with i, the square root of -1. They still matter in engineering and physics, for example in electrical circuits and vibrations.