Quadratic Formula Calculator

This quadratic formula calculator solves ax² + bx + c = 0 for real or complex roots and shows the discriminant, the vertex, exact radical answers and every step.

Quadratic Formula Calculator inputs

Result

Enter your values to see the result.

  • Formula v1.0, unit-tested
  • Examples generated by the calculator
  • Updated
  • How we calculate
On this page

Formula

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

a
the coefficient of x² (can't be 0)
b
the coefficient of x
c
the constant term
b² − 4ac
the discriminant, which decides whether the roots are real or complex

What the quadratic formula does

A quadratic equation is any equation that can be written as ax² + bx + c = 0 with a ≠ 0. Its graph is a parabola, and the solutions (also called roots or zeros) are the x-values where the parabola meets the x-axis. The quadratic formula,

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

gives those solutions for every quadratic, whether or not it factors neatly. It comes from completing the square on the general equation, so it is a shortcut you can always rely on rather than a trick that works only sometimes.

How to use the quadratic formula calculator

  1. Rearrange your equation so one side is 0. For example, 3x² = 7x − 2 becomes 3x² − 7x + 2 = 0.
  2. Enter a, b and c, including their signs. A missing term has a coefficient of 0, so x² − 9 = 0 has b = 0.
  3. The quadratic formula calculator shows the roots immediately. Underneath you’ll find the discriminant, the exact roots in simplest radical form, the vertex, the axis of symmetry, which way the parabola opens, the vertex form and the sum and product of the roots.
  4. The working lines show the formula with your numbers substituted, so you can copy the steps into homework or check a hand calculation.

Solving a quadratic by hand

Take 2x² − 3x − 5 = 0, so a = 2, b = −3 and c = −5.

  1. Discriminant: b² − 4ac = (−3)² − 4 × 2 × (−5) = 9 + 40 = 49.
  2. Square root: √49 = 7.
  3. Both roots: x = (3 + 7) ÷ 4 = 2.5 and x = (3 − 7) ÷ 4 = −1.

Check by substituting x = 2.5: 2 × 6.25 − 7.5 − 5 = 0. Because the discriminant was a perfect square, the equation also factors: (2x − 5)(x + 1) = 0.

When the roots are complex

For x² − 6x + 10 = 0, the discriminant is 36 − 40 = −4. There’s no real square root of −4, but √−4 = 2i, where i is the imaginary unit with i² = −1. The roots are x = (6 ± 2i) ÷ 2 = 3 ± i. On a graph, this parabola sits entirely above the x-axis with its lowest point at (3, 1), which is why it has no real zeros.

Simplifying radical answers

When the discriminant isn’t a perfect square, teachers usually expect the exact answer in simplest radical form. For x² − 4x − 1 = 0 the discriminant is 20, and √20 = √(4 × 5) = 2√5. Then x = (4 ± 2√5) ÷ 2 = 2 ± √5, about 4.236068 and −0.236068. The calculator divides out the common factor for you, and the square root calculator shows how any radical simplifies.

What the discriminant tells you

Discriminant b² − 4ac Roots Graph
Positive perfect square (1, 4, 9, …) Two rational roots; the quadratic factors Crosses the x-axis twice
Positive, not a perfect square Two irrational roots in radical form Crosses the x-axis twice
0 One repeated root, x = −b ÷ 2a Touches the x-axis at the vertex
Negative Two complex conjugate roots, p ± qi Never meets the x-axis

The vertex and the shape of the parabola

Every parabola is symmetric about the vertical line x = −b ÷ 2a. That line passes through the vertex and sits exactly halfway between the two roots. If a is positive the parabola opens upward and the vertex is the minimum value; if a is negative it opens downward and the vertex is a maximum. Rewriting the equation in vertex form, y = a(x − h)² + k, makes the vertex (h, k) visible at a glance. That is why the quadratic formula calculator reports it alongside the roots. The slope of the parabola changes from point to point, unlike a straight line, whose constant slope you can find with the slope calculator.

Real-life uses

  • Projectile motion. The height of a thrown object in feet is often modeled as h = −16t² + v₀t + h₀. Setting h = 0 and solving gives the time it lands. The vertex gives the maximum height and when it happens.
  • Area problems. A rectangle whose length is 3 m more than its width and whose area is 40 m² gives w(w + 3) = 40, or w² + 3w − 40 = 0, so w = 5 m.
  • Break-even and profit. When revenue or cost depends on the square of price or quantity, the roots mark the break-even points and the vertex marks maximum profit.
  • Geometry. Problems that combine the Pythagorean theorem with an unknown length often lead to a quadratic equation.

Common mistakes

  • Dropping the sign of b. In x² − 7x + 12 = 0, b is −7, so −b is +7. Wrap negative values in parentheses when you substitute.
  • Dividing only part of the top by 2a. The whole numerator −b ± √(b² − 4ac) is divided by 2a, not just the square root.
  • Forgetting to set the equation to zero. x² + 3x = 10 must become x² + 3x − 10 = 0 before you read off c = −10.
  • Squaring a negative b incorrectly. (−5)² is 25, not −25. Typing −5² into a calculator gives −25, because the square is applied before the minus sign.
  • Throwing away complex roots. If the problem asks for all solutions, a negative discriminant still gives two answers. They’re complex rather than real.

Glossary

  • Root, zero or solution: a value of x that makes ax² + bx + c equal 0.
  • Discriminant: b² − 4ac, the expression under the square root.
  • Vertex: the turning point of the parabola, at x = −b ÷ 2a.
  • Complex conjugates: a pair of numbers p + qi and p − qi.

Worked examples

Two whole-number roots

Solve x² − 7x + 10 = 0.

Inputs: a (x² coefficient) = 1; b (x coefficient) = -7; c (constant) = 10

Discriminant: D = b² − 4ac = (−7)² − 4 × 1 × 10 = 9 x = (−b ± √D) ÷ 2a = (7 ± √9) ÷ 2 √9 = 3, so x = 2 or x = 5 Vertex: h = −b ÷ 2a = 3.5, k = c − b² ÷ 4a = −2.25

Answer: x² − 7x + 10 = 0: x = 2 or x = 5. Discriminant 9, vertex (3.5, −2.25).

Irrational roots

Solve 2x² + 4x − 3 = 0, whose discriminant 40 is not a perfect square.

Inputs: a (x² coefficient) = 2; b (x coefficient) = 4; c (constant) = -3

Discriminant: D = b² − 4ac = 4² − 4 × 2 × (−3) = 40 x = (−b ± √D) ÷ 2a = (−4 ± √40) ÷ 4 √40 = 6.324555, so x = −2.581139 or x = 0.581139 Vertex: h = −b ÷ 2a = −1, k = c − b² ÷ 4a = −5

Answer: 2x² + 4x − 3 = 0: x = −2.581139 or x = 0.581139 (exact: x = (−2 ± √10)/2). Discriminant 40, vertex (−1, −5).

Complex roots

Edge case: x² + 4x + 13 = 0 has a negative discriminant, so the roots are complex.

Inputs: a (x² coefficient) = 1; b (x coefficient) = 4; c (constant) = 13

Discriminant: D = b² − 4ac = 4² − 4 × 1 × 13 = −36 x = (−b ± √D) ÷ 2a = (−4 ± √(−36)) ÷ 2 √(−36) = 6i, so x = −2 ± 3i Vertex: h = −b ÷ 2a = −2, k = c − b² ÷ 4a = 9

Answer: x² + 4x + 13 = 0: x = −2 ± 3i. Discriminant −36, vertex (−2, 9).

Height of a thrown ball

A ball thrown up at 48 ft/s from a 64 ft roof has height −16t² + 48t + 64. When does it hit the ground (height 0)?

Inputs: a (x² coefficient) = -16; b (x coefficient) = 48; c (constant) = 64

Discriminant: D = b² − 4ac = 48² − 4 × (−16) × 64 = 6,400 x = (−b ± √D) ÷ 2a = (−48 ± √6,400) ÷ (−32) √6,400 = 80, so x = −1 or x = 4 Vertex: h = −b ÷ 2a = 1.5, k = c − b² ÷ 4a = 100

Answer: −16x² + 48x + 64 = 0: x = −1 or x = 4. Discriminant 6,400, vertex (1.5, 100).

Assumptions and limitations

  • The equation must be in standard form, ax² + bx + c = 0. Move every term to one side before entering a, b and c.
  • a can't be 0. With no x² term the equation is linear, and its single solution is x = −c ÷ b.
  • Coefficients can be whole numbers, decimals or negatives between −1,000,000,000 and 1,000,000,000. Decimal coefficients are scaled to whole numbers to find the exact answer.
  • Decimal roots are rounded to 6 decimal places. Very small or very large values are shown in scientific notation.
  • The exact form in simplest radical form is shown when the discriminant (after scaling) is no larger than 1,000,000,000,000.
  • Complex roots are written as p ± qi, where i = √−1. They always come in conjugate pairs when a, b and c are real.
  • The roots are computed with a numerically stable version of the formula, so a small root next to a very large one keeps its accuracy.

Frequently asked questions

How do you solve a quadratic equation with the quadratic formula?

Write the equation as ax² + bx + c = 0, read off a, b and c, and substitute them into x = (−b ± √(b² − 4ac)) ÷ 2a. Work out the discriminant b² − 4ac first, take its square root, then evaluate once with + and once with −.

What does the discriminant tell you?

If b² − 4ac is positive there are two different real roots, if it is 0 there is one repeated real root, and if it is negative there are two complex roots and the parabola never crosses the x-axis. A positive perfect-square discriminant also means the equation factors over the whole numbers.

Can the quadratic formula calculator handle imaginary numbers?

Yes. When the discriminant is negative, the calculator takes the square root of its absolute value, attaches i, and reports the roots as p ± qi, together with the exact form such as (−1 ± 3i)/2.

How do I enter fractions?

Enter fractions as decimals, such as 0.5 for 1/2 or 0.25 for 1/4. The calculator scales decimal coefficients to whole numbers before finding the exact roots. For thirds or other repeating decimals, multiply the whole equation by the denominator first. For example, (1/3)x² + x − 2 = 0 becomes x² + 3x − 6 = 0, which has the same roots.

How do I find the vertex of a parabola from the quadratic formula?

The x-coordinate of the vertex is h = −b ÷ 2a, the midpoint of the two roots. Substitute h into the equation (or use k = c − b² ÷ 4a) to get the y-coordinate. The calculator lists the vertex, the axis of symmetry and the vertex form y = a(x − h)² + k.

Why can't a be 0?

The formula divides by 2a, and without the x² term the equation is a straight line rather than a parabola. Solve bx + c = 0 directly instead, which gives x = −c ÷ b.

When should I factor instead of using the formula?

Factoring is faster when the roots are small whole numbers or simple fractions, as in x² − 5x + 6 = (x − 2)(x − 3). The quadratic formula works for every quadratic, including ones that don't factor neatly, so use it whenever you can't spot the factors.

Sources

  1. 2.5 Quadratic Equations — College Algebra 2e — OpenStax, Rice University. Checked October 10, 2026.
  2. Quadratic Equation — Wolfram MathWorld. Checked October 10, 2026.