Quadratic Formula

Real roots of ax² + bx + c = 0.

a is the coefficient of x² and cannot be 0. A negative discriminant means there are no real roots.

Enter a, b, and c.

How the quadratic formula works

Enter a, b, and c for the equation ax² + bx + c = 0. The discriminant is b² − 4ac.

When the discriminant is greater than 0, there are two real roots. The plus root uses the plus sign in front of the square root. The minus root uses the minus sign. When the discriminant is 0, those two roots are the same number. When it is negative, the headline is the discriminant and there are no real roots. a cannot be 0.

How to use this calculator

  1. Enter a, the coefficient of x². It cannot be 0.
  2. Enter b and c. Either one may be 0.
  3. Read the roots. The rows below show the other root, when there are two, and the discriminant.

Quadratic formula

x is a root. a, b, and c are the coefficients. The expression under the square root is the discriminant.

Quadratic formula
x=−b±b2−4ac2a

The plus root is the version with the plus sign. The minus root is the version with the minus sign. The page keeps up to 12 decimal places and drops trailing zeros. A number whose absolute value is at least 1,000,000,000,000, or greater than 0 and smaller than 0.000001, is shown in scientific notation with a period.

Source

The roots of ax² + bx + c = 0 are given on the Wikipedia page on the quadratic formula.

Worked examples

Example: x² − 5x + 6 = 0

a = 1, b = −5, c = 6. The discriminant is 25 − 24 = 1. The plus root is (5 + 1) / 2 = 3. The minus root is (5 − 1) / 2 = 2.

Example: x² − 2x + 1 = 0

a = 1, b = −2, c = 1. The discriminant is 4 − 4 = 0. The root is 2 / 2 = 1.

What to keep in mind

Each coefficient can be from −1,000,000 to 1,000,000. a cannot be 0. For a = 1, b = 0, and c = 1, the discriminant is −4 and there are no real roots. Completed results, including a, b, and c, can be stored in this browser’s local history and never leave your device. Clear them with the history Clear action or by clearing site data.

Common questions about the quadratic formula

What are the roots of x² − 5x + 6 = 0?

The plus root is 3 and the minus root is 2. The discriminant is 1.

What happens when the discriminant is 0?

There is one real root. For x² − 2x + 1 = 0, that root is 1 and the discriminant is 0.

What happens when the discriminant is negative?

There are no real roots. For x² + 1 = 0, a = 1, b = 0, and c = 1, the headline is the discriminant −4 and the row below is its absolute value 4.

Why must a not be 0?

If a is 0, the equation is not quadratic. The page shows no result.

Which root is the plus root?

It is (−b + √D) / (2a). The minus root is (−b − √D) / (2a). For a = 1, b = −5, and c = 6, the plus root is 3 and the minus root is 2.

Does this calculator store my numbers?

Completed results can be saved in this browser’s local history, including a, b, and c. They stay on your device and are not sent to our servers or to analytics. Clear them with the history Clear action or by clearing site data.