Quadratic Formula Calculator: Steps & Examples
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This quadratic formula calculator solves any quadratic equation of the form ax² + bx + c = 0 and returns the real or complex roots. You enter the coefficients a, b, and c, and the calculator applies the quadratic formula to give you the solutions, along with the discriminant to show how many real roots exist. It also displays the step-by-step working so you can check your own algebra.
Formula
The quadratic formula solves equations of the form ax² + bx + c = 0, where a, b, and c are numbers and a ≠ 0. The formula is:
x = (−b ± √(b² − 4ac)) / (2a)
- a – coefficient of x² (must not be zero)
- b – coefficient of x
- c – constant term
- ± – means you compute two answers: one with +, one with −
- b² − 4ac – the discriminant, which tells you how many real roots exist
The formula works for every quadratic equation, whether the roots are real, repeated, or complex. It comes from completing the square on the general quadratic and is one of the most reliable methods because it never requires factoring.
Worked Example
Using the calculator’s default values: a = 1, b = −3, c = −4. The equation is x² − 3x − 4 = 0.
- Compute the discriminant: b² − 4ac = (−3)² − 4(1)(−4) = 9 + 16 = 25
- Take the square root: √25 = 5
- First root: x = (−(−3) + 5) / (2×1) = (3 + 5) / 2 = 8 / 2 = 4
- Second root: x = (−(−3) − 5) / (2×1) = (3 − 5) / 2 = −2 / 2 = −1
The calculator shows root1 = 4 and root2 = −1. You can verify by plugging each back into the original equation: 4² − 3(4) − 4 = 16 − 12 − 4 = 0, and (−1)² − 3(−1) − 4 = 1 + 3 − 4 = 0. Both check out.
How to Use the Calculator
Enter the three coefficients exactly as they appear in your equation. Make sure the equation is in standard form first: move all terms to one side so it equals zero. For example, if you have 2x² + 5x = 3, rewrite it as 2x² + 5x − 3 = 0, so a = 2, b = 5, c = −3.
- If a term is missing, use 0 for that coefficient. For instance, x² − 9 = 0 means b = 0.
- Watch the signs: a negative coefficient must be entered with the minus sign.
- The calculator accepts decimals and fractions (as decimals). For fractions like 1/2, enter 0.5.
The result shows two roots. If the discriminant is positive, you get two different real numbers. If it is zero, both roots are the same. If it is negative, the roots are complex and the calculator will show them with an imaginary part (e.g., −0.5 ± 1.6583i).
Understanding the Discriminant
The discriminant (b² − 4ac) is the part under the square root. It determines the nature of the solutions without computing them:
- Discriminant > 0 – two distinct real roots (the parabola crosses the x-axis twice)
- Discriminant = 0 – exactly one real root (the parabola touches the x-axis at its vertex)
- Discriminant < 0 – two complex roots (the parabola never touches the x-axis)
This is useful when you only need to know whether a quadratic has real solutions, such as when checking if a projectile reaches a certain height or if a profit function has break-even points.
Common Mistakes and How to Avoid Them
- Forgetting to set the equation to zero. The quadratic formula only works when the equation equals zero. If you plug in coefficients from 2x² + 5x = 3 without moving the 3, you get wrong answers.
- Sign errors with negative b. In the formula, −b means the opposite of b. If b = −3, then −b = 3. A common mistake is to write −3 instead of 3.
- Misplacing parentheses. The entire numerator (−b ± √(…)) is divided by 2a, not just the square root. In a calculator, you must enter it as (-b + sqrt(…)) / (2*a), not -b + sqrt(…) / (2*a).
- Using a = 0. If a = 0, the equation is linear, not quadratic, and the formula divides by zero. Always check that a ≠ 0.
- Rounding too early. If you round the discriminant before taking the square root, you can change the final answer. Keep full precision until the end.
When to Use the Quadratic Formula vs. Other Methods
The quadratic formula is the most general method—it works for every quadratic, even when factoring is difficult or impossible. Use it when:
- The equation does not factor nicely (e.g., 3x² + 7x − 5 = 0)
- The coefficients are decimals or fractions
- You need exact answers, especially with irrational roots
- You want to avoid guessing in trial-and-error factoring
Factoring is faster when the roots are simple integers, but it only works for a minority of quadratics. Completing the square is useful for deriving the vertex form, but it is more laborious for finding roots. The quadratic formula is the reliable fallback that always gives an answer.
Limitations and Special Cases
The quadratic formula assumes a, b, and c are real numbers. If they are complex, the formula still works but the discriminant becomes more complicated. Also, the formula gives the roots of the equation ax² + bx + c = 0; it does not directly give the vertex, axis of symmetry, or other features of the parabola. For those, you would use x = −b/(2a) for the axis, and plug that into the equation for the y-coordinate.
When the discriminant is negative, the square root of a negative number introduces the imaginary unit i. For example, x² + 2x + 5 = 0 has discriminant 4 − 20 = −16, so the roots are (−2 ± 4i)/2 = −1 ± 2i. The calculator shows these as complex numbers.
Frequently Asked Questions
What is the quadratic formula?
The quadratic formula is x = (−b ± √(b² − 4ac)) / (2a). It solves any equation of the form ax² + bx + c = 0 for x, giving up to two solutions. It is derived by completing the square and is a universal method for quadratic equations.
How do I know if my answer is correct?
Plug each root back into the original equation. If the result equals zero, the root is correct. You can also check the discriminant: if it is positive, you should have two different real numbers; if zero, one repeated root; if negative, complex roots.
What if the equation is not in standard form?
Rearrange it so all terms are on one side and the other side is zero. For example, 3x² + 6x = 9 becomes 3x² + 6x − 9 = 0. Then identify a, b, and c from that form.
Can the quadratic formula solve equations with fractions?
Yes. Convert fractions to decimals or keep them as fractions in your calculation. The formula works with any real coefficients. For instance, (1/2)x² + (3/4)x − 2 = 0 can be solved by entering a = 0.5, b = 0.75, c = −2.
Why does the calculator show an error when a = 0?
Because a = 0 makes the equation linear (bx + c = 0), not quadratic. The quadratic formula divides by 2a, so it is undefined. Solve linear equations with the simple formula x = −c/b instead.
What does the discriminant tell me?
The discriminant (b² − 4ac) tells you how many real roots exist. Positive means two real roots, zero means one real root, negative means two complex roots. It also helps you predict the shape of the parabola’s intersection with the x-axis.
Related
Formula used
in a | a (x² coefficient) | - | 1 | 0 in b | b (x coefficient) | - | -3 | 0 in c | c (constant term) | - | -4 | 0 out root1 | First root | - | (-b + sqrt(b^2 - 4*a*c)) / (2*a) | 4 out root2 | Second root | - | (-b - sqrt(b^2 - 4*a*c)) / (2*a) | 4 out disc | Discriminant | - | b^2 - 4*a*c | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.