Free Algebra Solver
Discriminant

Discriminant Calculator

Enter a quadratic. The calculator works out D = b² − 4ac and tells you how many real roots it has and whether they are rational.

Interpreted as: 2x^2 - 4x + 1 = 0 (Discriminant) Ready
Examples
Solution

Worked example: 2x^2 - 4x + 1 = 0

Worked example. Edit the problem above and press Discriminant to solve your own.

Problem2x^2 - 4x + 1 = 0
  1. Write the quadratic in standard form

    Arrange the terms as ax² + bx + c and read the coefficients.

    2x² − 4x + 1 = 0
    Standard form
    a = 2, b = −4, c = 1
    Coefficients

    The discriminant only depends on a, b, and c.

  2. Substitute into D = b² − 4ac

    Square b, subtract 4 times a times c.

    D = (−4)² − 4(2)(1)
    Substitute
    D = 16 − 8
    Evaluate each part
    D = 8
    Discriminant

    This is the expression under the square root in the quadratic formula.

  3. Interpret the sign of D

    D > 0 means two real roots, D = 0 means one repeated root, and D < 0 means two complex roots. A perfect-square D means the roots are rational.

    D > 0, not a perfect square
    Sign test
    Roots: x = (2 − √2)/2 or x = (2 + √2)/2
    Quadratic formula, for reference

    The roots are (−b ± √D)/2a, so √D decides whether they are real and rational.

AnswerD = 8 (two distinct real irrational roots)

Discriminant guide

How to use the discriminant calculator

This discriminant calculator finds D = b² − 4ac for any quadratic and tells you the nature of its roots: real or complex, repeated or distinct, rational or irrational.

What is the discriminant?

The discriminant of ax² + bx + c = 0 is D = b² − 4ac, the expression under the square root in the quadratic formula. A positive D means two real roots. D = 0 means one repeated root. A negative D means two complex roots and no real ones.

How do you find the discriminant?

Put the equation in standard form, read a, b, and c, and work out b² − 4ac. For 2x² − 4x + 1 = 0 the discriminant is 8.

Discriminant
D = b² − 4ac
Coefficients
a = 2, b = −4, c = 1
Substitute
D = (−4)² − 4(2)(1)
Evaluate
D = 16 − 8 = 8

Since 8 is positive and not a perfect square, the equation has two different irrational roots. The quadratic formula gives them as x = (2 − √2)/2 and x = (2 + √2)/2.

What does the discriminant tell you?

It tells you how many roots a quadratic has and what kind they are, without solving it. Graphically, it tells you how many times the parabola crosses the x-axis.

That makes it a good first step on a test. If a question only asks how many real solutions there are, the discriminant answers it in one line and you can skip the rest of the quadratic formula.

Value of DNature of rootsGraph
D > 0, perfect squareTwo different rational rootsCrosses the x-axis twice
D > 0, not a perfect squareTwo different irrational rootsCrosses the x-axis twice
D = 0One repeated real rootTouches the x-axis once
D < 0Two complex conjugate rootsNever meets the x-axis

Why does a perfect-square discriminant mean rational roots?

Because √D comes out as a whole number, so the quadratic formula only adds, subtracts, and divides integers. No radical survives.

Take 2x² + 3x − 2 = 0. Here D = 3² − 4(2)(−2) = 9 + 16 = 25, and √25 = 5. The roots are (−3 ± 5)/4, which gives x = 1/2 and x = −2. A perfect-square discriminant (with whole-number coefficients) is also a sign that the quadratic will factor: 2x² + 3x − 2 = (2x − 1)(x + 2).

What happens when the discriminant is zero or negative?

A zero discriminant means the ± part adds nothing, so both roots are the same. For x² − 6x + 9 = 0, D = 36 − 36 = 0 and the only root is x = 3. The parabola just touches the x-axis at its vertex.

A negative discriminant means the square root of a negative number, so there are no real roots. For x² + 2x + 5 = 0, D = 4 − 20 = −16. The roots are complex: x = −1 ± 2i.

On a graph, y = x² + 2x + 5 sits entirely above the x-axis, with its lowest point at (−1, 4). There is nowhere for it to cross, which matches the missing real roots.

How do you use the discriminant to describe the nature of roots?

Find D, then check two things: its sign, and whether it is a perfect square. Those two checks answer every "describe the nature of the roots" question.

  1. Write the equation as ax² + bx + c = 0.
  2. Compute D = b² − 4ac, using brackets for negative numbers.
  3. If D < 0, the roots are complex. Stop here.
  4. If D = 0, there is one repeated rational root.
  5. If D > 0, check for a perfect square: yes means rational, no means irrational.

The rational or irrational check assumes a, b, and c are whole numbers or fractions. With a coefficient like √2, a perfect-square discriminant no longer guarantees rational roots.

Try it on 2x² − 4x + 1 = 0. D = 8, which is positive, so the roots are real. 8 is not a perfect square, so they are irrational. That full description, "two distinct real irrational roots", is exactly what the calculator prints.

What mistakes do people make finding the discriminant?

Squaring a negative b without brackets is the top error. With b = −4, b² is 16, not −16. Writing (−4)² stops this.

Another is reading c from an equation that is not in standard form. In x² = 3x − 2, c is +2 after you move everything over, not −2. A third is thinking a negative discriminant means "no solution" in every setting. It means no real solution; complex roots still exist.

Why does b² − 4ac decide the roots?

Because it is the number under the square root in the quadratic formula, x = (−b ± √(b² − 4ac)) / 2a. Everything else in the formula is ordinary arithmetic, so the square root is the only place things can change.

A positive number has two square roots, so ± gives two answers. Zero has one square root, so + and − land on the same answer. A negative number has no real square root, which pushes the roots into complex numbers.

How do you use the discriminant to find an unknown coefficient?

Set the discriminant equal to what the question asks for and solve. "Find k so the equation has one repeated root" means set D = 0.

For x² + kx + 9 = 0, D = k² − 36. Setting k² − 36 = 0 gives k = 6 or k = −6. Check one: x² + 6x + 9 = (x + 3)², which has the single root x = −3. For "two real roots" you would solve k² − 36 > 0 instead, and the inequality solver can handle that step.

Frequently asked questions

Short answers to the questions people ask most about this topic.

What is the discriminant formula?

D = b² − 4ac, where a, b, and c are the coefficients of ax² + bx + c = 0. It is the part under the square root in the quadratic formula.

Can the discriminant be a fraction or a decimal?

Yes, if the coefficients are fractions or decimals. Its sign still tells you the number of real roots in the same way.

What if the discriminant is 1?

1 is a perfect square, so there are two different rational roots. For example, x² − 5x + 6 = 0 has D = 1 and roots 2 and 3.

Does the discriminant tell me the actual roots?

No, only how many and what kind. To get the values, use the quadratic formula calculator or factor the equation.

What does a discriminant of 0 look like on a graph?

The vertex of the parabola sits exactly on the x-axis. The curve touches the axis once and turns back.

Is there a discriminant for cubic equations?

Yes, but it is a much longer formula. This calculator handles quadratics. For cubics, the zeros calculator finds the roots directly.

Why is it called the discriminant?

It discriminates, or tells apart, the different kinds of roots. One number sorts every quadratic into two real roots, one repeated root, or complex roots.

Math keypad

Discriminant mode

Use the keypad below or tap the expression to use your phone keyboard.

Keyboard tips

Ctrl + Enter
Run the selected operation
^
Enter a power, such as x^2
sqrt(
Calculate an exact or simplified square root
a:b
Separate quantities in a ratio
12, 18
Separate integers in an LCM and GCD calculation
@ x =
Assign x when evaluating an expression
y =
Enter a polynomial function to graph
|
Wrap an absolute-value expression