Quadratic Equation Calculator

Larger root3
Rootsx = 2 and x = 3
Discriminant1
Vertex(2.5, -0.25)
Axis of symmetryx = 2.5
How this was calculated
  1. The discriminant D = b² − 4ac = (-5)² − 4 × 1 × 6 = 1. A positive discriminant means two distinct real roots.
  2. Quadratic formula: x = (−b ± √D) ÷ 2a = (5 ± 1) ÷ 2, giving x = 2 and x = 3.
  3. Check by substitution: 1 × (3)² + -5 × (3) + 6 = 0 ✓. The vertex — the curve's lowest point — is at (2.5, -0.25).

A quadratic equation calculator solves any equation of the form ax² + bx + c = 0 using the quadratic formula: x = (-b ± sqrt(b² - 4ac)) / 2a. Enter the coefficients a, b, and c, and the tool returns the roots along with the discriminant D = b² - 4ac. A positive discriminant gives two real roots, zero gives one repeated root, and negative gives two complex roots. The calculator also finds the vertex, which sits at x = -b / 2a, the axis of symmetry. Its y-value is the maximum when a is negative or the minimum when a is positive. For example, x² - 5x + 6 = 0 gives D = 1 with roots x = 2 and x = 3 and a vertex at (2.5, -0.25). Another example, 2x² - 4x - 6 = 0, gives D = 64 with roots x = 3 and x = -1 and a vertex at (1, -8).

The quadratic formula is the accepted standard for solving these equations because it works for every case, whether the roots are real, repeated, or complex. Unlike factoring or graphing, it never fails to produce an exact answer. Every result can be verified by substituting a root back into the original equation, where it must give exactly 0. This page shows the full formula, step-by-step workings, worked examples, and sources so you can follow each calculation from start to finish.

Worked examples

x² − 5x + 6 = 0

Discriminant 1, roots x = 2 and x = 3, vertex at (2.5, −0.25) — the textbook factorable case. (1 · -5 · 6)

Larger root3
Rootsx = 2 and x = 3
Discriminant1
Vertex(2.5, -0.25)
Axis of symmetryx = 2.5

x² + 3x − 4 = 0

Discriminant 25 gives clean roots x = 1 and x = −4. (1 · 3 · -4)

Larger root1
Rootsx = -4 and x = 1
Discriminant25
Vertex(-1.5, -6.25)
Axis of symmetryx = -1.5

2x² − 4x − 6 = 0

With a = 2 the roots are still whole: x = 3 and x = −1, vertex (1, −8). (2 · -4 · -6)

Larger root3
Rootsx = -1 and x = 3
Discriminant64
Vertex(1, -8)
Axis of symmetryx = 1

The quadratic formula and the discriminant

The quadratic formula solves any equation of the form ax² + bx + c = 0: x = (-b ± sqrt(b² - 4ac)) / 2a. But before you ever touch that formula, there is a single number that tells you exactly what to expect. That number is the discriminant, written as D = b² - 4ac. Think of it as a preview of the answer: it predicts whether you will get two real roots, one repeated root, or two complex roots. A quadratic equation calculator relies on this same check, and understanding it will help you interpret results instantly.

The rule is simple. When D is positive, the equation has two distinct real roots. When D is zero, there is exactly one repeated real root. When D is negative, the two roots are complex. The verified examples make this concrete. For x² - 5x + 6 = 0, the discriminant is D = 1, which is positive, and the roots are x = 2 and x = 3. For x² + 3x - 4 = 0, the discriminant is D = 25, also positive, and the roots are x = 1 and x = -4. For 2x² - 4x - 6 = 0, the discriminant is D = 64, again positive, and the roots are x = 3 and x = -1. In each case, a positive discriminant lines up with two real roots you can plot on a number line.

The discriminant also connects to the shape of the parabola. The vertex sits at x = -b / 2a, which is the axis of symmetry. Its y-value is the maximum when a is less than zero and the minimum when a is greater than zero. For x² - 5x + 6 = 0, the vertex is at (2.5, -0.25). For 2x² - 4x - 6 = 0, the vertex is at (1, -8). These points mark the lowest or highest spot on the curve and help you see why a positive discriminant means the parabola crosses the x-axis twice.

Once the discriminant tells you what to expect, the quadratic formula does the rest. Every answer can be checked by substituting a root back into the original equation, where it must give exactly 0. This is the final step that confirms the result is not just plausible but correct.

The discriminant D = b² - 4ac is one number that predicts the outcome before you solve: positive means two real roots, zero means one repeated root, and negative means two complex roots.

Worked examples, checked by substitution

A quadratic equation calculator is only as good as the math behind it, so this section walks through three verified equations step by step. Each one is solved with the quadratic formula, x = (-b ± sqrt(b² - 4ac)) / 2a, and every root is substituted back into the original equation to confirm it gives exactly 0. The discriminant D = b² - 4ac appears throughout, because it decides the nature of the roots: positive gives two real roots, zero gives one repeated root, and negative gives two complex roots.

First, take x² - 5x + 6 = 0, where a = 1, b = -5, and c = 6. The discriminant is D = (-5)² - 4(1)(6) = 25 - 24 = 1, which is positive, so two real roots are expected. Plugging into the formula gives x = (5 ± sqrt(1)) / 2, which produces x = 3 and x = 2. Substituting x = 3 back in: (3)² - 5(3) + 6 = 9 - 15 + 6 = 0. Substituting x = 2 back in: (2)² - 5(2) + 6 = 4 - 10 + 6 = 0. Both roots check out. The vertex sits at x = -b / 2a = 5 / 2 = 2.5, and its y-value is -0.25, so the vertex is (2.5, -0.25).

Second, consider x² + 3x - 4 = 0, where a = 1, b = 3, and c = -4. The discriminant is D = (3)² - 4(1)(-4) = 9 + 16 = 25, again positive. The formula gives x = (-3 ± sqrt(25)) / 2, which produces x = 1 and x = -4. Substituting x = 1 back in: (1)² + 3(1) - 4 = 1 + 3 - 4 = 0. Substituting x = -4 back in: (-4)² + 3(-4) - 4 = 16 - 12 - 4 = 0. Both roots are confirmed. The vertex sits at x = -3 / 2 = -1.5, which is also the axis of symmetry.

Third, look at 2x² - 4x - 6 = 0, where a = 2, b = -4, and c = -6. The discriminant is D = (-4)² - 4(2)(-6) = 16 + 48 = 64, positive once more. The formula gives x = (4 ± sqrt(64)) / 4, which produces x = 3 and x = -1. Substituting x = 3 back in: 2(3)² - 4(3) - 6 = 18 - 12 - 6 = 0. Substituting x = -1 back in: 2(-1)² - 4(-1) - 6 = 2 + 4 - 6 = 0. Both roots hold up. The vertex sits at x = 4 / 4 = 1, and its y-value is -8, so the vertex is (1, -8). The table below collects every value used above.

EquationabcDRootsVertex
x² - 5x + 6 = 01-561x = 2, x = 3(2.5, -0.25)
x² + 3x - 4 = 013-425x = 1, x = -4Not given
2x² - 4x - 6 = 02-4-664x = 3, x = -1(1, -8)
Every answer can be checked by substituting a root back into the original equation, where it must give exactly 0. The vertex sits at x = -b / 2a, which is also the axis of symmetry; its y-value is the maximum when a < 0 or the minimum when a > 0.

How to use this quadratic equation calculator

Before you enter anything into this quadratic equation calculator, get your equation into the standard form ax² + bx + c = 0, with every term on one side of the equals sign. That step matters because the calculator needs three coefficients — a, b, and c — to apply the quadratic formula: x = (-b ± sqrt(b² - 4ac)) / 2a. Watch your signs carefully as you identify each value. For example, in the equation x² - 5x + 6 = 0, the middle coefficient b is negative 5, not positive 5, because the term appears as - 5x. Getting a sign wrong on b, a, or c will shift every result that follows, so double-check each one before you proceed.

Once you enter the coefficients, the calculator computes the discriminant D = b² - 4ac behind the scenes. The discriminant decides what kind of roots you get: a positive value gives two real roots, zero gives one repeated root, and a negative value gives two complex roots. When D is less than zero, expect to see complex numbers in the output rather than simple integers or fractions. That is not an error — it simply reflects the fact that the parabola never crosses the x-axis. Verified examples make the pattern easy to follow: x² - 5x + 6 = 0 has D = 1 and roots x = 2 and x = 3, while x² + 3x - 4 = 0 has D = 25 and roots x = 1 and x = -4. A larger discriminant like the D = 64 found in 2x² - 4x - 6 = 0, which has roots x = 3 and x = -1, still follows the same rule.

The calculator also locates the vertex of the parabola, which sits at x = -b / 2a. This x-value is also the axis of symmetry, the vertical line that splits the curve into two mirror halves. The y-value at that point is the minimum of the parabola when a is greater than zero and the maximum when a is less than zero. For x² - 5x + 6 = 0, the vertex is at (2.5, -0.25); for 2x² - 4x - 6 = 0, the vertex is at (1, -8). Knowing the vertex helps you picture how the roots relate to the overall shape of the graph.

Every answer can be checked by substituting a root back into the original equation, where it must give exactly 0. If you plug x = 2 into x² - 5x + 6, you get 4 - 10 + 6, which equals 0. If you plug x = -4 into x² + 3x - 4, you get 16 - 12 - 4, which also equals 0. This substitution test is the surest way to confirm that the coefficients you entered were correct and that the output is trustworthy.

When D is less than zero, the calculator returns two complex roots. This is expected behavior, not a mistake — it means the parabola does not cross the x-axis.

Reading the parabola from the answer

When a quadratic equation calculator gives you the roots, it is also handing you the x-intercepts of the parabola. Those roots are the exact spots where the curve crosses the horizontal axis. If the discriminant D is positive, you get two real roots and the parabola crosses the axis twice. When D is zero, there is one repeated root, so the curve just touches the axis at a single point. A negative discriminant means two complex roots, and the parabola never touches the x-axis at all.

The vertex is the turning point of the parabola, and it sits on the axis of symmetry at x = -b / 2a. This vertical line splits the curve into two mirror-image halves. The y-value at that x tells you whether the vertex is a minimum or a maximum. When a is positive, the parabola opens upward, so the vertex is the lowest point on the curve. When a is negative, the parabola opens downward, and the vertex becomes the highest point instead.

Take x² - 5x + 6 = 0, which has D = 1 and roots x = 2 and x = 3. Since a is positive, the parabola opens upward and the vertex is a minimum. Plugging in x = -b / 2a gives x = 2.5, and the verified vertex sits at (2.5, -0.25). The axis of symmetry is the line x = 2.5, right between the two roots. You can confirm any root by substituting it back into the original equation, where it must give exactly 0.

The same logic works for 2x² - 4x - 6 = 0, which has D = 64 and roots x = 3 and x = -1. Here a is positive, so the parabola opens upward and the vertex is a minimum. The axis of symmetry is x = 1, and the verified vertex is at (1, -8). Notice how the axis always falls halfway between the two roots, and the vertex sits directly on that line. For x² + 3x - 4 = 0, which has D = 25 and roots x = 1 and x = -4, the axis of symmetry is x = -1.5, again exactly between the two x-intercepts.

  • Roots are the x-intercepts where the parabola crosses the horizontal axis
  • The vertex at x = -b / 2a is the turning point and lies on the axis of symmetry
  • Positive a opens upward with a minimum vertex; negative a opens downward with a maximum vertex
  • The axis of symmetry always falls halfway between the two real roots
You can check every root by substituting it back into the original equation, where it must give exactly 0.

Factoring vs formula vs completing the square

A quadratic equation calculator gives you the roots without asking you to pick a method, but understanding the three main approaches helps you know what the tool is doing behind the scenes. Factoring, the quadratic formula, and completing the square all arrive at the same roots for the same equation. They just take different amounts of effort and reveal different information along the way.

Factoring is the fastest path when the roots are whole numbers. Take x² - 5x + 6 = 0. You can rewrite it as (x - 2)(x - 3) = 0, which immediately gives x = 2 and x = 3. The discriminant D = b² - 4ac confirms this: here D = 1, which is positive, so two real roots exist. Another example is x² + 3x - 4 = 0, where D = 25 and the roots are x = 1 and x = -4. When the numbers cooperate, factoring takes seconds. When they do not, factoring becomes frustrating or impossible, and you are better off switching methods.

The quadratic formula always works. For any equation in the form ax² + bx + c = 0, the formula x = (-b ± sqrt(b² - 4ac)) / 2a produces every root, real or complex. The discriminant D = b² - 4ac tells you what to expect before you finish: a positive D gives two real roots, zero gives one repeated root, and a negative D gives two complex roots. Consider 2x² - 4x - 6 = 0, which has D = 64. Plugging into the formula yields x = 3 and x = -1. You could factor this one too, but the formula handles cases where factoring fails, such as irrational roots or non-integer coefficients.

Completing the square takes more effort but reveals the vertex form of the parabola. The vertex sits at x = -b / 2a, which is also the axis of symmetry. Its y-value is the minimum when a > 0 and the maximum when a < 0. For x² - 5x + 6 = 0, the vertex is at (2.5, -0.25). For 2x² - 4x - 6 = 0, the vertex is at (1, -8). Factoring and the formula give you the roots but not the vertex, so completing the square is the method of choice when you need both pieces of information from a single calculation.

No matter which method you use, every answer can be checked by substituting a root back into the original equation, where it must give exactly 0. This verification step catches arithmetic slips that happen during factoring or while evaluating the formula. A quadratic equation calculator performs this check automatically, but doing it by hand builds confidence in your own work.

Common mistakes

A quadratic equation calculator removes the arithmetic errors that trip up most people, but understanding the common mistakes helps you catch them in your own work. The quadratic formula solves ax² + bx + c = 0 using x = (-b ± sqrt(b² - 4ac)) / 2a. Each part of that formula is a place where a small slip can produce a wrong answer, and knowing where those slips happen makes you faster and more accurate.

The most frequent mistake is dropping the ± symbol. The formula produces two values because of the ± sign: one using the positive square root and one using the negative. When you forget the ±, you lose an entire root. For example, x² - 5x + 6 = 0 has two real roots, x = 2 and x = 3, because the discriminant D = b² - 4ac equals 1. If you ignore the ±, you would report only one of those roots and miss the other. The same applies to x² + 3x - 4 = 0, where D = 25 and the roots are x = 1 and x = -4. Both roots matter, and the ± is what delivers them.

Another common error is placing 2a under only part of the numerator instead of the entire numerator. The denominator 2a divides the whole expression (-b ± sqrt(b² - 4ac)), not just the square root piece. Writing it as -b ± sqrt(b² - 4ac) / 2a changes the math entirely and gives wrong results. Sign errors on b² when b is negative are just as common. The formula uses b², so squaring a negative value of b should always give a positive result. If b is negative and you carry that sign through the square, the discriminant becomes wrong and every root that follows will be wrong too.

A final mistake happens before the formula is ever used: solving before moving everything to one side of the equation. The quadratic formula only applies to the form ax² + bx + c = 0. If terms are scattered on both sides, the values you plug in for a, b, and c will not match the equation you actually have. Always rearrange first so that zero sits alone on one side. Once the equation is in the correct form, the discriminant tells you what to expect: positive gives two real roots, zero gives one repeated root, and negative gives two complex roots. You can verify any result by substituting a root back into the original equation, where it must give exactly 0.

Before using the quadratic formula, always rearrange the equation so that zero is alone on one side. The formula only works on the form ax² + bx + c = 0.

FAQs

What is the quadratic formula?

The quadratic formula is x = (-b ± sqrt(b² - 4ac)) / 2a, used for any equation ax² + bx + c = 0. For example, applying it to x² - 5x + 6 = 0 gives x = 2 and x = 3 as the two solutions.

What does the discriminant tell you?

The discriminant is D = b² - 4ac. A positive value means two real roots, zero means one repeated root, and negative means two complex roots. The examples on this page have D = 1, 25, and 64, each yielding real roots.

How do I find the vertex of a parabola?

Use x = -b / 2a to find the vertex's x-coordinate, then substitute back into the equation to find y. For x² - 5x + 6, the vertex is (2.5, -0.25), which is the lowest or highest point on the parabola.

What if the discriminant is negative?

A negative discriminant means there are no real roots, so the parabola never crosses the x-axis. However, there are two complex roots of the form p ± qi, which this calculator shows so you can still see the full solution.

Why are there two answers?

A parabola can cross the x-axis twice, and both crossings satisfy the equation. Substitution confirms this: each root makes the expression exactly 0. This is why the quadratic formula produces two solutions rather than one.

Does a have to be 1?

No. The coefficient a can be any nonzero value. For example, 2x² - 4x - 6 = 0 solves the same way, giving x = 3 and x = -1. The value of a is simply carried through the formula just like b and c.

Sources

Related calculators

Exponent Calculator
Any base to any power — whole, negative and fractional exponents — with squares and cubes for reference.
Root Calculator
Square roots, cube roots and any nth root — with square and cube shown alongside and a check for perfect powers.
Slope Calculator
Slope, angle, distance and midpoint between two points, plus the full equation of the line through them — the whole coordinate-geometry answer in one go.
Average Calculator
Mean, median, mode, range, sum and count for 2 to 8 numbers — the full descriptive-statistics starter set in one pass.