Quadratic Equation Solver
Solve ax² + bx + c = 0 three ways — quadratic formula, splitting the middle term and completing the square — with the discriminant, nature of roots, exact surd and complex answers, and a labelled graph.
Solve ax² + bx + c = 0 using x = (−b ± √(b² − 4ac)) ÷ 2a. For 2x² − 3x − 5 = 0 the discriminant is D = (−3)² − 4(2)(−5) = 49, so x = (3 ± 7) ÷ 4, giving x = 2.5 or x = −1. A positive D means two distinct real roots.
Your equation
Enter a, b and c — or type the whole equation.
Whole numbers, decimals or fractions like 3/4.
x^2 = 5x - 6, (x-2)(x+3) = 0 or 3x² + 2x = 1.
Step-by-step solution
Pick a method — all three give the same roots.
Graph of y =
What do you know?
Build the quadratic whose roots you know.
Whole numbers, decimals or fractions like 2/3.
Working
Everything about ax² + bx + c = 0
A quadratic always has two roots (they may be equal or complex). The discriminant tells you what kind before you even solve.
Enter the equation
Type a, b, c or the full equation — brackets and terms on both sides are fine.
Read the nature
The discriminant D = b² − 4ac decides whether the roots are rational, irrational, equal or complex.
Follow a method
Switch between formula, factorisation and completing the square to compare the working.
Check on the graph
The roots are where the parabola cuts the x-axis; the vertex is its turning point.
Quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2a
Works for every quadratic. Example: x² − 5x + 6 = 0 → x = (5 ± √1) ÷ 2 → x = 3 or x = 2.
Nature of roots
- D > 0 and a perfect square → real, distinct, rational
- D > 0, not a perfect square → real, distinct, irrational
- D = 0 → real and equal: x = −b/2a
- D < 0 → no real roots (complex pair p ± qi)
Roots and coefficients
α + β = −b/a αβ = c/a
So a quadratic with roots α and β is x² − (α + β)x + αβ = 0. Roots 2 and 3 give x² − 5x + 6 = 0.
Splitting the middle term
Find two numbers whose product is a × c and whose sum is b. For 2x² − 3x − 5: product −10, sum −3 → −5 and 2, so 2x² − 5x + 2x − 5 = (2x − 5)(x + 1).
Quadratic Equation Solver — your questions
What is the quadratic formula?
For any equation ax² + bx + c = 0 with a not equal to 0, the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. It always works, even when the equation cannot be factorised. For x² − 5x + 6 = 0 it gives x = (5 ± √1) ÷ 2, so x = 3 or x = 2.
What does the discriminant tell you about the roots?
The discriminant is D = b² − 4ac. If D is positive the equation has two distinct real roots, and they are rational when D is a perfect square. If D = 0 the roots are real and equal, both equal to −b ÷ 2a. If D is negative there are no real roots, only a pair of complex roots.
How do I solve a quadratic by splitting the middle term?
Find two numbers whose product is a × c and whose sum is b, then split bx into those two terms and factorise in pairs. For 2x² − 3x − 5 the product is −10 and the sum is −3, giving −5 and 2. So 2x² − 5x + 2x − 5 = (2x − 5)(x + 1), and the roots are 2.5 and −1.
How do you find k if the equation has equal roots?
Equal roots mean the discriminant is zero, so set b² − 4ac = 0 and solve for k. For example, in x² + kx + 9 = 0 you get k² − 36 = 0, so k = 6 or k = −6. This is a very common three-mark question in the CBSE Class 10 paper.
What is the relation between the roots and the coefficients?
If the roots are α and β, then α + β = −b/a and αβ = c/a. Reversing this builds the equation from its roots: x² − (sum)x + product = 0. Roots 2 and 3 give x² − 5x + 6 = 0. The tool also works backwards from roots given as surds p ± √q or as complex numbers.
What is completing the square used for?
You rewrite ax² + bx + c as a perfect square plus a constant, which both solves the equation and shows the vertex of the parabola. For x² + 6x + 5 = 0, add and subtract 9 to get (x + 3)² − 4 = 0, so x + 3 = ±2 and x = −1 or x = −5. The quadratic formula is derived this way.
Why does my equation have no real roots?
When b² − 4ac is negative, the square root of a negative number is not a real number, so the parabola never touches the x-axis. The two roots are complex and come as a conjugate pair p ± qi. For x² + x + 1 = 0, D = 1 − 4 = −3 and the roots are (−1 ± i√3) ÷ 2.