Quadratic Equation Solver With Steps & Graph

Solve any quadratic equation online, with full working. Write your equation in standard form ax² + bx + c = 0, enter the values of a, b and c, and choose a method: the quadratic formula, factorization or completing the square. The solver gives the roots (real or complex), the discriminant, the vertex, the axis of symmetry and the y-intercept, and draws the graph of the parabola.

Pro Quadratic Solver
Advanced Quadratic Solver

Complete Mathematical Analysis

x² + x + = 0
Final Calculated Roots
Discriminant (D)
Vertex (h, k)
Y-Intercept
Axis of Symmetry
Detailed Solution Path:

How to Use the Quadratic Equation Solver

  1. Put the equation in standard form. Move every term to one side so the equation reads ax² + bx + c = 0.
  2. Enter a, b and c. Include the signs. For x² − 5x + 6 = 0, enter a = 1, b = −5 and c = 6.
  3. Choose a method. Pick the quadratic formula, factorization or completing the square.
  4. Press Solve Equation. Read the roots, then follow the step-by-step solution and check the graph.
Quadratic Equation Solver : Options to choose the desired method of the solution of given Quadratic equation.

Example: for 2x² + 5x − 3 = 0, enter a = 2, b = 5, c = −3. The solver returns x = 0.5 and x = −3.

Quadratic Equation Solver

Tip for fractions: the input boxes accept decimals, not fractions. Type ½ as 0.5. For values like ⅓, multiply the whole equation by the denominator first. For example, ⅓x² + x − 2 = 0 becomes x² + 3x − 6 = 0. This keeps the answer exact, with no rounding.

What Is a Quadratic Equation?

A quadratic equation is an equation in one variable whose highest power is 2. Its standard form is:

ax² + bx + c = 0, where a ≠ 0

  • a is the coefficient of x². It cannot be zero, or the equation is no longer quadratic.
  • b is the coefficient of x.
  • c is the constant term.

Every quadratic equation has exactly two roots. They can be two different real numbers, one repeated real number, or a pair of complex numbers. For the full theory, see our notes on the theory of quadratic equations.

Methods for Solving Quadratic Equations

There are three standard methods. All three give the same roots; they differ in speed and in when they work.

Factorization

Factorization writes the quadratic as a product of two brackets: a(x − r₁)(x − r₂) = 0. Here r₁ and r₂ are the roots. A product is zero only when one of its factors is zero, so each bracket gives one root.

When a = 1: find two numbers that multiply to c and add to b.
x² − 5x + 6 = 0 → the numbers −2 and −3 multiply to 6 and add to −5
(x − 2)(x − 3) = 0 → x = 2 or x = 3

When a ≠ 1 (splitting the middle term): find two numbers that multiply to a × c and add to b.
2x² + 5x − 3 = 0 → a × c = −6; the numbers 6 and −1 multiply to −6 and add to 5
2x² + 6x − x − 3 = 0
2x(x + 3) − 1(x + 3) = 0
(2x − 1)(x + 3) = 0 → x = ½ or x = −3

Factorization is fastest when the roots are whole numbers or simple fractions. If you can't find the two numbers quickly, use the quadratic formula.

Completing the Square

This method rewrites the equation as (x + p)² = q and then takes the square root of both sides.

Example: x² + 6x + 5 = 0

  1. Move the constant to the right: x² + 6x = −5
  2. Add (b/2)² = (6/2)² = 9 to both sides: x² + 6x + 9 = −5 + 9
  3. Write the left side as a square: (x + 3)² = 4
  4. Take the square root: x + 3 = ±2
  5. Solve: x = −3 + 2 = −1 or x = −3 − 2 = −5

If a is not 1, divide the whole equation by a first. Completing the square is also how the quadratic formula is derived, and it gives the vertex form of the parabola directly.

Quadratic Formula

The quadratic formula solves every quadratic equation with a ≠ 0, including ones that don't factor:

x = (−b ± √(b² − 4ac)) / 2a

The whole numerator, −b ± √(b² − 4ac), is divided by 2a.

Example: 2x² + 5x − 3 = 0 (a = 2, b = 5, c = −3)

  1. Discriminant: D = b² − 4ac = 5² − 4(2)(−3) = 25 + 24 = 49
  2. Square root: √49 = 7
  3. Substitute: x = (−5 ± 7) / 4
  4. Roots: x = (−5 + 7)/4 = 0.5 and x = (−5 − 7)/4 = −3

Understanding the Discriminant and Roots

The discriminant D = b² − 4ac is the part under the square root. It tells you what kind of roots the equation has before you solve it:

DiscriminantRootsGraph
D > 0Two different real rootsCrosses the x-axis twice
D = 0One repeated real rootTouches the x-axis once, at the vertex
D < 0Two complex roots (a conjugate pair)Does not meet the x-axis

If D is a perfect square (1, 4, 9, 16, 25 …), the roots are rational and the equation can be factored.

Repeated root example: x² − 6x + 9 = 0 → D = 36 − 36 = 0 → x = 3 (twice), because the equation is (x − 3)² = 0.

Complex root example: x² + 2x + 5 = 0 → D = 4 − 20 = −16. There are no real roots. Using √(−16) = 4i: x = (−2 ± 4i) / 2 = −1 ± 2i. The solver shows complex roots in this a ± bi form.

Learn more about the nature of the roots of a quadratic equation.

Graphing a Quadratic Function

The graph of the function y = ax² + bx + c is a parabola. The equation ax² + bx + c = 0 asks where that graph has height zero. So the real roots are the points where the parabola crosses or touches the x-axis.

  • If a > 0, the parabola opens upward and the vertex is the lowest point.
  • If a < 0, it opens downward and the vertex is the highest point.

The solver plots the parabola and marks the vertex and roots, so you can check the algebra visually.

Vertex

The vertex (h, k) is the turning point of the parabola:
h = −b / 2a and k = f(h) = c − b² / 4a

For 2x² + 5x − 3: h = −5/4 = −1.25 and k = −3 − 25/8 = −6.125, so the vertex is (−1.25, −6.125). Since a > 0, this is the minimum value of the function.

Axis of Symmetry

The axis of symmetry is the vertical line through the vertex: x = −b / 2a

The parabola is a mirror image on either side of this line. The two real roots are always the same distance from it. For example, the roots 0.5 and −3 are each 1.75 units from x = −1.25.

Y-Intercept and Roots

  • Y-intercept: put x = 0 to get y = c. The graph crosses the y-axis at the point (0, c). For 2x² + 5x − 3, that point is (0, −3).
  • X-intercepts: these are the real roots. For 2x² + 5x − 3, they are the points (0.5, 0) and (−3, 0).

Find a Quadratic Equation From Its Roots

You can also work backwards. If the roots are r₁ and r₂, the equation is:
x² − (r₁ + r₂)x + r₁r₂ = 0
That is, x² − (sum of roots)x + (product of roots) = 0.

Example: roots 2 and −5
Sum = 2 + (−5) = −3, Product = 2 × (−5) = −10
Equation: x² + 3x − 10 = 0

Check it in the solver: enter a = 1, b = 3, c = −10, and you get x = 2 and x = −5.

The same relationship works in reverse for any ax² + bx + c = 0: sum of roots = −b/a and product of roots = c/a.

Worked Example: A Word Problem

A rectangle's length is 3 m more than its width, and its area is 40 m². Find the width.

  1. Let the width be x. Then the length is x + 3.
  2. Area: x(x + 3) = 40 → x² + 3x − 40 = 0
  3. Enter a = 1, b = 3, c = −40. D = 9 + 160 = 169, √169 = 13
  4. x = (−3 ± 13) / 2 → x = 5 or x = −8
  5. A width can't be negative, so width = 5 m and length = 8 m. Check: 5 × 8 = 40 ✓

Real problems often give one root that doesn't make sense, such as a negative length or time. Always check both roots against the situation.

Which Solving Method Should You Use?

SituationBest method
Small whole-number coefficients, and D is a perfect squareFactorization (fastest)
a = 1 and b is evenCompleting the square (clean numbers)
Decimals, large numbers, or D not a perfect squareQuadratic formula
D < 0 (complex roots)Quadratic formula
You need the vertex form or the turning pointCompleting the square

If you're unsure, use the quadratic formula. It always works.

Common Mistakes When Solving Quadratic Equations

  • Not setting the equation to zero first. For 3x² = 2x + 1, rearrange to 3x² − 2x − 1 = 0 before reading a, b, c. Here a = 3, b = −2, c = −1, and the roots are 1 and −⅓.
  • Dropping the sign of b or c. In x² − 5x + 6 = 0, b is −5, not 5.
  • Dividing only −b by 2a. The whole expression −b ± √(b² − 4ac) is divided by 2a.
  • Squaring a negative b wrongly. (−5)² = 25, not −25. Always put b in brackets when you square it.
  • Dividing both sides by x. In x² = 4x, dividing by x loses the root x = 0. Factor instead: x(x − 4) = 0, so x = 0 or x = 4.
  • Forgetting the ± sign, which gives only one of the two roots.
  • Rejecting complex roots as "no solution". When D < 0 there are no real roots, but there are two complex roots.

Frequently Asked Questions

How do I solve a quadratic equation step by step?

Write it as ax² + bx + c = 0 and work out the discriminant D = b² − 4ac. Then factor it (if D is a perfect square), complete the square, or substitute into x = (−b ± √D) / 2a. Enter a, b and c in the solver above to see every step.

What values should I enter for a, b and c?

a is the number in front of x², b is the number in front of x, and c is the constant, each with its sign. If a term is missing, its value is 0. For example, x² − 9 = 0 has a = 1, b = 0, c = −9.

Can this solver handle equations that are not in standard form?

The solver takes the coefficients a, b and c, so rearrange the equation first. For example, 3x² = 2x + 1 becomes 3x² − 2x − 1 = 0, so enter a = 3, b = −2, c = −1.

What happens when the discriminant is negative?

There are no real roots, and the parabola doesn't touch the x-axis. The equation still has two complex roots. For x² + 2x + 5 = 0, the solver gives x = −1 ± 2i.

Can a quadratic equation have only one root?

When D = 0, the two roots are equal, so there is one repeated root. For example, x² − 6x + 9 = 0 gives x = 3. On the graph, the vertex sits exactly on the x-axis.

How do I find the vertex and x-intercepts of a quadratic graph?

The vertex is at x = −b/2a. Substitute that value back into the equation to get its y-coordinate. The x-intercepts are the real roots of ax² + bx + c = 0. The solver shows both and marks them on the graph.

Which method is best for students?

Learn factorization first, because it is the fastest for exam-style questions with whole-number answers. Use the quadratic formula whenever factoring isn't obvious, since it works for every quadratic.

Results are for learning and checking work; always show your own working in exams.