Solve ax² + bx + c = 0 with full working: formula, factoring and completing the square.
Solves ax² + bx + c = 0 exactly and shows every step. Results update as you type.
Exact answers first, decimals below.
Choose the method your teacher or exam expects.
Roots, vertex and y-intercept are marked.
A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. Its solutions are given by x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the square root, Δ = b² − 4ac, is the discriminant. It tells you the type of roots before you solve anything:
Δ > 0: two different real roots (rational if Δ is a perfect square, otherwise irrational). Δ = 0: one repeated real root, where the parabola just touches the x-axis. Δ < 0: no real roots; there are two complex roots of the form p ± qi.
Factoring is fastest when the roots are whole numbers or simple fractions, which happens exactly when Δ is a perfect square. The quadratic formula always works, including for irrational and complex roots. Completing the square is the method behind the formula and is how you turn a quadratic into vertex form, which is useful for graphing and for finding a maximum or minimum.
This solver works with exact fractions and square roots, so 2x² − 4x − 1 = 0 gives (2 ± √6) ÷ 2 rather than a rounded number, and decimals are shown separately. Equations with fractions or decimals (like 0.5x² − 1.5x + 1 = 0) are cleared to whole numbers first, which does not change the roots. If a = 0, the equation is linear and the tool solves it as such.
Everything is calculated in your browser. Nothing you type is uploaded or stored.
Write it as ax² + bx + c = 0, work out the discriminant Δ = b² − 4ac, then apply x = (−b ± √Δ) ÷ 2a. For example, x² − 5x + 6 = 0 has Δ = 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving x = 3 and x = 2.
The discriminant is b² − 4ac, the expression under the square root in the quadratic formula. Its sign tells you the nature of the roots: positive means two real roots, zero means one repeated root, negative means two complex roots.
Yes. A negative discriminant means the parabola never crosses the x-axis, so there are no real solutions. The solutions are complex numbers, written as p ± qi, where i is the square root of −1.
Then there is no x² term and the equation is not quadratic. It becomes the linear equation bx + c = 0 with the solution x = −c ÷ b. This solver detects that case and tells you.
With whole-number coefficients, a quadratic factors into brackets with whole numbers exactly when the discriminant is a perfect square (0, 1, 4, 9, 16, …). Otherwise use the quadratic formula or completing the square.
Divide by a, move the constant to the right, add (b ÷ 2a)² to both sides, write the left side as a square, then take square roots. The Completing the square tab shows each step for your equation.
When Δ = 0 the two roots are equal. The graph touches the x-axis at one point, the vertex, without crossing it, and the quadratic is a perfect square such as (x + 2)².
The axis of symmetry is x = −b ÷ 2a, and the vertex is the point on the parabola at that x. If a is positive the vertex is the minimum, and if a is negative it is the maximum.
Yes. Type 1/2 or 0.5 and the solver multiplies through to clear them, then solves exactly. You can also type a whole equation such as 0.5x^2 - 1.5x + 1 = 0.
Yes. It is free, needs no sign-up and runs entirely in your browser.