NewA place value chart for any number, with decimals and the Indian system. Try it free Need help? support@printsheetlab.com

Browse all topics

Quadratic Formula Calculator With Steps

Enter a, b and c to solve ax² + bx + c = 0: get both roots (real or complex), the discriminant, vertex and factored form, with every step shown.

A quadratic formula calculator solves any equation of the form ax² + bx + c = 0 by putting the three numbers a, b and c into x = (−b ± √(b² − 4ac)) ÷ 2a. Type a, b and c above and this free quadratic formula calculator with steps shows both roots, the discriminant, the vertex and every step of the working.

Quick answer: for x² − 5x + 6 = 0 the numbers are a = 1, b = −5 and c = 6. The discriminant b² − 4ac is 25 − 24 = 1, so x = (5 ± √1) ÷ 2, which gives x = 3 and x = 2. A positive discriminant means two real roots, zero means one repeated root, and a negative one means two complex roots.

Parabola y = x squared minus 5x plus 6 showing roots, vertex, axis of symmetry and y-intercept beside the quadratic formula
The parabola y = x² − 5x + 6 with its roots, vertex, axis of symmetry and y-intercept, next to the quadratic formula and the three discriminant cases.

How to use this quadratic formula calculator with steps

Rewrite your equation so that everything is on one side and the other side is zero. Then read off the three numbers and type them in. The answer updates as you type, so there is no Calculate button.

  1. Move all terms to one side so the equation reads ax² + bx + c = 0. For 3x² = 7x − 2, subtract 7x and add 2 on both sides to get 3x² − 7x + 2 = 0.
  2. Type a (the number in front of x²), b (the number in front of x) and c (the number on its own). Use a minus sign for negatives, and write 0 if a term is missing.
  3. Read the headline answer, then open How it works to see each step with your own numbers.
  4. Use Copy result to paste the answer into homework notes, or Copy link to share the exact equation.
Input or output What it means
a, b, c The coefficients. Decimals (0.5) and fractions (1/2) work, so 0.5x² + x − 3 can be typed as it is
Discriminant b² − 4ac, the number under the square root. It decides the type of roots
Roots x₁ and x₂ The solutions. They are also the x-intercepts of the graph when they are real
Vertex and axis of symmetry The turning point of the parabola and the vertical line through it
y-intercept Where the graph crosses the y-axis, always the point (0, c)
Factored form Shown when the roots are rational, for example (x − 2)(x − 3)
Graph and table A small plot of the parabola and a table of x and y values around the vertex

If you type a = 0 the calculator does not divide by zero. It tells you the equation is linear and solves bx + c = 0 instead, which is the right answer when the x² term disappears.

The quadratic formula and how it works

The quadratic formula comes from completing the square on ax² + bx + c = 0. It works for every quadratic equation, whether or not the left side factors neatly, which is why it is the dependable method behind any quadratic equation calculator. The formula is:

x = (−b ± √(b² − 4ac)) ÷ 2a, where a is the x² coefficient, b is the x coefficient and c is the constant. The ± sign means you work out the answer twice: once adding the square root and once subtracting it.

The work always follows the same order: find the discriminant, decide what kind of roots to expect, substitute into the formula, then simplify. The next two examples are exactly what the calculator shows in its steps.

Example 1: x² − 5x + 6 = 0 (two whole-number roots)

  1. Match your equation to the standard form ax² + bx + c = 0. Yours is x² − 5x + 6 = 0, so a = 1, b = −5, c = 6.
  2. Discriminant: b² − 4ac = (−5)² − 4(1)(6) = 25 − 24 = 1. It is positive, so there are two real roots.
  3. Substitute: x = (−(−5) ± √1) ÷ (2 × 1) = (5 ± 1) ÷ 2.
  4. Plus sign: (5 + 1) ÷ 2 = 3. Minus sign: (5 − 1) ÷ 2 = 2.
  5. Check with the sum and product: 3 + 2 = 5 = −b ÷ a and 3 × 2 = 6 = c ÷ a.

Because the discriminant is a perfect square, the roots are rational and the equation factors as (x − 2)(x − 3) = 0. The vertex sits halfway between the roots at x = 2.5, where y = −0.25.

Example 2: 2x² + 3x − 2 = 0 (a is not 1)

Here a = 2, b = 3 and c = −2. The discriminant is 3² − 4(2)(−2) = 9 − (−16) = 9 + 16 = 25, so √25 = 5. Then x = (−3 ± 5) ÷ 4. The plus sign gives 2 ÷ 4 = 0.5 and the minus sign gives −8 ÷ 4 = −2. The factored form is (x + 2)(2x − 1) = 0, and the vertex is (−0.75, −3.125).

Quadratic equation calculator: ten solved examples

This table was produced by the same code as the calculator above, so you can use it as an answer key. Each row lists the equation, its discriminant, its roots and its vertex.

Equation Discriminant Roots Vertex
x² − 5x + 6 = 0 1 2 or 3 (2.5, −0.25)
2x² + 3x − 2 = 0 25 −2 or 0.5 (−0.75, −3.125)
3x² − 7x + 2 = 0 25 1/3 or 2 (7/6, −25/12)
x² − 4x + 4 = 0 0 2 (repeated) (2, 0)
x² − 2x − 1 = 0 8 ≈ −0.4142 or ≈ 2.4142 (1, −2)
x² + 6x + 13 = 0 −16 −3 ± 2i (−3, 4)
2x² − 4x + 5 = 0 −24 1 ± 1.2247i (1, 3)
−x² + 2x + 8 = 0 36 −2 or 4 (1, 9)
4x² − 12x + 9 = 0 0 1.5 (repeated) (1.5, 0)
−16x² + 48x + 5 = 0 2624 ≈ −0.1008 or ≈ 3.1008 (1.5, 41)

The last row is a projectile: a ball thrown upward at 48 feet per second from a height of 5 feet follows h = −16t² + 48t + 5. Setting h = 0 finds when it lands: D = 2,624, so t ≈ 3.1008 seconds (the other root, −0.1008, is negative and is ignored). The vertex (1.5, 41) says it peaks at 41 feet after 1.5 seconds.

Discriminant calculator: what b² − 4ac tells you

The discriminant is the quickest check on a quadratic equation. It is the first number the calculator shows because it tells you what to expect before you finish the formula. Use this table as a discriminant calculator for the three cases:

Discriminant D Roots Graph Example
D > 0 and a perfect square Two different rational roots Crosses the x-axis twice, at fractions or whole numbers x² − 5x + 6: D = 1, roots 2 and 3
D > 0 but not a perfect square Two different irrational roots Crosses the x-axis twice, at decimals x² − 2x − 1: D = 8, roots 1 ± √2
D = 0 One repeated real root Touches the x-axis once, at the vertex x² − 4x + 4: D = 0, root 2
D < 0 Two complex roots, a ± bi Never reaches the x-axis x² + 6x + 13: D = −16, roots −3 ± 2i
Three parabolas showing the discriminant cases for a quadratic equation: two real roots, one repeated root and complex roots
Three parabolas showing how the discriminant decides the roots: two real roots when D is positive, one repeated root when D is zero, and none on the x-axis when D is negative.

If the discriminant is a perfect square, the equation factors with whole numbers, so factoring is an alternative. If it is not, use the formula, because guessing factors will fail.

Quadratic formula with imaginary numbers and complex roots

When the discriminant is negative there is no real square root, so the solutions are complex roots. The imaginary unit i is defined by i² = −1, which means √(−n) = i√n. The two roots are a complex conjugate pair: the same real part, with imaginary parts of opposite sign.

Take 2x² − 4x + 5 = 0. The discriminant is (−4)² − 4(2)(5) = 16 − 40 = −24. Then x = (4 ± √(−24)) ÷ 4 = (4 ± i√24) ÷ 4, and since √24 = 2√6 this simplifies to x = (2 ± i√6) ÷ 2.

As decimals that is x ≈ 1 ± 1.2247i. The quadratic formula calculator prints both the exact form and the decimal form, and it checks the pair: the two roots add to 2, which is −b ÷ a, and multiply to 2.5, which is c ÷ a.

In school algebra, complex roots usually mean “no real solutions”. In physics and electronics they describe oscillations that grow or fade.

Vertex of a parabola, axis of symmetry and y-intercept

Every quadratic equation is the graph of a parabola, and the calculator reports its key points. The vertex of a parabola is the turning point. Its x-coordinate is −b ÷ 2a, which is the part of the quadratic formula that sits outside the square root, and its y-coordinate is found by putting that x back into ax² + bx + c.

Feature Formula For y = x² − 5x + 6
Axis of symmetry x = −b ÷ 2a x = 5 ÷ 2 = 2.5
Vertex (−b ÷ 2a, f(−b ÷ 2a)) (2.5, −0.25)
y-intercept (0, c) (0, 6)
Opens Up if a > 0, down if a < 0 Up, so the vertex is the minimum
Roots (−b ± √D) ÷ 2a x = 2 and x = 3 (distance √D ÷ 2|a| = 0.5 either side of the axis)

The two roots are always the same distance from the axis of symmetry, so you can sketch a parabola quickly: plot the vertex, the y-intercept and its mirror image, then add the roots. The vertex also gives the maximum or minimum value, such as the highest point of a thrown ball.

Quadratic formula vs factoring vs completing the square

The formula is not the only way to solve a quadratic, but it works for every quadratic (completing the square does too, since the formula is derived from it). This comparison shows when each method is the best choice.

Method Best when Weakness
Quadratic formula Any quadratic, especially with decimals, fractions or irrational roots More arithmetic; sign errors are common
Factoring Small whole numbers and a perfect-square discriminant Guessing fails when the roots are irrational
Completing the square You need vertex form, or a = 1 and b is even Slow when a is not 1
Square roots The equation has no x term, such as 2x² = 18 Only works when b = 0

Special cases: a = 0, b = 0 and c = 0

When a = 0 the equation is linear, not quadratic, and the formula would divide by zero. The calculator solves bx + c = 0 and gives x = −c ÷ b. When b = 0, as in 2x² − 18 = 0, the roots are plus and minus a square root: x = ±√(−c ÷ a) = ±3. When c = 0, as in x² − 7x = 0, one root is always 0 and the other is −b ÷ a = 7.

Where the quadratic formula is used in real life

  • Projectiles: the height of a thrown ball is a quadratic in time, so the formula finds when it lands, as in the −16t² + 48t + 5 example above.
  • Area problems: a rectangular garden with a perimeter of 40 feet and an area of 91 square feet has sides x and 20 − x, so x² − 20x + 91 = 0 and the sides are 7 and 13 feet.
  • Business: if profit is −2p² + 80p − 600 dollars at price p, the roots are the break-even prices (10 and 30 dollars) and the vertex (20, 200) is the best price.
Graph of a thrown ball h = -16t squared plus 48t plus 5 showing the landing time and the peak at the vertex
The path of a ball thrown upward, h = −16t² + 48t + 5, with the landing time found by the quadratic formula and the peak at the vertex.

Common mistakes with the quadratic formula

  • Not setting the equation to zero first. The formula needs ax² + bx + c = 0 exactly.
  • Dropping a negative sign. If b = −5, then −b is +5 and b² is 25, not −25. Put negatives in brackets.
  • Dividing only the square root. The whole numerator −b ± √D is divided by 2a.
  • Forgetting the second root. The ± sign always means two calculations unless D = 0.

How do you use the quadratic formula on a calculator?

On a scientific or graphing calculator, type (−b + √(b² − 4ac)) ÷ (2a), then repeat with a minus sign; many models also have a built-in equation solver. This online quadratic formula calculator also prints the working, which is what a teacher asks for. Check your exam rules before using any calculator in a test.

What does a negative discriminant mean?

A negative discriminant means the parabola never touches the x-axis, so the equation has no real solutions. It has two complex solutions instead, written a ± bi. The calculator reports them in both exact and decimal form so you can answer either style of question.

Practice and printable paper

Students meet the formula in Algebra 1 or Algebra 2 in the United States, at GCSE and A-level in the UK, and in Class 10 in India; check your syllabus for the working you must show. Print some graph paper to sketch each parabola by hand, and browse the worksheets hub for printable practice on the arithmetic this formula needs.

Frequently asked questions

10 quick answers

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) ÷ 2a. It gives the solutions of any equation of the form ax² + bx + c = 0, where a is not zero.

How does a quadratic formula calculator work?

It reads a, b and c, computes the discriminant b² − 4ac, takes the square root and divides by 2a for both the plus and minus signs. This quadratic formula calculator also shows each step, the vertex and the factored form.

What is the discriminant?

The discriminant is b² − 4ac, the expression under the square root. Positive means two real roots, zero means one repeated root, and negative means two complex roots.

Can this calculator solve quadratic equations with imaginary numbers?

Yes. When the discriminant is negative it gives the two complex roots in the form p ± qi, with an exact form where possible, for example 3 ± i for x² − 6x + 10 = 0.

What do I type if a term is missing?

Type 0 for it. For x² − 9 = 0 use a = 1, b = 0 and c = −9, which gives x = 3 and x = −3.

What if a is zero?

Then the equation is linear, not quadratic. The calculator solves bx + c = 0 and gives x = −c ÷ b, or tells you when there is no solution or every number is a solution.

How do I find the vertex of a quadratic equation?

The x-coordinate is −b ÷ 2a. Put it back into the equation to get y. For x² − 5x + 6 the vertex is (2.5, −0.25).

Is the calculator accurate for large or decimal numbers?

It uses exact fraction arithmetic for the discriminant, so it never mistakes a tiny rounding error for a repeated root. Decimals in the roots are rounded to four places.

Can the roots be fractions or decimals?

Yes. The roots are exact fractions when the discriminant is a perfect square, for example 1/3 and 2 for 3x² − 7x + 2 = 0, and irrational decimals such as 2.4142 and −0.4142 otherwise.

Why does the quadratic formula have a plus-or-minus sign?

Because a square root has two values, positive and negative. Squaring either one gives the same number, so a quadratic equation can have two solutions.

Sources and further reading

Last updated: October 2026.