Solve a quadratic equation from coefficients a, b and c and interpret its discriminant and roots.

Quadratic Formula Calculator

Solve quadratic equations in the form ax² + bx + c = 0 using the quadratic formula, with real or complex roots and full calculation steps.

ax² + bx + c = 0

A Quadratic Formula Calculator solves equations written in the standard form:

ax² + bx + c = 0

where:

a ≠ 0

The calculator uses the quadratic formula to find the roots and evaluates the discriminant to determine whether the equation has:

two distinct real roots

one repeated real root

or:

two complex-conjugate roots

It is useful for algebra, graphing, physics problems, geometry, and other situations involving quadratic equations.

Rewrite the equation so one side equals zero, enter a, b, and c with the correct signs, then review both the discriminant and the roots.

The quadratic formula

For:

ax² + bx + c = 0

the roots are:

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

The symbol:

±

means there are two branches:

x₁ = (−b + √(b² − 4ac)) / (2a)

and:

x₂ = (−b − √(b² − 4ac)) / (2a)

Both branches must be considered unless the square-root term is zero.

How to use the Quadratic Formula Calculator

  1. Rewrite the equation in standard form:
    ax² + bx + c = 0
  2. Identify the coefficient a.
  3. Identify the coefficient b.
  4. Identify the constant c.
  5. Include negative signs exactly as they appear.
  6. Enter 0 when a term is missing.
  7. Calculate the discriminant.
  8. Review the root type.
  9. Check the returned roots by substitution or Vieta’s relations.

If:

a = 0

the equation is not quadratic.

Identifying a, b, and c correctly

Consider:

2x² − 7x + 3 = 0

Then:

a = 2

b = −7

c = 3

The negative sign belongs to the coefficient:

b

It must be entered as:

−7

not:

7

Dropping a coefficient sign is one of the most common causes of incorrect roots.

Missing terms still have coefficients

Consider:

x² − 16 = 0

There is no visible:

x

term.

So:

a = 1

b = 0

c = −16

Likewise:

3x² + 6x = 0

has:

a = 3

b = 6

c = 0

Use zero for a missing term so the equation remains in standard form.

The discriminant comes first

The expression under the square root is called the:

discriminant

and is written:

D = b² − 4ac

Before evaluating the roots, the sign of the discriminant tells you what kind of solutions to expect.

DiscriminantRoot type
D > 0Two distinct real roots
D = 0One repeated real root
D < 0Two complex-conjugate roots

This makes the discriminant a useful diagnostic even before the full formula is evaluated.

Worked example with two real roots

Solve:

x² − 5x + 6 = 0

Identify:

a = 1

b = −5

c = 6

Calculate the discriminant:

D = b² − 4ac

= (−5)² − 4(1)(6)

= 25 − 24

= 1

Since:

D > 0

there are two distinct real roots.

Now use the formula:

x = (−(−5) ± √1) / 2

So:

x = (5 ± 1) / 2

First root:

x₁ = (5 + 1)/2 = 3

Second root:

x₂ = (5 − 1)/2 = 2

Therefore:

x = 2 and x = 3

Check the roots by substitution

For:

x² − 5x + 6

substitute:

x = 2

Then:

2² − 5(2) + 6

= 4 − 10 + 6

= 0

Now substitute:

x = 3

Then:

3² − 5(3) + 6

= 9 − 15 + 6

= 0

Both roots satisfy the equation.

Factorization confirms the same example

The polynomial:

x² − 5x + 6

factors as:

(x − 2)(x − 3)

Set each factor equal to zero:

x − 2 = 0

or:

x − 3 = 0

So:

x = 2

or:

x = 3

The quadratic formula and factorization agree.

Example with one repeated root

Solve:

x² − 6x + 9 = 0

Here:

a = 1

b = −6

c = 9

Discriminant:

D = (−6)² − 4(1)(9)

= 36 − 36

= 0

Since:

D = 0

both formula branches produce the same root.

Use:

x = −b/(2a)

So:

x = 6/2

x = 3

The equation has one repeated real root:

x = 3

A repeated root has multiplicity two

Although the graph has only one x-intercept, the polynomial has two equal algebraic roots.

For:

x² − 6x + 9

factor:

(x − 3)²

So:

x = 3

occurs twice.

This is called a:

double root

or:

root of multiplicity 2

Example with complex roots

Solve:

x² + 4x + 13 = 0

Here:

a = 1

b = 4

c = 13

Discriminant:

D = 4² − 4(1)(13)

= 16 − 52

= −36

Since:

D < 0

the roots are complex.

Use:

√(−36) = 6i

where:

i = √(−1)

Then:

x = (−4 ± 6i)/2

So:

x = −2 ± 3i

The two roots are:

−2 + 3i

and:

−2 − 3i

A negative discriminant does not mean no solution

It means:

no real solution

but the quadratic still has solutions in the complex number system.

For real coefficients, complex roots occur as conjugate pairs.

So if one root is:

p + qi

the other is:

p − qi

What the discriminant says about the parabola

For:

y = ax² + bx + c

the roots correspond to x-values where:

y = 0

These are the x-intercepts of the graph.

If:

D > 0

the parabola crosses the x-axis at two points.

If:

D = 0

the parabola touches the x-axis at one point.

If:

D < 0

the parabola has no real x-intercepts.

The quadratic still exists; it simply does not cross the real x-axis.

The sign of a determines whether the parabola opens up or down

In:

y = ax² + bx + c

if:

a > 0

the parabola opens upward.

If:

a < 0

the parabola opens downward.

This does not by itself determine how many roots exist.

The discriminant controls the number of real x-intercepts.

Standard form is essential

The quadratic formula expects:

ax² + bx + c = 0

Suppose the equation is:

x² + 3x = 10

Do not enter:

a = 1, b = 3, c = 10

directly.

First move everything to one side:

x² + 3x − 10 = 0

Now:

a = 1

b = 3

c = −10

The roots are then calculated from the correct standard form.

Moving terms changes their signs

Consider:

2x² = 7x + 4

Move all terms to one side:

2x² − 7x − 4 = 0

So:

a = 2

b = −7

c = −4

Careless sign changes during this step can produce completely different roots.

Parentheses in the formula matter

The quadratic formula is:

x = (−b ± √D)/(2a)

The entire numerator:

−b ± √D

is divided by:

2a

It is incorrect to calculate:

−b ± √D/(2a)

because that divides only the square-root term.

Use parentheses around:

the entire numerator

and:

the entire denominator

when entering the formula manually.

Example showing the denominator clearly

Suppose:

a = 2

b = 3

c = −2

Then:

D = 3² − 4(2)(−2)

= 9 + 16

= 25

The formula is:

x = (−3 ± 5)/(2 × 2)

So the denominator is:

4

First root:

x = (−3 + 5)/4 = 2/4 = 1/2

Second root:

x = (−3 − 5)/4 = −8/4 = −2

The roots are:

1/2 and −2

Do not forget the ± branch

If you calculate only:

−b + √D

you may find just one root.

The formula contains:

plus or minus

because taking a square root introduces two branches.

For:

x² = 9

the roots are:

x = ±3

not only:

x = 3

The same principle appears inside the quadratic formula.

The formula works even when factorization is difficult

Some quadratics factor cleanly:

x² − 5x + 6

Others do not have convenient integer factors.

For example:

x² − 2x − 1 = 0

Here:

a = 1

b = −2

c = −1

Discriminant:

D = 4 + 4 = 8

So:

x = (2 ± √8)/2

Since:

√8 = 2√2

then:

x = (2 ± 2√2)/2

Therefore:

x = 1 ± √2

This exact radical form is often more useful than immediately converting to decimals.

Exact radical form preserves precision

For:

x = 1 + √2

a decimal approximation is:

x ≈ 2.41421356…

If you round that immediately and use it in later calculations, some precision is lost.

Keeping:

1 + √2

preserves the exact root.

Use decimal approximations when the task requires numerical values.

Irrational roots can still be real

A root does not need to be an integer or rational number to be real.

For:

x² − 2 = 0

the roots are:

x = ±√2

These are irrational but real.

The discriminant is:

D = 8

which is positive.

So there are two distinct real roots even though neither is rational.

Perfect-square discriminants often produce rational roots

If the discriminant is a perfect square and the coefficients are rational, the roots are often rational.

For:

x² − 5x + 6

the discriminant is:

1

which is a perfect square.

The roots:

2 and 3

are rational.

For:

x² − 2x − 1

the discriminant:

8

is not a perfect square, so the roots contain a radical.

Vieta’s relations provide a useful check

If the roots are:

r₁

and:

r₂

then:

r₁ + r₂ = −b/a

and:

r₁r₂ = c/a

For:

x² − 5x + 6 = 0

the roots are:

2 and 3

Check the sum:

2 + 3 = 5

and:

−b/a = −(−5)/1 = 5

Check the product:

2 × 3 = 6

and:

c/a = 6/1 = 6

Both checks agree.

Vieta’s relations also work with complex roots

Consider:

x² + 4x + 13 = 0

Roots:

−2 + 3i

and:

−2 − 3i

Sum:

−4

which matches:

−b/a = −4

Product:

(−2 + 3i)(−2 − 3i)

Using conjugates:

4 + 9 = 13

which matches:

c/a = 13

Roots connect directly to factors

If the roots are:

r₁

and:

r₂

then the quadratic can be written:

a(x − r₁)(x − r₂)

For roots:

2

and:

3

with:

a = 1

the polynomial is:

(x − 2)(x − 3)

Expand:

x² − 5x + 6

So the roots, factors, and x-intercepts describe the same underlying quadratic structure.

If the leading coefficient is not 1

Suppose:

2x² − 5x − 3 = 0

If the roots are:

3

and:

−1/2

then the factorization can be written:

2(x − 3)(x + 1/2)

or more naturally:

(2x + 1)(x − 3)

Expanding:

2x² − 5x − 3

The leading coefficient must be preserved.

Completing the square leads to the quadratic formula

The formula is not arbitrary.

Start with:

ax² + bx + c = 0

with:

a ≠ 0

Divide by:

a

to get:

x² + (b/a)x + c/a = 0

Move the constant:

x² + (b/a)x = −c/a

Complete the square:

x² + (b/a)x + b²/(4a²) = −c/a + b²/(4a²)

Then:

(x + b/(2a))² = (b² − 4ac)/(4a²)

Take both square-root branches:

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

Finally:

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

This derivation explains both the discriminant and the ± symbol.

Why a cannot equal zero

If:

a = 0

then:

ax²

disappears.

The equation becomes:

bx + c = 0

which is linear rather than quadratic.

For example:

0x² + 4x − 8 = 0

simplifies to:

4x − 8 = 0

So:

x = 2

The quadratic formula should not be applied because its denominator:

2a

would equal zero.

Decimal coefficients are allowed

Consider:

0.5x² − 1.5x + 1 = 0

The calculator can use:

a = 0.5

b = −1.5

c = 1

You may also multiply the entire equation by 2:

x² − 3x + 2 = 0

The roots remain the same because multiplying an equation by a nonzero constant does not change its solutions.

The roots are:

1 and 2

Fractions can be cleared before solving

Suppose:

(1/2)x² + (3/4)x − 1 = 0

Multiply every term by:

4

to obtain:

2x² + 3x − 4 = 0

This can make hand calculations cleaner while preserving the same roots.

The calculator can also work directly with decimal or fraction-equivalent coefficient values if supported.

Rounded coefficients produce roots for the rounded equation

Suppose the true coefficient is:

1.234567

but you enter:

1.23

The calculator solves the equation containing:

1.23

It does not know the discarded digits.

If coefficients come from measurements or fitted data, the calculated roots inherit that input uncertainty.

More displayed root digits do not restore missing coefficient precision.

Repeated roots can be sensitive to coefficient precision

A quadratic with:

D = 0

has an exact repeated root.

But if rounded coefficients produce a discriminant that is only:

very close to zero

the calculator may show two very close roots instead.

This does not necessarily indicate an error.

It can reflect the precision of the entered coefficients.

Near-zero discriminants deserve careful interpretation

Suppose:

D = 0.00000001

Mathematically this is positive, so there are two distinct real roots.

But they may be extremely close together.

If the coefficients themselves are approximate, the distinction between:

D = 0

and:

D slightly above or below 0

may not be physically meaningful.

Preserve input precision and context.

Numerical stability can matter for extreme coefficients

For ordinary coursework, directly applying the quadratic formula is normally sufficient.

In numerical computing, however, one branch of the formula can suffer from loss of precision when:

b²

is very large relative to:

4ac

and the subtraction combines nearly equal numbers.

Specialized numerical methods may reformulate one root calculation and recover the second using:

r₁r₂ = c/a

This is primarily a numerical-computing concern rather than an ordinary algebra issue.

Exact arithmetic can avoid some numerical loss

When coefficients are small integers or exact fractions, keeping the discriminant and square root in exact form can avoid unnecessary decimal rounding.

For example:

x = (5 ± √13)/2

is exact.

A calculator may also show decimal approximations, but the radical form preserves the full mathematical result.

The roots identify x-intercepts only in the real case

For a real quadratic function:

y = ax² + bx + c

real roots indicate x-values where the graph intersects:

y = 0

Complex roots do not correspond to ordinary real x-axis intercepts.

They remain valid algebraic solutions to the polynomial equation.

The vertex is related to the coefficients

Although the quadratic formula finds roots, the axis of symmetry is:

x = −b/(2a)

Notice that this is also the midpoint of the two roots when both are real.

Using the formula:

r₁ + r₂ = −b/a

their average is:

(r₁ + r₂)/2 = −b/(2a)

This connects the roots with the parabola’s symmetry.

A repeated root occurs at the vertex

When:

D = 0

the root is:

x = −b/(2a)

That is exactly the x-coordinate of the vertex.

The parabola touches the x-axis at its vertex rather than crossing it.

Word problems can add restrictions

A quadratic equation may produce two mathematically valid roots while only one makes sense in the original problem.

For example, if the unknown represents:

  • time;
  • length;
  • number of items;
  • physical distance;
  • or another nonnegative quantity,

a negative root may need to be rejected in context.

The calculator solves the equation.

It does not automatically decide which root is physically meaningful.

Extraneous context can matter even when the roots are correct

Suppose a projectile-height model gives two times when height equals zero.

One root may represent the launch instant.

The other may represent landing.

Both are mathematically correct, but they have different interpretations.

Always return the roots to the original problem before choosing a final answer.

Common quadratic formula mistakes to avoid

Forgetting to move everything to one side

The formula requires:

ax² + bx + c = 0

Dropping a negative coefficient sign

Enter coefficients with their actual signs.

Forgetting the ± symbol

Two branches are required unless the discriminant is zero.

Dividing only the square-root term by 2a

The entire numerator must be divided by:

2a

Squaring b incorrectly

If:

b = −5

then:

b² = 25

Mishandling −4ac

Negative coefficients can change the sign of this term.

Treating a negative discriminant as no solution

It means no real roots, but complex roots still exist.

Applying the formula when a = 0

That equation is linear.

Rounding too early

Keep the discriminant and roots exact or at higher precision until the final reporting step.

Quick examples by discriminant type

EquationDiscriminantRoots
x² − 5x + 6 = 012, 3
x² − 6x + 9 = 003, 3
x² + 4x + 13 = 0−36−2 ± 3i

This makes the relationship between discriminant sign and root type easy to see.

How to check any returned root

Suppose the calculator gives:

r

Substitute it into:

ar² + br + c

If:

r

is exact, the result should be:

0

If the root is shown as a rounded decimal, the result may be a very small number close to zero instead.

That difference can come from rounding.

Use Vieta’s relations as a second check

For roots:

r₁ and r₂

verify:

r₁ + r₂ ≈ −b/a

and:

r₁r₂ ≈ c/a

For exact roots, these relationships hold exactly.

For rounded decimal roots, small differences can appear.

When to use another calculator

Use the Basic Calculator for straightforward arithmetic while checking coefficient calculations.

Use the Scientific Calculator when manually evaluating square roots, powers, or complex numerical expressions.

For division processes and decimal expansions, use the Long Division Calculator.

FAQ

What is the quadratic formula?

For:

ax² + bx + c = 0

with:

a ≠ 0

the roots are:

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

What is the discriminant?

The discriminant is:

D = b² − 4ac

Its sign indicates the type of roots.

What happens when the discriminant is positive?

There are two distinct real roots.

What happens when the discriminant is zero?

There is one repeated real root:

x = −b/(2a)

What happens when the discriminant is negative?

There are two complex-conjugate roots and no real x-intercepts.

What happens when a = 0?

The equation is not quadratic.

It becomes a linear equation if:

b ≠ 0

Why are there two answers?

The:

±

symbol represents both the positive and negative square-root branches.

Can the calculator solve equations with decimal coefficients?

Yes, provided the entered values represent the intended coefficients.

Rounded coefficients produce roots for the rounded equation.

Can the calculator show complex roots?

Yes, when complex-number output is supported.

A negative discriminant introduces:

i = √(−1)

Can a quadratic have only one real root?

Yes.

When:

D = 0

the two algebraic roots are equal, producing one real x-intercept.

How do I check the roots?

Substitute each root into:

ax² + bx + c

The result should be zero or very close to zero if decimal roots were rounded.

What are Vieta’s relations?

For roots:

r₁ and r₂

the sum is:

r₁ + r₂ = −b/a

and the product is:

r₁r₂ = c/a

Does the calculator tell me which root is meaningful in a word problem?

No.

Both roots solve the quadratic equation, but the original context may impose restrictions such as positive length or nonnegative time.

Is factoring better than the quadratic formula?

Factoring can be faster when the polynomial factors easily.

The quadratic formula works for every quadratic equation with:

a ≠ 0

and can handle irrational and complex roots.

Mathematics reference

For additional explanations and worked examples involving quadratic equations, factoring, roots, and algebra, see:

OpenStax — Prealgebra 2e

Check the discriminant before interpreting the roots

A Quadratic Formula Calculator does more than substitute three coefficients into one formula.

The discriminant:

b² − 4ac

first tells you what kind of roots the equation can have.

A positive value gives two distinct real roots.

Zero gives one repeated real root.

A negative value produces a complex-conjugate pair.

After calculating the roots, substitute them back into the original equation or use Vieta’s relations as a check.

And when the equation comes from a real-world model, return to the original context before deciding which mathematically valid root should be used.

Share on: