Quadratic Formula Calculator

Enter the coefficients of ax² + bx + c = 0. The roots, discriminant and vertex update as you type.

Need the full working for a harder problem? Try the quadratic equations step-by-step solver.

The formula

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

Worked example

A product's profit is P = −2x² + 40x − 150, with x in hundreds of units. At what output does it break even?

  1. Set P = 0, so a = −2, b = 40, c = −150
  2. Discriminant: 40² − 4(−2)(−150) = 1600 − 1200 = 400
  3. x = (−40 ± √400) ÷ (2 × −2) = (−40 ± 20) ÷ −4
  4. x = 5 or x = 15

Break-even is at 500 and 1,500 units. The vertex, x = 10, gives the maximum profit of 50.

How it works

  1. Write the equation in standard form

    Move everything to one side so it reads ax² + bx + c = 0, then read off a, b and c with their signs.

  2. Find the discriminant

    D = b² − 4ac. It tells you how many real roots there are.

  3. Apply the formula

    x = (−b ± √D) / 2a. The plus and the minus give the two roots.

Good to know

Common questions

What does the discriminant tell me?

Positive: two different real roots. Zero: one repeated root. Negative: two complex roots, and the parabola never crosses the x-axis.

What if a is 0?

Then the equation is linear, not quadratic. The calculator solves bx + c = 0 instead.

How do the roots relate to the coefficients?

Their sum is −b ÷ a and their product is c ÷ a. For x² − 5x + 6 = 0 the roots 2 and 3 add to 5 and multiply to 6. It is a quick check on any answer.

Where does the formula come from?

From completing the square on ax² + bx + c = 0. Doing it once in general gives a formula that works for every quadratic.

When is factoring quicker?

When the discriminant is a perfect square, the roots are rational and the quadratic factors neatly. Otherwise the formula is faster and safer.

More free calculators