Quadratic Formula Calculator

About this calculator

The Quadratic Formula Calculator solves any equation of the form ax² + bx + c = 0. Enter the three coefficients and you get both roots, whether they are real or complex, along with the discriminant, the vertex of the parabola and the full substitution into the quadratic formula.

Coefficients can be decimals or fractions such as 3/4.

Coefficient of x². Cannot be zero. Fractions like 3/4 are fine.
Coefficient of x.
Constant term.
Embed this calculator

Paste this code into a Custom HTML block on your site. The calculator fits the width of the block. Adjust the height in the code if you want more room for results.

Find this widget in the publisher directory

The quadratic formula

A quadratic equation has the standard form ax² + bx + c = 0, where a is not zero. Its solutions, called roots or zeros, are the x values where the parabola y = ax² + bx + c crosses the x axis. The quadratic formula gives both of them directly:

x = (−b ± √(b² − 4ac)) ÷ 2a

The plus sign gives one root and the minus sign gives the other. If the two roots coincide, the equation has a single repeated root.

The discriminant

The expression under the square root, b² − 4ac, is the discriminant. It tells you what kind of roots to expect before you finish the calculation.

DiscriminantRootsGraph
Greater than 0Two distinct real rootsCrosses the x axis twice
Equal to 0One repeated real rootTouches the x axis once
Less than 0Two complex conjugate rootsNever meets the x axis

Worked example: real roots

Solve x² − 3x + 2 = 0. Here a = 1, b = −3 and c = 2. The discriminant is (−3)² − 4 × 1 × 2 = 1. Then x = (3 ± √1) ÷ 2, so x = 2 or x = 1. Check: 2² − 3 × 2 + 2 = 0, and 1² − 3 + 2 = 0.

Worked example: repeated root

Solve x² + x + 1/4 = 0. The discriminant is 1 − 4 × 1 × 1/4 = 0, so x = −1 ÷ 2 = −0.5 is the only root. The left side factors as (x + 1/2)².

Worked example: complex roots

Solve x² + 2x + 5 = 0. The discriminant is 4 − 20 = −16. The square root of −16 is 4i, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i. The roots are a conjugate pair, which always happens when the coefficients are real.

Where the formula comes from

The formula is the result of completing the square. Divide ax² + bx + c = 0 by a to get x² + (b/a)x + c/a = 0. Add (b/2a)² to both sides so the left side becomes a perfect square, (x + b/2a)² = (b² − 4ac) ÷ 4a². Taking square roots of both sides and subtracting b/2a leaves the formula.

Useful relationships

  • The sum of the roots equals −b/a.
  • The product of the roots equals c/a.
  • The vertex of the parabola sits at x = −b/2a, halfway between the two real roots when they exist.
  • If a is positive the parabola opens upward and the vertex is a minimum; if a is negative it opens downward and the vertex is a maximum.

Other ways to solve a quadratic

Factoring is quickest when the roots are simple whole numbers, completing the square helps when you need the vertex form, and graphing gives a visual estimate. The quadratic formula is the one method that always works, which is why it is worth memorizing.

Common mistakes

Forgetting to divide the entire numerator by 2a, dropping the negative sign on b, and miscomputing b² when b is negative are the usual slips. Remember that (−3)² is 9, not −9. Also make sure the equation is arranged with everything on one side and zero on the other before reading off a, b and c.

Real-world uses

Quadratic equations describe anything that accelerates evenly. The height of a ball thrown upward follows h = −4.9t² + v₀t + h₀ in meters, so the roots tell you when it lands. Areas lead to quadratics too: if a rectangle's length is 3 more than its width and its area is 40, then w² + 3w − 40 = 0, giving w = 5 (the negative root is discarded). Profit models, braking distances and projectile paths all reduce to the same formula, and the vertex gives the maximum or minimum value directly.

Frequently asked questions

What if a is zero?
Then the equation is linear (bx + c = 0) and has one solution x = −c/b. The quadratic formula does not apply.
What does a negative discriminant mean?
The parabola does not cross the x axis, and the two roots are complex numbers of the form p ± qi.
Can I enter fractions?
Yes. Type a coefficient such as 3/4 or −1/2 and it will be converted to a decimal for the calculation.
How do I check my roots?
Substitute each root back into ax² + bx + c. The result should be zero, apart from tiny rounding differences.

Formulas and sample results on this page were checked against independent references. Page last reviewed or updated . How we verify calculators. Project led by Shaun Connell.