Quadratic Equation Calculator

Discriminant (b² − 4ac)—
Root 1 (x₁)—
Root 2 (x₂)—
Nature of roots—

How Quadratic Equation Calculator is calculated: Discriminant = b² − 4ac. Roots = (−b ± √(b² − 4ac)) ÷ 2a. A positive discriminant gives two real roots, zero gives one repeated root, and a negative one gives complex roots.

What is a quadratic equation?

A quadratic equation is an equation with an x squared term: a times x squared plus b times x plus c equals 0, where a is not zero. The default on this page is x squared minus 3x plus 2 equals 0, and its roots are 2 and 1. Put 2 into the equation and you get 4 minus 6 plus 2, which is 0. Put 1 in and you get 1 minus 3 plus 2, which is also 0.

The roots are the values of x that make the equation true, and on a graph they are the points where the parabola crosses the x-axis. A quadratic can cross the axis twice, touch it once, or miss it entirely, and the three cases match the three kinds of roots this calculator reports: two distinct real roots, one repeated root, or complex roots. Every quadratic equation graphs as a parabola — our parabola calculator finds its vertex, axis and discriminant.

This calculator takes a, b and c and gives you the discriminant, both roots, and the nature of the roots. The result updates live as you type. Nothing is uploaded and there is no sign-up, so you can check homework or test a guess in seconds.

How a quadratic equation calculator works

The calculator uses the quadratic formula: x equals minus b plus or minus the square root of the discriminant, all divided by 2a, where the discriminant is b squared minus 4ac. For the default, a is 1, b is minus 3 and c is 2, so the discriminant is 9 minus 8, which is 1. The square root of 1 is 1, so the roots are (3 + 1) divided by 2, which is 2, and (3 − 1) divided by 2, which is 1.

The discriminant decides the nature of the roots before any root is computed. If it is positive, the square root is real and there are two distinct real roots. If it is zero, the plus-or-minus makes no difference and there is one repeated root. If it is negative, the square root is imaginary and the roots are complex, written with i.

If a is zero, the equation is not quadratic at all — the x squared term vanishes and what remains is a linear equation. The calculator says so plainly instead of dividing by zero: the discriminant and roots show dashes and the nature row reads Not a quadratic equation. The linear equation calculator solves that case.

The discriminant, explained

The discriminant, b squared minus 4ac, is the part of the formula under the square root, and it carries all the information about the roots. Its sign tells you how many real roots there are, and its size tells you how far apart they sit. A large positive discriminant means two roots far apart; a small positive one means two roots close together.

For the default equation the discriminant is 1, which is small and positive, so the roots 2 and 1 sit one unit apart. For x squared minus 4 equals 0, the discriminant is 16, and the roots are 2 and minus 2, four units apart. For x squared plus 2x plus 1 equals 0, the discriminant is 0, and the single repeated root is minus 1.

The discriminant also tells you whether the roots are rational. If the discriminant is a perfect square, like 1, 4, 9 or 16, the roots come out as clean fractions or whole numbers. If it is not a perfect square, like 2 or 5, the roots are irrational, and the calculator rounds them to two decimals.

A worked example: x² − 3x + 2, x² − 4, and x² + 2x + 1

The default on this page is x squared minus 3x plus 2 equals 0. Here a is 1, b is minus 3 and c is 2. The discriminant is 9 minus 8, which is 1. The roots are (3 + 1) divided by 2, which is 2, and (3 − 1) divided by 2, which is 1. The nature is two distinct real roots. Factorising gives the same answer: (x − 2)(x − 1) equals 0.

Try a is 1, b is 0 and c is minus 4, which is x squared minus 4 equals 0. The discriminant is 0 minus 4 times 1 times minus 4, which is 16. The roots are (0 + 4) divided by 2, which is 2, and (0 − 4) divided by 2, which is minus 2. The nature is two distinct real roots, and the factorisation is (x − 2)(x + 2).

Try a is 1, b is 2 and c is 1, which is x squared plus 2x plus 1 equals 0. The discriminant is 4 minus 4, which is 0. The repeated root is minus 2 divided by 2, which is minus 1, shown in both root rows. The nature is one repeated root, and the factorisation is (x + 1) squared.

Where quadratic equations actually get used

Physics is full of quadratics. A ball thrown upward follows a parabola, and the time it hits the ground is the root of a quadratic. A car braking to a stop covers a distance that depends on the square of its speed. Any motion with constant acceleration produces a quadratic, and solving it gives the time or the distance.

Business uses quadratics for profit and revenue. If revenue grows with price but sales fall as price rises, the profit curve is a parabola, and its peak sits at the vertex of the quadratic. The roots tell you the prices where profit is zero — the break-even points — and the profit margin calculator handles the simpler margin maths around them.

Engineering and design use quadratics for arches, lenses, antennas and trajectories. A satellite dish is a parabola, and its focus is found from the quadratic that describes its shape. A system of equations calculator solves the linear systems that often appear alongside quadratics in the same problem.

Quadratic equation calculator vs linear equation calculator

A quadratic equation has an x squared term and up to two roots. A linear equation has only an x term and exactly one root. The default quadratic here, x squared minus 3x plus 2, has roots 2 and 1, while the linear equation 2x minus 6 equals 0 has the single root 3. The two tools solve different equations with different formulas.

Use the quadratic calculator whenever the highest power of x is 2. Use the linear equation calculator when the highest power is 1, such as 2x minus 6 equals 0 or 5x plus 10 equals 0. If you type a quadratic with a equal to 0 into this page, it tells you to use the linear calculator instead.

Systems of equations are the next step up: two equations with two unknowns, solved together. The system of equations calculator handles those with Cramer's rule. Quadratics, linear equations and systems form the core toolkit of school algebra, and each page here covers one of the three.

Common quadratic mistakes

The first mistake is the sign of b in the formula. The formula starts with minus b, so if b is minus 3, minus b is plus 3. Forgetting that flip is the most common error in quadratic problems, and it changes both roots. Write the formula out with the numbers substituted before doing any arithmetic.

The second mistake is forgetting to divide by 2a, or dividing only part of the numerator. The whole of minus b plus or minus the square root is divided by 2a, not just the square root. Brackets around the numerator prevent this error.

The third mistake is taking the square root of a negative discriminant and calling it an error. It is not an error: it means the roots are complex, and the calculator shows them with i. A negative discriminant is a valid answer that says the parabola never touches the x-axis.

How to use this quadratic equation calculator

Type a, b and c into the three boxes. The default is a is 1, b is minus 3 and c is 2, giving roots 2 and 1 with a discriminant of 1. The result updates live as you type, so you can change one coefficient and watch the roots and the discriminant move.

Read the nature row first. It tells you what kind of answer to expect: two distinct real roots, one repeated root, or complex roots. Then read the two root rows. For complex roots they show the real and imaginary parts, such as 1 + 1.41i and 1 − 1.41i.

Everything runs in your browser. No account, no upload, no data sent anywhere. Use it to check factorisation, to find where a parabola crosses the axis, or alongside the scientific calculator when a problem mixes quadratics with other arithmetic.

Frequently Asked Questions

Use the quadratic formula. Here a is 1, b is minus 3 and c is 2, so the discriminant is 9 minus 8, which is 1. The roots are (3 + 1) divided by 2, which is 2, and (3 − 1) divided by 2, which is 1. Factorising gives the same answer: (x − 2)(x − 1) = 0.

The discriminant, b squared minus 4ac, tells you the nature of the roots. If it is positive, there are two distinct real roots. If it is zero, there is one repeated root. If it is negative, the roots are complex. For x² − 3x + 2 the discriminant is 1, so there are two distinct real roots.

Complex roots appear when the discriminant is negative, so the square root in the formula is imaginary. They come in pairs such as 1 + 1.41i and 1 − 1.41i. They mean the parabola never crosses the x-axis, so the equation has no real solution.

If a is 0, the x squared term vanishes and the equation is linear, not quadratic. The quadratic formula would divide by 2a, which is zero, so this calculator shows dashes and says Not a quadratic equation. Solve it with the linear equation calculator instead.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.