Discriminant Calculator

The discriminant of a quadratic ax² + bx + c is b² − 4ac, the part of the quadratic formula that sits under the square root. Its sign decides how many real roots there are before any root is worked out: positive gives two, zero gives one, negative gives none. Everything else in the formula is unaffe...

A positive discriminant is two cases, not one. If it is a perfect square the roots are rational and the quadratic factorises; if it is not, the roots are a conjugate pair of surds that no rational factorisation will ever produce. Among quadratics with integer coefficients from −10 to 10 that have real roots at all, only 24.6% have a perfect-square discriminant — so most solvable quadratics cannot be factorised, and a decimal answer hides which kind you are looking at. If a is zero there is no quadratic and no discriminant, however willingly b² − 4ac evaluates.

THE COEFFICIENTS

For ax² + bx + c = 0. Whole numbers, decimals and fractions all work.

A

B

C

x² − 3x + 2 = 0

D = 1 · TWO RATIONAL ROOTS

x = 2, x = 1

2 and 1

Two real roots, and the discriminant is a perfect square, so both are rational and the quadratic factorises with rational coefficients.

FACTORISED

1(x − 2)(x − 1)

x = 2 → 0

x = 1 → 0

DISCRIMINANT

1

positive — two real roots

A PERFECT SQUARE

yes

so the roots are rational

FACTORISES

yes

over the rationals

ROOTS PUT BACK

2 of 2

each gives exactly zero

WHAT IS HAPPENING

1Work out b² − 4ac

(-3)² − 4(1)(2) = 9 − 8 = 1

This single number decides how many real roots there are, before any root is calculated. It is the part of the quadratic formula that sits under the square root sign, and everything else in the formula is unaffected by its sign.

2Positive, and a perfect square

√1 = 1 → x = 2 and x = 1

A positive discriminant that is the square of a rational number is the case where the roots come out rational — and that is precisely when the quadratic can be factorised with rational coefficients. Any other positive value gives roots that no such factorisation reaches.

3Where the parabola sits

vertex at (3/2, -1/4), opening upward

With a positive the parabola opens upward, so the vertex is its lowest point. A vertex below the axis means two crossings, on the axis means one, and above it means none — which is the discriminant restated in geometry.

THE PARABOLA AND THE AXISit crosses the axis twice, and those two crossings are the roots032.3-0.59crossings marked; the open circle is the vertex at (1.5, -0.25)

Why the sign is the whole story. The quadratic formula reads (−b ± √D) ÷ 2a, and everything outside the square root is the same whatever D turns out to be. A positive D adds and subtracts a real amount, giving two crossings. A zero D adds and subtracts nothing, so the two roots land on the same point. A negative D asks for the square root of a negative number, and the parabola never reaches the axis at all. Nothing else in the formula is affected.

WHAT THE DISCRIMINANT COMPARESb² against 4ac — which is larger decides the sign, and the sign decides everything94ac8D1b² is the larger, so the difference is positive

Exact fractions throughout · rational roots are substituted back into the equation as written

Created with❤️byeaglecalculator.com

HOW TO USE

  1. 1

    Enter a, b and c for ax² + bx + c = 0. Whole numbers, decimals and fractions such as 3/4 all work, and the equation is written back to you so you can check it is the one you meant.

  2. 2

    Read the discriminant and its sign. Positive means two real roots, zero means one repeated root, negative means none — and that is settled before any root is calculated.

  3. 3

    Check whether it is a perfect square. That is the difference between rational roots you can factorise and irrational ones you cannot, and it is the distinction a decimal answer conceals.

  4. 4

    Look at the parabola. Two crossings, one touch, or a curve that misses the axis entirely — the same three cases as the sign, drawn rather than asserted.

WORKED EXAMPLE

Take x² − 3x + 2 = 0. The discriminant is (−3)² − 4(1)(2) = 9 − 8 = 1. Positive, so there are two real roots. It is also a perfect square, so those roots are rational: (3 ± 1) ÷ 2 gives 2 and 1. The quadratic factorises as (x − 2)(x − 1), and substituting either root back gives exactly zero. The parabola crosses the axis twice. Now 2x² − 4x + 1 = 0. The discriminant is 16 − 8 = 8. Positive again, so two real roots again — but 8 is not a perfect square. The roots are (4 ± √8) ÷ 4, which simplifies to 1 ± √2 ÷ 2, roughly 1.707 and 0.293. They are perfectly exact and perfectly real, and no factorisation with rational coefficients produces them. Both quadratics have positive discriminants and only one of them can be factorised, which is the distinction worth carrying. Now x² + 2x + 1 = 0. The discriminant is 4 − 4 = 0. The ± in the formula is adding and subtracting nothing, so the two roots collapse onto one: x = −1. The quadratic is (x + 1)², and the parabola touches the axis at its vertex without crossing. Now x² + 2x + 5 = 0. The discriminant is 4 − 20 = −16. Negative, so no real roots at all. The formula asks for the square root of a negative number, and the two solutions are the complex conjugates −1 ± 2i. The parabola sits entirely above the axis. Nothing has gone wrong: the equation has no real solution, and that is the answer. Finally the case that catches calculators. Take x² + 200000000x + 10000000000000001. Here b² is 4 × 10¹⁶ and 4ac is 4 × 10¹⁶ + 4, so the discriminant is exactly −4 and there are no real roots. Computed in double precision the coefficient c cannot even be held exactly, and the discriminant comes out as 0 — one repeated root, which is the wrong answer to the wrong question. The sign is the entire classification, and near zero it is the first thing floating point loses.

REFERENCE RULES

RuleWhat it saysWhy
The discriminantD = b² − 4acThe part of the quadratic formula under the square root. Its sign decides everything.
Positivetwo distinct real rootsThe parabola crosses the x-axis twice.
Zeroone repeated rootThe parabola touches the axis at its vertex and does not cross.
Negativeno real rootsThe parabola misses the axis entirely. Two complex conjugate solutions.
Positive and a squarerational rootsOnly then does the quadratic factorise with rational coefficients.
Positive, not a squarea conjugate pair of surdsReal and exact, but no rational factorisation reaches them.
If a = 0there is no discriminantIt is not a quadratic. b² − 4ac still evaluates, and means nothing.
The roots(−b ± √D) ÷ 2aThe ± is the whole reason two roots exist, and D decides what it adds.
The vertexx = −b ÷ 2aHalfway between the roots when they exist, whatever the discriminant.
Sum of the roots−b ÷ aTrue even when the roots are complex. The imaginary parts cancel.
Product of the rootsc ÷ aAlso true for complex roots, since conjugates multiply to a real number.
A perfect square trinomialD = 0x² + 2x + 1 and its relatives. The factorisation is a single squared bracket.
Scaling the equationchanges D, not the rootsDoubling a, b and c multiplies D by four and leaves every root where it was.
Near zerothe sign is fragileWhen b² and 4ac are close, a floating-point subtraction can lose the sign entirely.

FREQUENTLY ASKED QUESTIONS

How many real roots a quadratic has, before you calculate any of them. It is b² − 4ac, the expression under the square root in the quadratic formula. Positive means the ± adds and subtracts a real amount, so there are two distinct roots. Zero means it adds and subtracts nothing, so the two roots coincide. Negative means the square root has no real value, so there are no real roots at all.

  • ·b² − 4ac, the part under the square root
  • ·Positive: two distinct real roots
  • ·Zero: one repeated root
  • ·Negative: no real roots

RELATED CALCULATORS

MORE ALGEBRA CALCULATORS

Was this calculator helpful?

Last updated: August 6, 2026 · Exact fractions throughout, never floating point · A positive discriminant is two cases, depending on whether it is a perfect square.