Quadratic Equation Solver with Steps: Formula, Completing the Square, Factoring
This quadratic equation solver with steps finds the roots of Ax² + Bx + C = 0 and writes out the working line by line, so you can check homework or see exactly where your own answer went off. Type A, B and C, pick a Solving method (Quadratic formula, Completing the square or Factoring) and select Show steps. Answers are exact: whole numbers, fractions such as −5/2, radicals such as (1 + √5)/2, and complex roots such as 2 + 3i when the discriminant is negative. It runs in your browser and nothing is uploaded.
How to solve a quadratic equation with this solver
- Rewrite your equation as Ax² + Bx + C = 0, with everything on one side and 0 on the other.
- Type the number in front of x² into A, the number in front of x into B and the plain number into C. A blank A counts as 1, and a blank B or C counts as 0.
- For a negative number, type a minus sign or select ± beside the box to flip its sign.
- Leave Solving method on Quadratic formula, or choose another one.
- Select Show steps. The next screen shows the equation, then Roots at the top and a numbered Steps list for your method.
- Select Copy steps to paste the working into your notes, or change the Solving method under the list to see the same equation worked another way. Change the numbers takes you back to A, B and C.
Decimals are fine, with up to 6 digits after the point, and whole numbers can go up to ±1,000,000. A cannot be 0: without an x² term the equation is not a quadratic, and the solver says so. Fractions are not typed with a slash, so enter 1/2 as 0.5.
The three solving methods
All three find the same roots. They differ in the working you get, which is what matters when your teacher asks for a particular method.
| Solving method | What the Steps list shows | Always works? |
|---|---|---|
| Quadratic formula | The formula, A, B and C put in, the discriminant with a sentence saying how many real roots there are, the square root simplified, then both roots. | Yes |
| Completing the square | Divide by A, move C across, add (half of the x coefficient)² to both sides, write a perfect square, take the square root, isolate x. | Yes |
| Factoring | Multiply A × C, find the pair that adds to B, split the middle term, group, factor out the shared bracket, set each factor to 0. | Only when whole-number factors exist; otherwise it says so and shows the quadratic formula steps |
Worked example: the quadratic formula
Enter A as 2, B as 3 and C as −5, leave Quadratic formula selected and select Show steps. Roots reads x₁ = 1 and x₂ = −5/2, and the Steps list reads:
2. Use the quadratic formula: x = (−B ± √(B² − 4AC)) / (2A).
3. Put A, B and C into the formula: x = (−3 ± √(3² − 4 × 2 × (−5))) / (2 × 2).
4. Work out the discriminant, B² − 4AC: 3² − 4 × 2 × (−5) = 9 − (−40) = 49. It is positive, so there are two different real roots.
5. Take the square root of the discriminant: √49 = 7.
6. Take the plus sign: x₁ = (−3 + 7) / 4 = 1.
7. Take the minus sign: x₂ = (−3 − 7) / 4 = −5/2.
Worked example: completing the square
With A as 2, B as 4 and C as −6, choose Completing the square. When A is not 1 the first step divides every term by it:
2. Divide every term by A = 2 so that x² has a coefficient of 1: x² + 2x − 3 = 0.
3. Move the constant term to the right side: x² + 2x = 3.
4. Half of the x coefficient is 1, and its square is 1. Add 1 to both sides: x² + 2x + 1 = 3 + 1.
5. The left side is now a perfect square. Write it as a square and add up the right side: (x + 1)² = 4.
6. Take the square root of both sides (a number has two square roots, one positive and one negative): x + 1 = ±√4 = ±2.
7. Move the number beside x to the other side, changing its sign: x = −1 ± 2.
8. Take the plus sign: x₁ = −1 + 2 = 1.
9. Take the minus sign: x₂ = −1 − 2 = −3.
Solving by factoring, and when it is not possible
Factoring uses the AC method over whole numbers. If you type decimals, it first multiplies every term by the number that clears them, so 0.5x² + x − 1.5 = 0 becomes x² + 2x − 3 = 0 before the pair search starts. It also divides out a common factor first. Once the shared bracket is out, it sets each factor to 0 to get the roots.
Many quadratics have no whole-number pair. For x² + x + 1 = 0 the Steps list says no two whole numbers multiply to 1 and add to 1, so the quadratic is prime over the rationals, and then continues with the quadratic formula steps so you still get both roots. If all you want is the factored form in brackets, the factor quadratics calculator shows that with its own step-by-step working.
Reading the roots: real, repeated, irrational and complex
The sign of the discriminant, B² − 4AC, decides what kind of roots you get, and the solver words each case plainly.
| A, B, C | Discriminant | Roots shown |
|---|---|---|
| 2, 3, −5 | 49 (positive) | x₁ = 1 and x₂ = −5/2 |
| 1, −1, −1 | 5 (positive, not a perfect square) | x₁ = (1 + √5)/2 ≈ 1.618 and x₂ = (1 − √5)/2 ≈ −0.618 |
| 1, 6, 9 | 0 | one repeated root, x = −3 |
| 1, −4, 13 | −36 (negative) | x₁ = 2 + 3i and x₂ = 2 − 3i |
| 1, 1, 1 | −3 (negative) | x₁ = (−1 + i√3)/2 and x₂ = (−1 − i√3)/2 |
A negative discriminant is not an error. The steps take the square root with i, where i² = −1, and the complex roots are listed under Roots like any others.
Equations that are not in standard form
Only A, B and C are typed, so move every term to one side first. For x² = 5x − 6, subtract 5x and add 6 to get x² − 5x + 6 = 0, then enter A as 1, B as −5 and C as 6. A missing term is a 0, so x² − 9 = 0 needs only A as 1 and C as −9.
What this solver does not do
It solves Ax² + Bx + C = 0 and nothing else: no graph of the parabola, no cubic or higher-degree equations, no inequalities and no word problems. Take those steps by hand once you have the roots.
Frequently asked questions
How do I solve a quadratic equation step by step?
Write it as Ax² + Bx + C = 0, then pick a method and follow it line by line. Type A, B and C into the boxes, choose a Solving method and select Show steps. For x² + 6x + 5 = 0 the Steps list ends with x = −1 and x = −5. Switch the Solving method under the list and the same equation is re-worked with the other two methods.
How do I use the quadratic formula to solve a quadratic equation?
Put A, B and C into x = (−B ± √(B² − 4AC)) / (2A), work out the part under the square root, then take the plus sign for one root and the minus sign for the other. For 2x² + 3x − 5 = 0 the discriminant is 3² − 4 × 2 × (−5) = 49, its square root is 7, and the roots are (−3 + 7) / 4 = 1 and (−3 − 7) / 4 = −5/2. The Quadratic formula method writes out each of those lines.
How do I solve a quadratic equation by completing the square?
Divide every term by A, move the constant to the right side, add (half of the x coefficient)² to both sides, write the left side as a square, take the square root of both sides and isolate x. For x² + 6x + 5 = 0 that gives x² + 6x = −5, then (x + 3)² = 4, then x + 3 = ±2, so x = −1 or x = −5. Choose Completing the square in the Solving method list to see every line.
How do I solve a quadratic equation by factoring?
Multiply A × C, find two whole numbers that multiply to that product and add to B, split the middle term with them, group in pairs and factor out the shared bracket. Then set each bracket equal to 0. For x² − 5x + 6 = 0 the pair is −2 and −3, the brackets are (x − 3)(x − 2), and x = 3 or x = 2. Choose Factoring in the Solving method list to see it written out.
What does the discriminant tell you about the roots?
The discriminant is B² − 4AC. If it is positive there are two different real roots, if it is 0 there is one repeated root, and if it is negative there are no real roots but two complex ones. The Quadratic formula steps work it out and say which of the three cases you have. For x² + 6x + 9 = 0 it is 36 − 36 = 0, so the only root is x = −3.
How do I solve a quadratic equation with complex roots?
When the discriminant is negative, take its square root using i, where i² = −1, and carry on with the formula as usual. For x² − 4x + 13 = 0 the discriminant is −36, √(−36) = 6i, and the roots are (4 ± 6i) / 2 = 2 ± 3i. The solver does this by itself and lists both roots under Roots, so you never get an error for a negative discriminant.
Can every quadratic equation be solved by factoring?
No. Factoring needs two whole numbers that multiply to A × C and add to B, and many quadratics have none. For x² + x + 1 = 0 the Factoring method says the quadratic is prime over the rationals and then shows the quadratic formula steps instead, which still find the roots. The quadratic formula and completing the square work for every quadratic.
How do I enter an equation that is not in standard form?
Move every term to one side first so the other side is 0, then read off A, B and C. For x² = 5x − 6, subtract 5x and add 6 on both sides to get x² − 5x + 6 = 0, so A is 1, B is −5 and C is 6. A missing term is a 0: for x² − 9 = 0, leave B blank.
Does this solver draw a graph or handle cubic equations?
No. It solves Ax² + Bx + C = 0 only: there is no graph, no cubic or higher-degree equations and no inequalities. It does give exact answers, so fractions such as −5/2 and radicals such as (1 + √5)/2 are shown as they are, with a decimal ≈ beside the ones that do not end.
Recommended
-
Pentel GraphGear 500 Drafting PencilWrite the working out by hand in pencil, so the method sticks before the test.
-
TI-36X Pro Scientific CalculatorHandles fractions, radicals and complex numbers, so you can double-check a root like 2 ± 3i.
-
Casio fx-9750GIII Graphing CalculatorGraph the parabola and see where it crosses the x-axis to match the roots you got.
Helps keep the tools free. ✨
Images are for illustration only. As an Amazon Associate I earn from qualifying purchases.