A quadratic equation has the form with . This quadratic formula calculator solves it for you: enter the three coefficients and it returns the discriminant, the roots (real or complex), their exact form with fractions and square roots, the vertex of the parabola, the factored form and the vertex form, with every step written out.
It is built for students checking homework, teachers preparing worked solutions and anyone who meets a parabola in physics, finance or engineering. Coefficients can be negative or decimal: the calculator converts them to exact integers internally, so a discriminant that should be zero really comes out as zero instead of a tiny rounding error.
Behind the scenes it also uses the numerically stable version of the formula, which keeps small roots accurate even when is huge compared with and — a classic trap for naive implementations.
How to use this calculator
- Rewrite your equation as (move every term to one side).
- Enter a, b and c. A missing term has coefficient 0: for , enter .
- Read the solutions at the top, then the discriminant and the nature of the roots.
- Use the exact form when your teacher expects fractions or square roots, and the factored or vertex form to sketch the parabola.
- Open the steps to follow the calculation line by line.
The formula
The solutions of come from the quadratic formula:
The number is the discriminant. Its sign decides everything: two real roots if , one double root if , and two complex conjugate roots if .
The vertex is , which gives the vertex form . By Vieta's formulas the roots always satisfy and .
For irrational roots the calculator uses the stable form , , , which avoids subtracting two nearly equal numbers.
Worked example
Two real roots. Solve . The discriminant is , a perfect square, so the roots are rational:
The factored form is and the vertex is .
Complex roots. For , . There is no real solution; the roots are .
Irrational roots. For , , so , about and .
What the discriminant tells you
You can learn a lot from before solving anything:
| Discriminant | Roots | Graph of |
|---|---|---|
| , perfect square | Two distinct rational roots | Crosses the x-axis twice |
| , not a square | Two distinct irrational roots | Crosses the x-axis twice |
| One double root | Touches the x-axis at the vertex | |
| Two complex conjugate roots | Never meets the x-axis |
When all coefficients are integers, a perfect-square discriminant means the polynomial factors neatly over the integers — a quick test before trying to factor by hand.
Where quadratic equations appear
- Physics: the height of a thrown ball, , is quadratic in time; solving gives the landing time.
- Geometry: finding the side of a rectangle from its area and perimeter leads to a quadratic.
- Business: revenue that equals price times a demand that falls with price is a downward parabola; its vertex is the price that maximises revenue.
- Finance: a two-period internal rate of return is the root of a quadratic in .
For lines rather than curves, see the slope calculator.
Frequently asked questions
What is the quadratic formula?
It is the general solution of ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) / (2a). It works for every quadratic equation, including those that cannot be factored by hand.
How do I calculate the discriminant?
Square b, then subtract four times a times c: Δ = b² − 4ac. For x² − 3x − 10 = 0, Δ = 9 + 40 = 49. A positive value gives two real roots, zero gives one double root and a negative value gives complex roots.
What if the discriminant is negative?
The equation has no real solution and its parabola never crosses the x-axis. In the complex numbers it has two conjugate roots p ± qi, where p = −b/(2a) and q = √(−Δ)/(2|a|); the calculator shows them.
Why must a be different from zero?
With a = 0 the x² term disappears and the equation becomes linear, bx + c = 0, whose only solution is x = −c/b. The quadratic formula would divide by zero.
Can I enter decimals or fractions?
Decimals are accepted (up to 10 decimal places). For a fraction such as 1/3, multiply the whole equation by the denominator first: x²/3 + x − 2 = 0 becomes x² + 3x − 6 = 0, which has the same roots.
Sources
- OpenStax, College Algebra 2e — §2.5 Quadratic Equations
- Press et al., Numerical Recipes (3rd ed.) — §5.6 Quadratic and Cubic Equations
- Goldberg (1991), What Every Computer Scientist Should Know About Floating-Point Arithmetic, ACM Computing Surveys 23(1)
- Weisstein, Quadratic Equation — Wolfram MathWorld
Last updated: