Quadratic Formula Calculator

Enter the coefficients a, b and c to solve ax² + bx + c = 0. Shows the discriminant and the real or complex roots.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: June 2026

Result

Discriminant (D): 1

Type: two real

x₁ = 3

x₂ = 2

What is the quadratic formula?

A quadratic equation has the form ax^2 + bx + c = 0, where a is not zero. The quadratic formula solves it: x equals minus b, plus or minus the square root of (b^2 minus 4ac), all divided by 2a. It always works, whatever the coefficients, and gives the points where the parabola crosses the x-axis. This calculator returns the roots and the discriminant for any a, b and c.

How it's calculated

The key part is the discriminant, D = b^2 - 4ac, which tells you what kind of roots you get. If D is positive there are two different real roots; if D is zero there is one repeated (double) root; if D is negative there are two complex roots that form a conjugate pair. Put a, b and c into the formula, work out the discriminant, take its square root, and apply the plus and the minus.

Example

Solve x^2 - 5x + 6 = 0, so a = 1, b = -5, c = 6. The discriminant is (-5)^2 - 4(1)(6) = 25 - 24 = 1, which is positive, so there are two real roots. The square root of 1 is 1, giving x = (5 + 1) divided by 2 = 3 and x = (5 - 1) divided by 2 = 2. The solutions are 3 and 2.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Enter the three coefficients a, b and c of your quadratic equation. The calculator computes the discriminant and the roots.

If the discriminant is positive you get two real roots; if zero, one repeated root; if negative, a conjugate pair of complex roots. If a is zero the calculator flags that the equation is linear, not quadratic.

Frequently asked questions

What is the quadratic formula?+

x equals minus b, plus or minus the square root of (b^2 minus 4ac), divided by 2a; it solves any equation of the form ax^2 + bx + c = 0.

What is the discriminant?+

The part under the square root, b^2 - 4ac; it tells you whether the roots are real and distinct, repeated, or complex.

What do the discriminant values mean?+

Positive gives two real roots, zero gives one repeated root, and negative gives two complex roots.

What happens if a = 0?+

Then it is a linear equation, not a quadratic, and the quadratic formula does not apply.

Can a quadratic have complex roots?+

Yes; when the discriminant is negative the roots are a complex conjugate pair, such as -1 plus or minus 2i.

How do I find the roots of x^2 - 5x + 6?+

The discriminant is 1, so the roots are 3 and 2.

What does a discriminant of zero mean?+

The parabola just touches the x-axis at one point, giving a single repeated root.

Is the quadratic formula related to completing the square?+

Yes; the formula is derived by completing the square on the general equation.