Quadratic equation solver

Enter a quadratic in any form, or just a, b and c. Switch between factoring, completing the square and the quadratic formula to compare methods on the same problem.

Quadratic formula calculator: ax2+bx+c=0ax^2 + bx + c = 0

Use ^ for powers, sqrt() for roots, |x| for absolute value, and separate a system with ;.

Try:

Drag a, b and c and watch the roots move

1
-2
-3

y=x2−2x−3y = x^2 - 2x - 3

Discriminant b² − 4ac
16
Real roots
-1, 3
Vertex (h, k)
(1, -4)

Discriminant > 0: the parabola crosses the x-axis twice, so there are two real roots. a > 0 opens it upward.

-8-6-4-202468-8-6-4-202468-13vertex (1, -4)
  • y = ax² + bx + c

Three ways to solve a quadratic equation

1. Factoring

Write ax2+bx+cax^2+bx+c as a product of two binomials and use the zero-product rule: if (x−p)(x−q)=0(x-p)(x-q)=0 then x=px=p or x=qx=q. For x2−5x+6x^2-5x+6, find two numbers that multiply to 6 and add to −5 (−2 and −3), so (x−2)(x−3)=0(x-2)(x-3)=0.

2. Completing the square

Rewrite the left side as a perfect square (x+h)2(x+h)^2 by adding (b/2)2(b/2)^2 to both sides, then take square roots. It’s the method behind vertex form. See it with tiles on the completing the square page.

3. The quadratic formula

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

It works for every quadratic. The expression under the root, b2−4acb^2-4ac, is the discriminant. Here’s where the formula comes from.

MethodBest whenWatch out for
FactoringRoots are integers or simple fractionsNot every quadratic factors over the integers
Square rootsNo x term (b = 0), e.g. 3x² = 12Forgetting the ± gives only one root
Completing the squarea = 1 and b is even; you need vertex formAdd (b/2)² to both sides
Quadratic formulaAlways worksSign errors with negative b; use brackets when substituting

Frequently asked questions

Which method should I use to solve a quadratic?
Try factoring first. It is fastest when the roots are whole numbers or simple fractions. If it doesn’t factor nicely, use the quadratic formula, which always works. Completing the square is best when you also need vertex form, or when b is even and a = 1.
What does the discriminant tell me?
The discriminant b² − 4ac decides the number of real roots: positive means two, zero means one repeated root, negative means none (two complex roots). A perfect-square discriminant means the quadratic factors over the integers.
Do I need the equation in ax² + bx + c = 0 form?
Not here. Type it however it appears, such as (x + 1)² = 2x + 5, and the solver expands it and moves everything to one side first.
Why are my answers shown with square roots?
When the discriminant isn’t a perfect square the roots are irrational. EquationCraft keeps them exact in simplified radical form, such as −2 ± √3, and shows the decimal approximation too.
Can a quadratic have just one solution?
Yes, when the discriminant is 0, as in x² − 6x + 9 = 0, which is (x − 3)² = 0. The parabola touches the x-axis at its vertex.