Quadratic Equation Solver
Solve ax² + bx + c = 0 with real or complex roots, exact radical and factored forms, discriminant, vertex, axis of symmetry and a graph.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Quadratic Equation Solver?
Enter the three coefficients of ax² + bx + c = 0 and the solver returns the roots, the discriminant, the vertex, the axis of symmetry and the y-intercept, with a graph of the parabola marking the roots and the turning point. Decimal and fractional coefficients are accepted.
When the coefficients are exact numbers, the answer is given in exact form as well as a decimal. Rational roots come with the factored form, so 2x² − 4x − 6 is shown as 2(x + 1)(x − 3). Irrational roots are given as a simplified surd, such as (1 ± √5) / 2, and complex roots as a ± bi.
The steps panel writes out the discriminant, the quadratic formula with your numbers, the vertex calculation, the vertex form, and a check using the sum and product of the roots.
- Real, repeated and complex roots
- Exact factored and simplified radical forms
- Discriminant, vertex, axis, y-intercept and vertex form
- Numerically stable root formula
- Interactive graph of the parabola
How to use the Quadratic Equation Solver
- Rearrange your equation so one side is zero, for example 3x² = 5x − 2 becomes 3x² − 5x + 2 = 0.
- Type a, b and c. Use 0 for a missing x or constant term; a must not be 0.
- Read the roots, the discriminant and the vertex in the result cards. Exact forms appear under the decimal values.
- Check the graph: green dots are real roots, the amber dot is the vertex, the dashed line is the axis of symmetry.
- Follow the steps panel, then copy the result or share the equation.
Worked examples
Factorable
Input
2x² − 4x − 6 = 0
Output
x = −1 and x = 3; 2(x + 1)(x − 3); vertex (1, −8)
D = 16 + 48 = 64, a perfect square, so the roots are rational and the quadratic factors.
Golden ratio
Input
x² − x − 1 = 0
Output
x = (1 ± √5) / 2 ≈ −0.618 and 1.618
D = 5 is not a perfect square, so the roots are irrational and given as a simplified surd.
Complex roots
Input
x² + 2x + 5 = 0
Output
x = −1 ± 2i
D = 4 − 20 = −16, so the parabola never meets the x-axis. Its vertex is at (−1, 4).
A thrown ball
Input
−4.9t² + 20t + 1.5 = 0
Output
t ≈ 4.155 s (and −0.074)
Height in metres with g = 9.8 m/s². The positive root is when the ball lands; the vertex (2.04 s, 21.9 m) is the highest point.
Background and insight
The quadratic formula x = (−b ± √(b² − 4ac)) / (2a) comes from completing the square on ax² + bx + c = 0. The expression under the root, D = b² − 4ac, is the discriminant. If D is positive there are two real roots and the parabola crosses the x-axis twice; if D is zero, the vertex sits on the axis and the root is repeated; if D is negative, there are two complex roots that are conjugates of each other.
Written as it appears in textbooks, the formula can lose accuracy on a computer. When b² is much larger than 4ac, −b and √D are almost equal and subtracting them cancels most of the significant digits. For x² + 10⁸x + 1 = 0 the naive formula in double precision gives −7.45 × 10⁻⁹ for the small root instead of about −1.00 × 10⁻⁸, a 25% error. This solver uses the stable form recommended in numerical analysis texts: q = −(b + sign(b)√D) / 2, then x₁ = q / a and x₂ = c / q.
The vertex is at x = −b / (2a), halfway between the roots, and the parabola is symmetric about that vertical line. Vieta's formulas give a quick check: the roots add to −b/a and multiply to c/a.
Common use cases
Algebra homework
Check roots, factored form and vertex form, and compare the steps with your own working.
Physics problems
Find when a projectile lands or reaches a height from h = −½gt² + v₀t + h₀.
Optimisation
Read the vertex to find the maximum revenue, minimum cost or best dimension in a quadratic model.
Engineering checks
Find the roots of a characteristic equation and see at a glance whether they are real or complex.
Tips and limitations
- Always set the equation equal to zero before reading off a, b and c, and keep their signs.
- If a factored form is not shown, the roots are irrational or complex; the quadratic does not factor over the integers.
- Rounded decimal coefficients (such as −4.9) give exact surds with large numbers; the decimal roots are usually more useful there.
- A negative a means the parabola opens downward and the vertex is a maximum.
- For very large or very small coefficients the stable formula keeps both roots accurate, but the graph may look flat; read the cards.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0, x = (−b ± √(b² − 4ac)) / (2a). The ± gives the two roots. It works for every quadratic, including ones that cannot be factored.
What does the discriminant tell you?
The discriminant b² − 4ac decides the type of roots. Positive means two different real roots, zero means one repeated real root, and negative means two complex roots. A positive perfect square also means the roots are rational.
How do you find the vertex of a parabola?
The x-coordinate is −b / (2a). Substitute it back into the equation to get the y-coordinate. For 2x² − 4x − 6, x = 1 and y = 2 − 4 − 6 = −8, so the vertex is (1, −8).
How do I know if a quadratic can be factored?
With whole-number coefficients, it factors over the integers exactly when the discriminant is a perfect square. x² − 5x + 6 has D = 1, so it factors as (x − 2)(x − 3); x² − x − 1 has D = 5 and does not.
What are complex roots of a quadratic?
When the discriminant is negative, the square root is imaginary, so the roots take the form p ± qi with i = √−1. They always come as a conjugate pair, and the parabola does not cross the x-axis.
What happens if a is 0?
Then the equation is linear, bx + c = 0, with the single solution x = −c / b. The solver asks for a non-zero a because the quadratic formula would divide by zero.
Is there an in-depth guide to the Quadratic Equation Solver?
Yes. “Quadratics, Scientific Notation and Roman Numerals: Writing Numbers Well” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.