Quadratic Formula Calculator with Steps
Enter coefficients a, b, and c to view discriminant Δ, roots, and step-by-step LaTeX solution.
The calculator above solves the quadratic equation ax² + bx + c = 0 and writes out each step: the coefficients, the discriminant, and the quadratic formula.
The quadratic formula
A quadratic equation in one variable has the standard form
where a, b, and c are known numbers, x is the unknown, and a ≠ 0. Its solutions are
The symbol ± means you compute the expression twice: once with the plus sign and once with the minus sign. If a coefficient is negative, keep the parentheses when you square it or multiply it.
The discriminant Δ
The value under the square root is called the discriminant:
- Δ > 0: two distinct real solutions.
- Δ = 0: one repeated real solution, also called a double root.
- Δ < 0: no real solution, because a negative number has no real square root.
Simplify √Δ before you divide by 2a. The exact radical form is the precise answer. A decimal rounded to two places is only a check.
Worked examples
Enter the same coefficients in the calculator at the top and compare the steps.
Example 1. Two distinct real solutions
Solve x² − 5x + 6 = 0. Here a = 1, b = −5, and c = 6.
Both values satisfy the original equation, and (x − 3)(x − 2) = x² − 5x + 6. The solution set is S = {3; 2}.
Example 2. A repeated root
Solve x² − 4x + 4 = 0. The coefficients are a = 1, b = −4, and c = 4.
The equation is the perfect square (x − 2)² = 0, so x = 2 is a double root.
Example 3. No real solution
Solve x² + 1 = 0. Here a = 1, b = 0, and c = 1.
Because Δ < 0, √Δ is not a real number. The equation has no real solution, and the solution set is S = ∅.
🎯 Practice quiz: quadratic equations
Ten multiple-choice questions with four options each, built on the sections above: the definition, reading the coefficients a, b and c, computing Δ with negative coefficients, the double root, the half-b formula Δ', roots with radicals, the opposite-signs test for a and c, the case a = 0, an equation with a parameter m and a word problem. Pick an answer: the correct option turns green, a wrong one turns red, and the worked solution appears right below with a ⚠️ Traps box explaining why the wrong options are tempting. You can enter the coefficients from any question into the calculator above to check every step.
1️⃣ Definition Question 1. Which of the following is a quadratic equation in one variable:
Correct answer: C. −2x² + 5 = 0
A quadratic equation has the form ax² + bx + c = 0 with one condition only: a ≠ 0. The coefficients b and c are allowed to be zero.
Enter a = −2, b = 0, c = 5 in the calculator above: Δ = 0 − 4·(−2)·5 = 40 > 0, so the equation has two distinct real solutions x = ±√10/2.
⚠️ Traps
- A: x appears only to the first power, so this is a linear equation.
- B: x² is written, but its coefficient is a = 0, so the equation is really the linear equation 2x − 1 = 0. Always check a ≠ 0 first.
- D: the highest power is 3, so this is a cubic equation.
2️⃣ Reading a, b and c Question 2. The coefficients a, b and c of the equation 3x − 2x² + 5 = 0 are:
Correct answer: B. a = −2, b = 3, c = 5
Before reading the coefficients, rewrite the equation in descending powers of x:
a is the coefficient of x² (including its sign), b is the coefficient of x and c is the constant: a = −2, b = 3, c = 5. Then Δ = 9 + 40 = 49, so x₁ = −1 and x₂ = 5/2. Enter a = −2, b = 3, c = 5 to see every step.
⚠️ Traps
- A: reads the coefficients in the order they appear instead of by the power of x.
- C: drops the minus sign of a. The sign in front of a term belongs to its coefficient.
- D: swaps b and c: b goes with x, while c is the number standing alone.
3️⃣ Δ with negative coefficients Question 3. The discriminant Δ of the equation 2x² − 3x − 2 = 0 is:
Correct answer: A. 25
With a = 2, b = −3, c = −2, put every negative coefficient in parentheses when you substitute:
Since √25 = 5, the solutions are x₁ = 2 and x₂ = −2/4 = −1/2. You can check the reduction of −2/4 to −1/2 with the fraction calculator.
⚠️ Traps
- B (−7): forgets that a negative c makes −4ac positive: −4·2·(−2) = +16, not −16.
- C (7): squares a negative number incorrectly, writing (−3)² = −9. Note that −3² means −(3²) = −9, but (−3)² = 9.
- D (−25): makes both mistakes at once.
4️⃣ Δ = 0 and the double root Question 4. The equation 4x² − 4x + 1 = 0:
Correct answer: B. has a double root x = 1/2
Here Δ = 16 − 16 = 0, so the equation has a double root
Check with a special product: 4x² − 4x + 1 = (2x − 1)², which is zero exactly when x = 1/2. Type the left-hand side into the algebraic expression simplifier to see this perfect square.
⚠️ Traps
- A: confuses Δ = 0 with “no solution”. There is no real solution only when Δ < 0.
- C: when Δ = 0 the two roots coincide, so there cannot be two different solutions.
- D: loses the sign of −b: b = −4, so −b = 4 and the root is positive.
5️⃣ The half-b formula Δ' Question 5. When b is even, write b = 2b’, compute Δ’ = b’² − ac and use x = (−b’ ± √Δ’) / a. For x² + 6x − 7 = 0, the value of Δ’ and the solution set S are:
Correct answer: A. Δ' = 16, S = {1; −7}
b = 6 is even, so b’ = 3:
Cross-check with the full formula: Δ = 36 + 28 = 64 = 4·16 = 4Δ’. The half-b formula always gives Δ = 4Δ’, so both discriminants have the same sign and lead to the same roots with smaller numbers.
⚠️ Traps
- B (43): computes b² − ac = 36 + 7, using b instead of b’.
- C (64): this is Δ, not Δ’. The solution set is right but the reduced discriminant is not.
- D: forgets the minus sign in −b’ and gets roots with the wrong signs. Substituting x = 7 gives 49 + 42 − 7 = 84 ≠ 0.
6️⃣ Roots with radicals Question 6. The solutions of the equation x² − 2x − 2 = 0 are:
Correct answer: B. x = 1 ± √3
Δ = (−2)² − 4·1·(−2) = 12, and √12 = 2√3 (take the perfect square out of the radical; you can check it with the exponent and radical calculator). Divide the whole numerator by 2a = 2:
Decimal check: x₁ ≈ 2.73 and x₂ ≈ −0.73. A quicker route is the half-b formula: Δ’ = 1 + 2 = 3, which gives x = 1 ± √3 directly.
⚠️ Traps
- A: divides only the radical term by 2 and forgets to divide the leading 2 of the numerator.
- C: the opposite mistake: divides the 2 but not the 2√3.
- D: loses the sign of −b: b = −2, so −b = +2.
7️⃣ a and c with opposite signs Question 7. Without computing Δ, which statement about the equation 3x² + 5x − 2026 = 0 is true:
Correct answer: C. The equation has two distinct real solutions
Here a = 3 and c = −2026 have opposite signs, so ac < 0 and therefore −4ac > 0. Since b² ≥ 0:
So every quadratic equation whose a and c have opposite signs has two distinct real solutions. Graphically, the parabola y = ax² + bx + c meets the y-axis at height c, on the opposite side of the x-axis from where its arms point, so it must cross the x-axis twice; see the function analysis and graphing calculator.
⚠️ Traps
- A, B: a large constant like 2026 does not make the equation unsolvable; its negative sign is exactly what makes Δ positive.
- D: the signs of a and c are enough. This shortcut saves time on multiple-choice tests.
8️⃣ The case a = 0 Question 8. If you enter a = 0, b = 4, c = −8 (the equation 0x² + 4x − 8 = 0), the correct solution set is:
Correct answer: D. S = {2}
With a = 0 the equation is no longer quadratic, so the quadratic formula does not apply. Solve it as a linear equation:
The calculator above switches to this case automatically when a = 0. To practise equations of the form bx + c = 0 on their own, use the linear equation calculator.
⚠️ Traps
- A: the quadratic formula failing does not mean there is no solution; you switch to the linear method instead.
- B: writes x = c/b and forgets the sign change when moving c to the other side.
- C: a linear equation has at most one solution (when b ≠ 0); a pair of opposite roots only appears in equations like x² = k.
9️⃣ Parameter m and the double root Question 9. The equation x² − 2x + m = 0 has a double root if and only if:
Correct answer: C. m = 1
a = 1 ≠ 0 for every m, and
The equation has a double root ⇔ Δ = 0 ⇔ m = 1. The double root is then x = 1; enter a = 1, b = −2, c = 1 to check. Full discussion: m < 1 gives two distinct roots, m = 1 a double root, m > 1 no real root. Graphically, m = 1 is when the vertex of the parabola sits exactly on the x-axis, which you can read from the variation table of the quadratic function.
⚠️ Traps
- A: m < 1 gives Δ > 0, which is the condition for two distinct roots.
- B: writes Δ = 4 + 4m, dropping the minus sign of −4ac.
- D: m > 1 gives Δ < 0, so there is no real root.
🔟 Word problem Question 10. A rectangular garden is 3 m longer than it is wide and has an area of 40 m². The width of the garden is:
Correct answer: A. 5 m
Let the width be x (m) with x > 0; the length is x + 3. The area gives
Δ = 9 + 160 = 169, √169 = 13, so x₁ = 5 and x₂ = −8. Since x > 0, reject x = −8. The garden is 5 m wide and 8 m long. Check the area and perimeter with the perimeter and area calculator.
⚠️ Traps
- B (8 m): that is the length; or the length was set up as x − 3, leading to x² − 3x − 40 = 0.
- C: solves the equation correctly but forgets to check the condition; a length cannot be negative.
- D (10 m): forgets to divide by 2a, stopping at −3 + 13 = 10.
Frequently asked questions
What is the quadratic formula?
For ax^2 + bx + c = 0 with a not equal to 0, the solutions are x = (-b ± sqrt(b^2 – 4ac)) / (2a).
What does the discriminant tell you?
The discriminant is delta = b^2 – 4ac. A positive delta gives two distinct real solutions, zero gives one repeated real solution, and a negative delta gives no real solution.
What if a equals 0?
The equation is no longer quadratic. It becomes bx + c = 0. If b is not zero then x = -c/b. If b and c are both zero, every real number is a solution. If b is zero and c is not, there is no solution.
Should the square root be simplified?
Yes. Factor perfect squares out of the radicand and reduce the fraction. The exact radical form is the precise answer. A decimal is only a rounded check.
How many real solutions can a quadratic equation have?
At most two. When delta is positive there are two distinct real solutions, when delta is zero there is a repeated real solution, and when delta is negative there is no real solution.
🔗 Related calculators
- Linear equation calculator with steps (the case a = 0)
- System of linear equations calculator (2 variables)
- Exponent and radical calculator (simplify √Δ)
- Fraction calculator: simplify roots written as fractions
- Algebraic expression simplifier: special products and factoring
- Variation table calculator: vertex of a parabola
- Function analysis and graphing calculator: where a parabola meets the x-axis
- Maximum and minimum value calculator on an interval
- Domain of a function calculator: conditions with a quadratic
- Trigonometric equation solver (substitute t = sin x to get a quadratic)