Home / Algebra Calculator

Algebra Calculator

Solve a linear or quadratic equation and see the discriminant behind a quadratic's roots.

Enter your equation

Solution

Solution -
Detail -
Also -

Results computed in your browser.

What this actually solves

In linear mode, the calculator isolates x by rearranging ax + b = c into x = (c minus b) divided by a. In quadratic mode, it runs the standard quadratic formula, x equals negative b plus or minus the square root of b squared minus 4ac, all divided by 2a, and reports whether the two roots are real, repeated, or complex.

Reading the discriminant

The discriminant, b squared minus 4ac, is the part of the quadratic formula under the square root sign, and its sign alone tells you what kind of roots to expect before you even finish the calculation:

DiscriminantWhat it means
PositiveTwo distinct real roots
Exactly zeroOne repeated real root
NegativeTwo complex roots, no real solution

This is a mathematical identity, not a convention that varies by school, so this table will not change between the editions of any textbook.

Worked example

With a = 2, b = 3, c = 7 in quadratic mode: the discriminant is 3² minus 4 × 2 × 7, which is 9 minus 56, or negative 47. Since that is negative, the roots are complex: x equals negative 3 plus or minus the square root of 47, all over 4, which the calculator reports as approximately -0.750 plus or minus 1.714i. Switch to linear mode with the same numbers and 2x + 3 = 7 solves cleanly to x = 2, since (7 minus 3) divided by 2 is 2.

Good to know

FAQs

Why does setting a to 0 in linear mode sometimes say 'no solution'?

If a is 0, the equation collapses to just b = c, which either isn't dividing by anything (no x term left to solve for), or is a true statement for every x. The calculator checks whether b equals c: if they match, every x works; if they don't, no x satisfies the equation.

What does it mean when the quadratic result shows an imaginary number?

A negative discriminant means the parabola never crosses the x-axis, so there is no real number solution. The calculator still reports the complex roots, written with an i for the imaginary unit, which is the standard way to express them in algebra.

Can I solve a quadratic that's missing the bx term?

Yes, just enter 0 for b. The quadratic formula and discriminant both handle a zero coefficient without any special steps.

Why do two different-looking quadratics sometimes have the same discriminant?

The discriminant only depends on the relationship between a, b, and c, not on the specific size of the numbers. Scaling every coefficient of an equation by the same factor changes the discriminant's value but not whether it's positive, zero, or negative, so the root count stays the same.