By · Updated

Quadratic Equation Calculator

Solve ax² + bx + c = 0 With Exact Roots

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Quadratic Equation Calculator works

This quadratic equation calculator solves ax² + bx + c = 0 for any a, b and c. It gives the discriminant, both roots as decimals and, where possible, in exact form with fractions and surds. Complex roots are shown with i. It also finds the vertex of the parabola, the axis of symmetry and the sum and product of the roots.

A quadratic equation has a squared term and up to two solutions, the points where its parabola crosses the x-axis. Quadratics model anything that rises and falls in a curve: a thrown ball, the best price for maximum profit, or the area of a pen built from a fixed length of fence. Factorising works for neat numbers, but the quadratic formula works for every quadratic.

How the quadratic equation calculator works

The formula is x = (−b ± √(b² − 4ac)) / 2a. The discriminant, b² − 4ac, decides the kind of answer: positive gives two real roots, zero gives one repeated root and negative gives a pair of complex roots. The vertex sits at x = −b / 2a, halfway between the roots. If a is 0, the equation is linear and the calculator solves bx + c = 0 instead.

First example. x² − 3x + 2 = 0 has discriminant 9 − 8 = 1, so x = (3 ± 1) / 2, giving x = 2 and x = 1.

Second example. x² + 2x + 5 = 0 has discriminant 4 − 20 = -16, so x = (-2 ± 4i) / 2 = -1 ± 2i.

How many solutions does a quadratic have? Two when the discriminant is positive, one when it is zero and none that are real when it is negative.

Example quadratics, their discriminants and roots

Equation Discriminant Roots
x² − 3x + 2 = 0 1 2 and 1
x² − 5x + 6 = 0 1 3 and 2
x² + 2x + 1 = 0 0 -1 (repeated)
x² − 4 = 0 16 2 and -2
x² + 4 = 0 -16 x = ±2i
x² − 2x − 1 = 0 8 x = 1 ± √2
2x² − 7x + 3 = 0 25 3 and 1/2
x² + 4x + 13 = 0 -36 x = -2 ± 3i
x² − 6x + 9 = 0 0 3 (repeated)
3x² + 5x + 2 = 0 1 -2/3 and -1
x² + x − 1 = 0 5 x = (-1 ± √5) / 2
x² − 2 = 0 8 x = ±√2
4x² − 4x + 1 = 0 0 0.5 (repeated)
x² + 3x + 5 = 0 -11 x = (-3 ± i√11) / 2
2x² + 3x − 2 = 0 25 1/2 and -2
x² − x − 6 = 0 25 3 and -2
5x² − 20 = 0 400 2 and -2
x² + 6x + 5 = 0 16 -1 and -5
x² − 10x + 25 = 0 0 5 (repeated)
2x² + 4x + 5 = 0 -24 x = (-2 ± i√6) / 2
6x² + x − 2 = 0 49 1/2 and -2/3

Tips and pitfalls

FAQ

How do you solve a quadratic equation?

Put it in the form ax² + bx + c = 0, then factorise, complete the square or use the quadratic formula. The formula always works: for 2x² + 3x − 2 = 0, x = (−3 ± √25) / 4, so x = 0.5 or x = -2. Check by substituting each root back in.

What is the discriminant?

The discriminant is b² − 4ac, the part under the square root in the quadratic formula. Positive means two real roots, zero means one repeated root, and negative means no real roots but a pair of complex ones. A perfect square discriminant means the quadratic factorises neatly.

What does it mean when a quadratic has complex roots?

The parabola never touches the x-axis, so there is no real x that makes the expression zero. The solutions involve i, the square root of -1, and come as a conjugate pair such as 1 + 2i and 1 − 2i. They matter in electronics, signals and physics.

How do you find the vertex of a parabola?

The x-coordinate of the vertex is −b / 2a. Substitute it back to get the y-coordinate. For y = x² − 4x + 3, x = 4 / 2 = 2 and y = 4 − 8 + 3 = -1, so the vertex is (2, -1). It is a minimum when a is positive and a maximum when negative.

What if a is zero?

Then there is no x² term and the equation is linear, not quadratic, so it has a single solution x = −c / b. The calculator detects this and solves the linear equation instead. If both a and b are zero there is no x left to solve for at all.

See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.

Related tools