How to solve a quadratic equation
- 1.
Enter the coefficients
Type a, b and c from ax² + bx + c = 0 as integers, decimals (0.5) or fractions (1/3). A missing term is 0.
- 2.
Check the discriminant
Δ = b² − 4ac: positive - two real roots, zero - one double root, negative - two complex roots.
- 3.
Read the roots
x₁ and x₂ are shown exactly (fraction or surd such as 2 + √3) and as a decimal approximation; the graph marks them on the x-axis.
- 4.
Copy the solution
Copy the step-by-step solution together with the vertex form, the factored form and Vieta’s formulas.
The quadratic formula
For ax² + bx + c = 0 with a ≠ 0: Δ = b² − 4ac and x = (−b ± √Δ) / (2a).
Example: 2x² − 3x + 1 = 0 gives Δ = 9 − 8 = 1, so x₁ = (3 − 1)/4 = 1/2 and x₂ = (3 + 1)/4 = 1. When Δ is not a perfect square the result keeps the root in simplified form: x² − 4x + 1 = 0 gives Δ = 12, √12 = 2√3 and x = 2 ± √3 ≈ 0.268 and 3.732.
All arithmetic is exact (rational numbers, not floating point), so 1/3 stays 1/3 instead of becoming 0.333333. If the coefficients are fractions, the solver first multiplies the equation by a common denominator to work with whole numbers.
What the discriminant tells you
| Δ | Roots | Parabola | Example |
|---|---|---|---|
| Δ > 0 | two different real roots | crosses the x-axis twice | x² − 5x + 6 = 0 → 2 and 3 |
| Δ = 0 | one double root x = −b/(2a) | touches the x-axis at the vertex | x² − 6x + 9 = 0 → 3 |
| Δ < 0 | two complex conjugate roots | does not touch the x-axis | x² + 2x + 5 = 0 → −1 ± 2i |
If a = 0 the equation is linear (bx + c = 0, x = −c/b); the solver detects this and also reports the special cases “every real number” (0 = 0) and “no solution” (e.g. 0 = 5).
Vertex form and factored form
The vertex is at p = −b/(2a), q = −Δ/(4a), which gives the vertex form y = a(x − p)² + q - the same result you get by completing the square. For 2x² − 3x + 1: p = 3/4, q = −1/8, so y = 2(x − 3/4)² − 1/8. The parabola opens upwards when a > 0 (the vertex is a minimum) and downwards when a < 0 (a maximum).
The factored form y = a(x − x₁)(x − x₂) = 2(x − 1/2)(x − 1) exists over the real numbers only when Δ ≥ 0.
Vieta’s formulas and common mistakes
x₁ + x₂ = −b/a and x₁ · x₂ = c/a. For x² − 5x + 6 = 0 the roots add up to 5 and multiply to 6, so they are 2 and 3 - a quick way to check any answer.
- Sign of b: for x² − 5x + 6, b = −5, so −b = +5. Entering 5 instead of −5 flips both roots.
- Squaring a negative b: b² is always positive - (−5)² = 25, not −25.
- Dividing only √Δ by 2a: the whole numerator −b ± √Δ is divided by 2a.
- Not moving terms to one side: x² = 3x − 2 must first become x² − 3x + 2 = 0.
For other calculations with roots, powers and logarithms use the scientific calculator.
Frequently asked questions
How do I calculate the discriminant?
+
What if the discriminant is negative?
+
What if a = 0?
+
Can I enter fractions or decimals?
+
How do I find the vertex?
+
What is a double root?
+
How do I check my answer?
+
Updated: