Maths

Quadratic Formula Calculator

Solve ax² + bx + c = 0 with the discriminant, exact surd form, complex roots and vertex.

By Nitin Raturi · Last reviewed

ax² + bx + c = 0

How to use the Quadratic Formula Calculator

Solve ax² + bx + c = 0 and see the discriminant, roots and vertex.

  1. Rewrite your equation so one side is 0.
  2. Enter a, b and c.
  3. Read the roots, the discriminant and the vertex.

Good to know

  • Whole-number coefficients also give an exact form with square roots.
  • Use a minus sign for negative numbers.

Write the equation with 0 on one side, then enter a, b and c.

a (x² coefficient)

The number in front of x² once the equation is written as ax² + bx + c = 0.

How to fill it in

  • Enter any number except 0, such as 2, −1 or 0.5.
  • If a is 0 the equation is linear, not quadratic.

Example

In 2x² + 9x − 5 = 0, a is 2.

b (x coefficient)

The number in front of x. Enter 0 if there is no x term.

How to fill it in

  • Enter a number; use a minus sign for negatives.

Example

In 2x² + 9x − 5 = 0, b is 9.

c (constant)

The number on its own. Move everything to one side first so the other side is 0.

How to fill it in

  • Enter a number; use a minus sign for negatives.

Example

For x² − 6x = −5, add 5 to both sides: c is 5.

Tip: Results with square roots also show the exact form, such as (−5 ± √3) / 2 for 2x² + 10x + 11 = 0; x² + 2x + 5 = 0 gives −1 ± 2i.

Roots of 2x² + 9x − 5 = 0

x = 0.5 or x = −5

The discriminant b² − 4ac is 121: positive, so two real roots.

Discriminant
121
Vertex
(−2.25, −15.125)
Axis of symmetry
x = −2.25

x = (−b ± √(b² − 4ac)) ÷ 2a. Real roots use a rearranged form that stays accurate when one root is tiny. Decimals are rounded to six places for display.

How this calculator works

  1. Step 1Standard formax² + bx + c = 0Move every term to one side.
  2. Step 2Discriminantb² − 4acTells you how many real roots there are.
  3. Step 3Roots(−b ± √D) ÷ 2aThe quadratic formula gives both at once.

Every quadratic equation can be written as ax² + bx + c = 0 with a not zero. The quadratic formula then gives the values of x that make it true.

For real roots the calculator uses a rearranged but equivalent form. It avoids the rounding error that can make a very small root come out as zero.

Worked example: 2x² + 9x − 5 = 0

Solving 2x² + 9x − 5 = 0
Quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2a
  • ax² coefficient 2
  • bx coefficient 9
  • cConstant −5
  1. Discriminant9² − 4 × 2 × (−5)121
  2. Square root√12111
  3. Roots(−9 ± 11) ÷ 4x = 0.5 or x = −5

This is OpenStax’s Example 9.21. In Example 9.23, 2x² + 10x + 11 = 0 has the exact roots (−5 ± √3) / 2.

What the discriminant tells you

  • PositiveTwo real roots2x² + 9x − 5 = 0: x = 0.5 or x = −5.
  • ZeroOne repeated rootx² − 2x + 1 = 0: x = 1 (a repeated root).
  • NegativeTwo complex rootsx² + 2x + 5 = 0: x = −1 ± 2i.

Read the result

The headline gives the roots; the table adds the exact form, the discriminant and the vertex of the parabola.

The vertex is the turning point of the graph y = ax² + bx + c. Its x-value, −b ÷ 2a, is halfway between the two roots.

Assumptions and limits

  • a is not zeroOtherwise the equation is linear.
  • Exact formsShown for whole-number coefficients.
  • Six decimalsDecimal answers are rounded for display only.
  • Real coefficientsa, b and c must be real numbers.

A quadratic has up to two roots. Higher degrees and several unknowns need other methods.

For third-degree equations, use the cubic equation calculator. Several linear equations at once are solved by the system of equations calculator, and the root calculator simplifies surds.

Common mistakes

  • Mistake: Entering x² − 6x = −5 as c = −5.

    Instead: Move everything to one side first: x² − 6x + 5 = 0, so c = 5.

  • Mistake: Dropping the minus sign on b or c.

    Instead: Keep each sign with its number.

  • Mistake: Dividing only √D by 2a.

    Instead: Divide the whole top, −b ± √D, by 2a.

Checking the method

Every golden case is re-solved without the quadratic formula, by bisection on the polynomial itself.

An independent script finds each real root by repeatedly halving an interval, completes the square for complex roots, and factorises the discriminant for exact forms. It reproduces OpenStax Examples 9.21 to 9.23.

Read how we test our calculators, or browse more maths calculators.

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ 2a. For 2x² + 9x − 5 = 0 it gives x = 0.5 or x = −5.

What does the discriminant tell me?

b² − 4ac above zero means two real roots, zero means one repeated root, and below zero means two complex roots.

Can it give exact answers with square roots?

Yes, for whole-number coefficients. 2x² + 10x + 11 = 0 has roots (−5 ± √3) / 2.

What happens when there are no real roots?

You get complex roots. x² + 2x + 5 = 0 gives x = −1 ± 2i.

Why can a not be zero?

Without the x² term the equation is linear, bx + c = 0, and the quadratic formula would divide by zero.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 3 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.