Skip to main content

Algebra 1-2Free, no account needed

Quadratic equation calculator

Solve ax^2 + bx + c = 0 with an exact discriminant, rational or radical roots, and complex conjugates when needed.

All calculators

Try your problem

Zero switches to a linear or constant equation.
Include the sign; for -3x enter -3.
All terms belong on the left of = 0. Paste syntax: quadratic(1,-3,2).

Your calculations stay in this browser. No input history is saved.

Supported inputs and limits

Each coefficient has magnitude at most 10,000 and reduced numerator/denominator at most 1,000,000; the base engine number syntax applies. Zero a is handled as linear or constant. Radicals remain exact, possibly unsimplified; irrational decimal estimates are labeled approximately. Paste at most 200 characters: quadratic(1,-3,2). Pasted numbers are signed integers, finite decimals or integer fractions, not expressions.

Understand the method

A parabola y = x^2 - 3x + 2 crosses the x-axis at 1 and 2; a discriminant panel shows 9 - 8 = 1.

A quadratic equation has an x^2 term with a nonzero coefficient. Moving all terms to one side gives ax^2 + bx + c = 0. Its roots are the x-values where the corresponding parabola meets the horizontal axis. The formula x = (-b +/- sqrt(b^2 - 4ac))/(2a) works for every nonzero a.

The discriminant D = b^2 - 4ac classifies the roots before you calculate them. Positive D gives two distinct real roots, zero D gives a repeated real root, and negative D gives two non-real complex conjugates. A rational discriminant with a rational square root gives rational roots. If a is zero, use a linear or constant equation instead of dividing by 2a.

Worked examples

Read the reasoning, or load an example into the calculator.

Two rational roots

D = (-3)^2 - 4(1)(2) = 1. The formula gives (3 +/- 1)/2, so x = 2 or 1.

Two irrational roots

x^2 - 2 = 0 has D = 8. Its exact roots are (0 +/- sqrt(8))/2, equivalently +/- sqrt(2).

Complex conjugates

x^2 + 1 = 0 gives D = -4. Using i^2 = -1, its roots are i and -i.

Try it without the calculator

Three questions for practice, not a graded school assessment. Your answers stay on this page and are not saved.

1. What is the discriminant of x^2 - 4x + 4 = 0?
2. What are the roots of x^2 - 9 = 0?
3. What does a negative discriminant mean for real-coefficient quadratics?

Original Testinar learning content. This local preview is awaiting final review before publication.

Page UP