Quadratic equation solver
The quadratic formula, worked through to the exact answer.
Output
Paste or type above to see the result here.
Your files stay on your device
This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.
Example
Example: a garden bed 4 m longer than it is wide, with an area of 21 m²
A rectangular bed is 4 m longer than it is wide and covers 21 m². With x for the width, x(x + 4) = 21, which is x² + 4x − 21 = 0. Type that line — or just the three numbers 1 4 -21.
- a = 1, b = 4, c = −21, so the discriminant is b² − 4ac = 4² − 4·1·(−21) = 100.
- The formula gives x = (−4 ± √100) / 2 = (−4 ± 10) / 2, so x₁ = −7 and x₂ = 3.
- Then the factored form (x + 7)(x − 3) = 0, the vertex (−2, −25) and the check: −7 + 3 = −4 = −b/a and −7 · 3 = −21 = c/a.
| Equation | Discriminant | Solutions |
|---|---|---|
| x² + 4x − 21 = 0 | 100 | x₁ = −7, x₂ = 3 |
| 2x² − 7x + 3 = 0 | 25 | x₁ = 1/2, x₂ = 3 |
| x² − 4x + 1 = 0 | 12 | x = 2 ± √3 (0.267949 and 3.732051) |
| x² + 2x + 5 = 0 | −16 | no real solution; x = −1 ± 2i |
A width cannot be negative, so the bed is 3 m wide and 7 m long: 3 × 7 = 21 m². The solver gives both roots; which one fits is for the problem to say.
How it works
- Type the equation: x² − 5x + 6 = 0, 2x^2 + 3x = 2 (terms can be on both sides, and fractions or decimals are fine) — or just the three numbers a b c.
- Put each equation on its own line to solve several at once.
- The solutions appear first, exact where possible, then the working: standard form, discriminant, formula, factored form, vertex and check.
Frequently asked questions
- What is the quadratic formula?
- For ax² + bx + c = 0, x = (−b ± √(b² − 4ac)) / (2a). The part under the root, b² − 4ac, is the discriminant.
- What does the discriminant tell you?
- If it is positive there are two real solutions, if it is zero one (a double root), if it is negative none — only a pair of complex solutions, which the solver shows too.
- Why is the answer 2 ± √3 and not a decimal?
- Because that is exact. The root is simplified (√12 = 2√3) and the decimals are given beside it: 0.267949 and 3.732051.
- What if a is 0?
- Then it is not a quadratic but a linear equation, and the solver solves it as one.
- How do I factor a quadratic?
- When the solutions are whole numbers or fractions, the solver writes the factored form for you: x² + 4x − 21 = (x + 7)(x − 3), and 2x² − 7x + 3 = 2(x − 1/2)(x − 3). With solutions like 2 ± √3 there are no such factors, and none is shown.
- How do I find the vertex?
- It is shown with the working: at x = −b/2a, with the value of the expression there. For x² + 4x − 21 the vertex is (−2, −25), the lowest point of the parabola, since a is positive.
- Is anything uploaded?
- No. It is worked out in your browser, and nothing you type leaves your computer.
Related tools
½ Fraction calculator Fractions worked out step by step, the way school teaches them. ℙ GCF and LCM calculator Greatest common factor, least common multiple and the primes behind them. σ Mean, median and standard deviation calculator A list of numbers in, the statistics and the working out. % Rule of three calculator Three values in, the fourth out — with the working shown.