How to Use the Quadratic Formula (Step by Step, with Examples)
By the SnapCalculations team · Updated 2 Nov 2026
The short answer
To solve ax² + bx + c = 0, put your a, b and c into x = (−b ± √(b² − 4ac)) ÷ 2a. Work out b² − 4ac first, take its square root, then do the calculation once with + and once with − to get the two answers.
What the quadratic formula is for
A quadratic equation is any equation where the highest power of x is 2, like x² − 5x + 6 = 0. Its graph is a U-shaped curve called a parabola, and “solving” the equation means finding where that curve crosses the x-axis. There can be two crossing points, one, or none at all.
Some quadratics can be solved by factorising, but many can't, at least not easily. The quadratic formula always works, for every quadratic equation, which is why it's worth knowing.
x = (−b ± √(b² − 4ac)) ÷ 2a
a, b and c come from the equation written as ax² + bx + c = 0
How to use it, step by step
- 1Get everything on one side so the equation reads ax² + bx + c = 0. If it says 3x² = 5x + 2, move the terms over to get 3x² − 5x − 2 = 0.
- 2Write down a, b and c, including their signs. In 3x² − 5x − 2 = 0, a = 3, b = −5 and c = −2. If a term is missing, its number is 0.
- 3Work out the discriminant, b² − 4ac. This is the part under the square root, and it tells you what kind of answers to expect (more on that below).
- 4Take the square root of the discriminant.
- 5Do the formula twice: once with + and once with −. Each gives you one value of x.
- 6Check an answer by putting it back into the original equation. Both sides should be equal.
Put brackets around negative numbers when you substitute them. If b = −5, then b² is (−5)² = 25, not −25, and −b is +5.
What the discriminant tells you
The discriminant is the b² − 4ac part. Looking at it first tells you what kind of answer you're going to get:
- Positive: two different real answers. The curve crosses the x-axis twice.
- Zero: one repeated answer. The curve just touches the x-axis at its lowest (or highest) point.
- Negative: no real answers. The curve never reaches the x-axis, and the solutions are complex numbers involving i (the square root of −1).
- A perfect square (like 1, 25 or 49): the answers are whole numbers or fractions, so the equation could also have been factorised.
Worked examples
Example 1: two whole-number answers
Solve x² − 5x + 6 = 0.
- a = 1, b = −5, c = 6.
- Discriminant: (−5)² − 4 × 1 × 6 = 25 − 24 = 1, and √1 = 1.
- x = (5 + 1) ÷ 2 = 3, or x = (5 − 1) ÷ 2 = 2.
Answer: x = 3 or x = 2
Try it in the calculatorExample 2: rearrange first, and get a fraction
Solve 3x² = 5x + 2.
- Move everything to one side: 3x² − 5x − 2 = 0, so a = 3, b = −5, c = −2.
- Discriminant: (−5)² − 4 × 3 × (−2) = 25 + 24 = 49, and √49 = 7.
- x = (5 + 7) ÷ 6 = 2, or x = (5 − 7) ÷ 6 = −2/6 = −1/3.
Answer: x = 2 or x = −1/3
Try it in the calculatorExample 3: an answer with a square root
Solve x² − 4x + 1 = 0.
- a = 1, b = −4, c = 1.
- Discriminant: 16 − 4 = 12. 12 isn't a perfect square, but √12 = √(4 × 3) = 2√3.
- x = (4 ± 2√3) ÷ 2 = 2 ± √3.
Answer: x = 2 + √3 ≈ 3.7321 or x = 2 − √3 ≈ 0.2679
Try it in the calculatorExample 4: no real solutions
Solve x² + 2x + 5 = 0.
- a = 1, b = 2, c = 5.
- Discriminant: 4 − 20 = −16. It's negative, so there are no real answers.
- Using complex numbers: √−16 = 4i, so x = (−2 ± 4i) ÷ 2.
Answer: No real solutions; the complex solutions are x = −1 ± 2i
Try it in the calculatorExample 5: when does a thrown ball land?
A ball is thrown upward from 1.5 m above the ground. Using a simple model, its height after t seconds is h = −5t² + 20t + 1.5. When does it hit the ground?
- It hits the ground when h = 0, so solve −5t² + 20t + 1.5 = 0, with a = −5, b = 20, c = 1.5.
- Discriminant: 20² − 4 × (−5) × 1.5 = 400 + 30 = 430, and √430 ≈ 20.736.
- t = (−20 − 20.736) ÷ (−10) ≈ 4.07, or t = (−20 + 20.736) ÷ (−10) ≈ −0.07.
- Time can't be negative, so the second answer doesn't make sense here.
Answer: The ball lands after about 4.07 seconds
Try it in the calculatorCommon mistakes to avoid
- Forgetting to rearrange first. The formula only works once the equation equals zero.
- Losing the sign of b. If b is −5, then −b is +5. Most wrong answers come from this.
- Squaring a negative wrongly. (−5)² is 25. Typing −5² into some calculators gives −25, so use brackets.
- Dividing only part of the top by 2a. The whole of −b ± √(…) is divided by 2a, not just the square root.
- Stopping after one answer. Do the + version and the − version; most quadratics have two solutions.
Check your work in seconds
Our quadratic formula calculator shows every step above, the discriminant, the exact simplified answer (like 2 ± √3) and the vertex of the parabola. It's a quick way to check homework, or to see where a calculation went wrong.
Frequently asked questions
When should I use the quadratic formula instead of factorising?
Use factorising when the numbers obviously work out (like x² − 5x + 6 = (x − 2)(x − 3)). Use the formula when they don't, or when you're not sure. The formula always works, so it's the safe choice.
What if b or c is missing?
Use 0 for the missing number. For x² − 9 = 0, a = 1, b = 0 and c = −9, which gives x = 3 or x = −3.
Where does the quadratic formula come from?
It comes from solving ax² + bx + c = 0 by completing the square, a method that rewrites the equation so x appears only once. Doing that with letters instead of numbers produces the formula.
Can a quadratic have only one solution?
Yes. When the discriminant is exactly 0, both the + and − versions give the same number, so there is one repeated solution.