Algebra and equations
Quadratic equation solver
Enter a, b and c from ax² + bx + c = 0. The solver finds the discriminant, applies the quadratic formula, and gives the roots, even when they are complex, plus the vertex of the parabola.
Press Calculate. The answer and every step of the working will show here.
How it works
A quadratic equation has an x² term as its highest power. Its graph is a U-shaped curve called a parabola, and the solutions are the x-values where that curve crosses the x-axis. Written in standard form, the equation is ax² + bx + c = 0, with a not equal to zero.
The quadratic formula solves every one: x = (-b ± √(b² - 4ac)) / 2a. The expression under the root, b² - 4ac, is the discriminant, and it tells you what kind of answers to expect before you finish. If it is positive, there are two different real roots, so the parabola crosses the axis twice. If it is zero, there is one repeated root, and the parabola just touches the axis. If it is negative, there are no real roots, because you cannot take a real square root of a negative number. The parabola misses the axis, and the two solutions are a complex pair of the form p ± qi.
The vertex is the turning point of the parabola. Its x-coordinate is -b / 2a, and you find its y-coordinate by putting that x back into the equation. If a is positive the parabola opens upward and the vertex is a minimum. If a is negative it opens downward and the vertex is a maximum.
If you enter a = 0 the solver stops, since the equation is then linear and the quadratic formula would divide by zero.
The formula
- Discriminant: D = b² - 4ac
- Roots: x = (-b ± √D) / 2a
- Vertex: x = -b / 2a, with y found by substituting
- Sum of roots = -b / a and product of roots = c / a
Worked example
Solve x² - 5x + 6 = 0, so a = 1, b = -5 and c = 6. The discriminant is (-5)² - 4 × 1 × 6 = 25 - 24 = 1, which is positive, so there are two real roots. The formula gives x = (5 ± √1) / 2 = (5 ± 1) / 2. That is x = 6/2 = 3 and x = 4/2 = 2. The vertex is at x = 5/2 = 2.5 and y = -0.25, so the point is (2.5, -0.25). It sits exactly halfway between the roots.
More examples
A repeated root. x² - 6x + 9 = 0 has D = 36 - 36 = 0. The only root is x = 6/2 = 3, and the vertex (3, 0) lies on the x-axis. This is the perfect square (x - 3)².
Complex roots. x² + 2x + 5 = 0 has D = 4 - 20 = -16. The square root of -16 is 4i, so x = (-2 ± 4i) / 2 = -1 + 2i and -1 - 2i. The vertex is (-1, 4), above the axis, which is why the curve never touches it.
A negative a. -2x² + 3x + 5 = 0 has D = 9 + 40 = 49, so the roots are (-3 ± 7) / -4, which gives -1 and 2.5. The parabola opens downward, and the vertex (0.75, 6.125) is its maximum.
Another with two real roots. 2x² - 4x - 6 = 0 has D = 16 + 48 = 64, so x = (4 ± 8) / 4, giving 3 and -1. The vertex is (1, -8).
Common mistakes
- Wrong signs for b and c. In x² - 5x + 6 = 0, b is -5, not 5. Squaring a negative b must give a positive number, so write (-5)².
- Not putting the equation in standard form. If you have x² = 5x - 6, move everything to one side first to get x² - 5x + 6 = 0.
- Dropping one of the two roots. The plus-or-minus sign means two answers. Keep both unless the problem rules one out, such as a negative time.
- Saying "no solution" for a negative discriminant. There is no real solution, but there are two complex solutions.
When to use it
Quadratics describe anything that curves: the path of a thrown ball, the area of a shape as a side length changes, and the profit from a product as price goes up. In algebra classes they are the step after linear equations, and they lead to factoring, completing the square, and graphing parabolas.
The discriminant is useful on its own. Before you do any work you can tell whether a problem has real answers at all, which saves time on tests. The solver shows each of these pieces so you can see how they fit together.
Common questions
What is the discriminant?
It is b² - 4ac, the part under the square root in the quadratic formula. Its sign tells you how many real roots there are: positive means two, zero means one, and negative means none.
What are complex roots?
When the discriminant is negative, the square root of it is an imaginary number, written with i, where i² = -1. The two roots come as a pair that mirror each other: p + qi and p - qi.
Why can a not be zero?
If a = 0, the x² term vanishes and you have a linear equation bx + c = 0. The quadratic formula would divide by 2a = 0, which is impossible. Use the linear equation solver instead.
How do I find the vertex?
The x-coordinate is -b / 2a, and the y-coordinate comes from substituting that x into ax² + bx + c. The solver shows both and tells you whether the vertex is a minimum or a maximum.
Is factoring faster than the formula?
Sometimes, when the numbers are small and the roots are whole. The formula works every time, including when factoring fails, so it is a good fallback and a good way to check a factoring answer.
What is the axis of symmetry?
A vertical line through the vertex, x = -b / 2a. The parabola is a mirror image on either side of it, so the two roots are always the same distance from this line.
You might also need
- Linear Equation SolverSolve ax + b = cx + d for x, with every step and a check.
- Exponent CalculatorRaise a number to a power, including negative and fractional exponents, with the laws of exponents.
- System of Equations SolverSolve two linear equations in x and y by elimination, with no-solution and infinite cases.
Need a quick calculation instead? The free scientific calculator on the homepage handles roots, powers, trig and logs, and the math guides explain each method step by step.