Free · 4 methods · Exact radicals · Interactive graph

Quadratic Equation Solver — Steps, Graph, Discriminant & Complex Roots

Use this free online quadratic equation solver to solve ax² + bx + c = 0 and follow the working step by step. Choose the quadratic formula, factoring (AC method), completing the square or the square root property. Get exact roots as fractions and simplified radicals, decimal approximations, complex roots when the discriminant is negative, the discriminant analysis, vertex, axis of symmetry, y-intercept, factored form, vertex form, and Vieta's sum and product of roots — plus an interactive parabola graph you can drag and explore. Enter fractions, decimals, negative coefficients, expanded equations, factored forms or vertex forms. A zero leading coefficient is handled as a linear equation. Calculations run in your browser.
🧮 4 methods 📐 Exact radicals 📈 Interactive graph 🔢 Complex roots ✅ Step-by-step 🔒 No upload

Quadratic Equation Solver

Enter coefficients, an equation, or a factored/vertex form — the solution appears instantly.
Accepts whole numbers, decimals, negatives and fractions — for example 1/2, -3.5 and 2. Set a = 0 to let the solver handle the resulting linear or constant equation.
Type the equation in expanded form. Use ^2 or ² for the square and an optional * for multiplication: 2x^2 + 5x - 3 = 0, x² - 4 = 0 or 3*x^2 = 12. Fractional coefficients such as 1/2x^2 are supported; expand parentheses first.
Enter a(x − r₁)(x − r₂) = 0. The solver expands the factors into standard form and calculates both roots.
Enter a(x − h)² + k = 0. The solver expands the vertex form, identifies the vertex and calculates the roots.

Interactive parabola graph

Explore the curve, roots, turning point and symmetry line.

Live graph
Drag the amber vertex to reshape the parabola. Drag the plot to pan; use the controls to zoom or trace.
Vertex Real roots y-intercept Axis of symmetry

Solutions and roots

Exact answer first, decimal approximation below.

Exact + decimal

Key quadratic properties

Vertex, axis of symmetry, intercepts, extrema and root relationships.

Step-by-step working

Quadratic formula
🖨 Worksheet generator — printable quadratic practice
⚡ Example equations — load one
🕘 Recent calculations

What is a quadratic equation?

A quadratic equation is a second-degree polynomial equation — one where the highest power of the unknown is 2. Its standard form is:

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

Here a is the quadratic coefficient, b is the linear coefficient, and c is the constant term. The condition a ≠ 0 is what makes it quadratic: if a were 0, the x² term would vanish and the equation would be linear.

Quadratic equations appear in many disguises. Each can be rearranged into standard form:

Written asStandard forma, b, c
x² = 3x − 1x² − 3x + 1 = 0a = 1, b = −3, c = 1
2(x² − 2x) = 52x² − 4x − 5 = 0a = 2, b = −4, c = −5
x(x − 1) = 3x² − x − 3 = 0a = 1, b = −1, c = −3
(x − 2)(x + 5) = 0x² + 3x − 10 = 0a = 1, b = 3, c = −10
3(x − 1)² + 2 = 03x² − 6x + 5 = 0a = 3, b = −6, c = 5

The graph of y = ax² + bx + c is a parabola — a symmetric U-shaped curve. The solutions of the equation ax² + bx + c = 0 are the x-intercepts of that parabola: the points where y = 0.

How to use this quadratic equation solver

  1. Choose an input mode. Four tabs sit at the top of the tool:
    • Standard — type the coefficients a, b and c directly. This is the fastest route when the equation is already in standard form.
    • Equation — type the whole equation, such as 2x^2 + 5x - 3 = 0. The parser expands and rearranges it to standard form.
    • Factored — enter a, r₁ and r₂ to describe a(x − r₁)(x − r₂) = 0.
    • Vertex — enter a, h and k to describe a(x − h)² + k = 0.
  2. Watch the solution update instantly. There is no calculate button. The roots, discriminant, vertex, axis of symmetry, y-intercept and graph all refresh as you type.
  3. Pick a solution method. The four tabs below the equation select which written working you want to see:
    • Quadratic formula — always available. Full substitution and simplification.
    • Factoring — available when the discriminant is a perfect square (rational roots). Shows the AC method and grouping.
    • Completing the square — always available. Shows the derivation step by step.
    • Square root — available when b = 0. Shows the ± square-root method.
  4. Explore the graph. The graph fits the important features automatically. Enable trace mode to inspect a coordinate, drag the amber vertex to change the curve, drag the plot to pan, and use the grid, symmetry and zoom controls.
  5. Read the exact answers. Each root card shows the exact form (a fraction, a simplified radical, or a complex number) alongside its decimal approximation.
  6. Check the discriminant gauge. The colour bar shows whether D is negative, zero or positive and what that means for the roots.
  7. Verify. The green verification panel substitutes each root back into the original equation and confirms that it equals zero.

Which method should you use to solve a quadratic equation?

The best method depends on the form of the equation and the kind of answer you need. The quadratic formula is the dependable choice when you want a result for any genuine quadratic. Factoring can be quicker when the roots are rational, while completing the square is useful for revealing the vertex form. The square-root property is especially direct when there is no linear term.

MethodBest used whenWhat it revealsAvailable here
Quadratic formulaAny quadratic with a ≠ 0Exact roots, including radicals and complex numbersAlways
Factoring / AC methodThe discriminant is a perfect square and the roots are rationalLinear factors and the zero-product propertyWhen rational roots exist
Completing the squareYou want vertex form or a derivation of the formulaA perfect-square expression and the vertexFor every quadratic
Square-root propertyThe equation has no x term, so b = 0Two values from x² = a constantWhen b = 0

When you use an online quadratic equation solver for homework or revision, compare the written steps with the structure of the original equation. A calculator should help you understand why a method works, not only display the final answer. The tool above keeps the same coefficients while you switch methods, so you can compare valid approaches without re-entering the problem.

The quadratic formula

The quadratic formula solves any quadratic equation, whether or not it factors:

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

The symbol ± is read as "plus or minus". It produces two answers: one using + and one using −. Those are the two roots.

Worked example: 2x² + 5x − 3 = 0

Identify the coefficients: a = 2, b = 5, c = −3.

Substitute into the formula:

x = (−5 ± √(5² − 4·2·(−3))) / (2·2)
x = (−5 ± √(25 + 24)) / 4
x = (−5 ± √49) / 4
x = (−5 ± 7) / 4

Split into two:

x₁ = (−5 + 7) / 4 = 2/4 = 1/2
x₂ = (−5 − 7) / 4 = −12/4 = −3

The roots are x = 1/2 and x = −3. Substituting either back into 2x² + 5x − 3 gives zero.

Where the formula comes from

The quadratic formula is derived by completing the square on the general equation ax² + bx + c = 0:

  1. Divide every term by a: x² + (b/a)x + c/a = 0.
  2. Move the constant to the right: x² + (b/a)x = −c/a.
  3. Add (b/2a)² to both sides to complete the square on the left.
  4. Rewrite the left as (x + b/2a)² and simplify the right to (b² − 4ac)/(4a²).
  5. Take the square root of both sides: x + b/2a = ±√(b² − 4ac) / (2a).
  6. Subtract b/2a: x = (−b ± √(b² − 4ac)) / (2a).

Because the derivation divides by a, the formula is only valid when a ≠ 0 — which is exactly the definition of a quadratic.

The discriminant: what it tells you

The expression under the square root, D = b² − 4ac, is called the discriminant. It "discriminates" between the possible types of answer without requiring you to finish the calculation.

DiscriminantNature of rootsGraphExample
D > 0Two distinct real rootsParabola crosses the x-axis twicex² − 5x + 6 = 0 → D = 1, roots 2 and 3
D = 0One repeated real root (a double root)Parabola touches the x-axis at its vertexx² − 4x + 4 = 0 → D = 0, root 2 (twice)
D < 0Two complex conjugate roots — no real rootsParabola never crosses the x-axisx² + 2x + 5 = 0 → D = −16, roots −1 ± 2i

When D > 0, a further distinction matters. If D is a perfect square (1, 4, 9, 16, …), the roots are rational and the quadratic factors over the integers. If D is positive but not a perfect square, the roots are irrational and involve a simplified radical, such as √5 or 2√3.

Quick check: the discriminant is also the quantity inside the square root of the quadratic formula. If you can compute D mentally before committing to the full formula, you will know immediately how many answers to expect and whether they will be rational.

Solving by factoring (the AC method)

Factoring is the fastest method when the roots are rational. It reverses the expansion of two binomials: (px + q)(rx + s) = 0. The zero product property then says that if a product is zero, at least one factor is zero, so each binomial can be solved separately.

The AC method, step by step

  1. Write the equation in standard form ax² + bx + c = 0.
  2. Compute a · c.
  3. Find two numbers that multiply to a·c and add to b.
  4. Split the middle term bx into two terms using those numbers.
  5. Factor by grouping — factor the first pair and the second pair separately, then factor out the common binomial.
  6. Set each factor equal to zero and solve.

Worked example: 2x² + 5x − 3 = 0

a·c = 2 · (−3) = −6
Two numbers multiplying to −6 and adding to 5: 6 and −1
Split 5x: 2x² + 6x − x − 3 = 0
Group: 2x(x + 3) − 1(x + 3) = 0
Factor: (2x − 1)(x + 3) = 0
Zero product: 2x − 1 = 0 → x = 1/2; x + 3 = 0 → x = −3

Factoring only works over the rationals when the discriminant is a perfect square. If it is not, the quadratic is prime (irreducible) over the integers, and the quadratic formula is the right tool. This calculator detects that case and disables the factoring tab rather than showing an impossible factoring.

Completing the square

Completing the square rewrites ax² + bx + c in the form a(x − h)² + k. It is the method that produces the vertex form, it proves the quadratic formula, and it is the standard technique for converting a circle's equation or integrating certain rational functions.

The procedure

  1. Divide the whole equation by a so the x² coefficient becomes 1.
  2. Move the constant term to the right-hand side.
  3. Take half of the x coefficient, square it, and add it to both sides.
  4. The left-hand side is now a perfect square: (x + b/2a)².
  5. Simplify the right-hand side.
  6. Take the square root of both sides, remembering the ± sign.
  7. Solve for x.

Worked example: x² + 6x + 5 = 0

x² + 6x = −5
Half of 6 is 3; 3² = 9. Add 9 to both sides:
x² + 6x + 9 = 4
(x + 3)² = 4
x + 3 = ±2
x = −3 ± 2 → x = −1 or x = −5

Completing the square also reveals the vertex directly: the equation (x + 3)² = 4 corresponds to y = (x + 3)² − 4, so the vertex is (−3, −4).

Vertex, axis of symmetry, and the graph

The graph of y = ax² + bx + c is a parabola. Its most important point is the vertex — the turning point where the curve reaches its minimum or maximum.

Vertex: h = −b / (2a), k = c − b² / (4a) = (4ac − b²) / (4a)
Axis of symmetry: the vertical line x = h
y-intercept: (0, c)
Opens upward if a > 0 (vertex is a minimum)
Opens downward if a < 0 (vertex is a maximum)

The vertex is the point where the parabola turns around. If a > 0, the parabola opens upward and the vertex is the lowest point; the minimum value of the function is k. If a < 0, the parabola opens downward and the vertex is the highest point; the maximum value is k.

The axis of symmetry is the vertical line through the vertex. Every point on the parabola has a mirror partner on the other side of this line. That symmetry is why the two roots are always equidistant from h: if the roots are real, h is exactly halfway between them.

The y-intercept is always (0, c), because substituting x = 0 gives y = c. This gives you one point for free whenever you sketch a parabola by hand.

How to read a quadratic graph

A parabola gives a visual summary of the equation and its solutions. The real roots are the points where the curve meets the horizontal x-axis. The vertex is the turning point, and the vertical symmetry line passes through it. The y-intercept is found where the curve crosses the vertical axis, at (0, c).

The sign of a controls the direction of the curve: a positive value opens upward, while a negative value opens downward. The discriminant tells you how the curve meets the x-axis. A positive discriminant gives two crossings, zero gives one point of contact at the vertex, and a negative discriminant means there are no real x-intercepts.

Use the graph controls to separate the visual features. Turn off the grid when you want to focus on the curve, hide the symmetry line to inspect the parabola by itself, or enable tracing to read approximate coordinates. The plot is a numerical visualization; exact fractions and radicals in the solution cards remain the authoritative algebraic answers.

Exact answers vs decimal approximations

A calculator that only returns decimals hides the structure of the answer. The exact form tells you what kind of number the root is:

DiscriminantExact formDecimal
Perfect square (D = 49)x = 1/2 and x = −30.5 and −3
Positive, not a perfect square (D = 20)x = ±√52.236… and −2.236…
Zero (D = 0)x = 2 (double root)2
Negative (D = −16)x = −1 ± 2i−1 + 2i and −1 − 2i

When the discriminant is positive but not a perfect square, the radical can often be simplified. The rule is to extract the largest perfect-square factor:

√8 = √(4·2) = 2√2
√45 = √(9·5) = 3√5
√72 = √(36·2) = 6√2

The solver extracts square factors and reduces the numerator and denominator by their common divisor. For exceptionally large radicands, factor reduction is time-bounded; in that rare case the displayed radical remains exact, but it may not be fully square-free.

Complex roots

When the discriminant is negative, the square root of a negative number appears in the formula. That is resolved using the imaginary unit:

i = √−1, so √(−k) = i√k for k > 0.

For x² + 2x + 5 = 0: a = 1, b = 2, c = 5, so D = 4 − 20 = −16.

x = (−2 ± √(−16)) / 2
x = (−2 ± 4i) / 2
x = −1 ± 2i

The two roots are −1 + 2i and −1 − 2i. They are complex conjugates: the same real part with opposite imaginary parts. This always happens when the coefficients are real and the discriminant is negative.

On the graph, complex roots do not appear as x-intercepts — the parabola never touches the x-axis. The real part of each root is the x-coordinate of the vertex (the axis of symmetry), and the imaginary part measures how far the parabola's minimum sits above the x-axis.

Quadratic equation examples and answer checks

These examples show how the discriminant predicts the answer type before the roots are calculated. They also provide quick test cases for a quadratic roots calculator.

Example 1: two irrational real roots

For x² − 5 = 0, a = 1, b = 0 and c = −5. The discriminant is D = 0² − 4(1)(−5) = 20, which is positive but not a perfect square. Therefore the equation has two irrational real roots:

x = ±√20 / 2 = ±√5

Example 2: one repeated real root

For x² − 6x + 9 = 0, the discriminant is 36 − 36 = 0. The two formula branches coincide, giving a repeated root at x = 3. The graph touches the x-axis at its vertex rather than crossing it.

x = (6 ± √0) / 2 = 3

Example 3: a pair of complex conjugates

For x² + 2x + 5 = 0, D = 4 − 20 = −16. Since the discriminant is negative, there are no real x-intercepts. The two complex solutions are:

x = (−2 ± √−16) / 2 = −1 ± 2i

To check a real root, substitute it into ax² + bx + c and confirm that the result is zero. For complex roots, check the real and imaginary parts separately. The verification panel uses a scaled numerical tolerance to account for rounding in decimal approximations.

Vieta's formulas: sum and product of roots

For a quadratic ax² + bx + c = 0 with roots x₁ and x₂:

Sum of roots: x₁ + x₂ = −b / a
Product of roots: x₁ x₂ = c / a

These are called Vieta's formulas. They follow directly from expanding a(x − x₁)(x − x₂) = ax² − a(x₁ + x₂)x + a x₁x₂ and comparing coefficients.

They are useful in three ways. First, they provide a quick check: if your roots do not sum to −b/a, something is wrong. Second, they let you reconstruct a quadratic from its roots. Third, they let you answer questions like "what is the sum of the squares of the roots?" without solving the equation, since x₁² + x₂² = (x₁ + x₂)² − 2x₁x₂ = b²/a² − 2c/a.

The three forms of a quadratic

The same quadratic can be written in three ways, each revealing a different feature:

FormEquationWhat it reveals
Standardy = ax² + bx + cy-intercept (0, c); coefficients for the formula
Factoredy = a(x − r₁)(x − r₂)The roots r₁ and r₂ directly; x-intercepts
Vertexy = a(x − h)² + kThe vertex (h, k); maximum or minimum value

Converting between forms is a routine skill. Standard → vertex is completing the square. Vertex → standard is expanding. Factored → standard is multiplying out. Standard → factored requires solving, so it only works cleanly when the discriminant is a perfect square.

Real-world applications

  • Projectile motion. The height of an object thrown or launched follows h(t) = −½gt² + v₀t + h₀. Setting h = 0 and solving for t gives the time of flight; the vertex gives the maximum height.
  • Area problems. "A rectangular garden is 3 m longer than it is wide and has area 40 m²" becomes x(x + 3) = 40, or x² + 3x − 40 = 0.
  • Revenue and profit maximisation. If price falls linearly with quantity, revenue is a quadratic in quantity. The vertex gives the quantity that maximises revenue.
  • Optimisation in geometry. Maximising the area of a rectangle with a fixed perimeter leads to a quadratic, whose vertex gives the optimum dimensions.
  • Physics and engineering. Stopping distances, lens equations, resistor networks and beam deflection all produce quadratics.
  • Computer graphics. Quadratic Bézier curves and ray–sphere intersection tests are quadratic problems.
  • Finance. Compound interest with a variable rate, break-even analysis and internal rate of return can reduce to quadratics.

Common mistakes

  • Forgetting the ±. The quadratic formula produces two roots. Dropping the minus branch loses one of them.
  • Misreading b² as negative when b is negative. (−5)² = 25, not −25. Square the whole number including its sign.
  • Computing −4ac as −4a·c instead of −4·a·c. The multiplication is left to right; the sign is part of the coefficient c, not an instruction to subtract after multiplying.
  • Dividing by 2 instead of 2a. The denominator of the formula is 2a, not 2. Missing the a is the most common formula error.
  • Not simplifying the radical. √48 should become 4√3. Leaving it unsimplified is not wrong, but it is not in simplest form.
  • Assuming a negative discriminant means "no solution". It means no real solution. The equation still has two complex solutions.
  • Applying the formula when a = 0. If a = 0 the equation is linear, and dividing by 2a would divide by zero. Check a first.
  • Losing the sign of a in the denominator. If a is negative, 2a is negative, and the signs of the numerator and denominator both flip. Simplify carefully.

Quadratic vocabulary

TermMeaning
QuadraticA polynomial of degree 2 — the highest power is x²
Standard formax² + bx + c = 0 with a ≠ 0
CoefficientA number multiplying a variable: a, b and c in standard form
Constant termThe term with no variable — c in standard form
Root / solution / zeroA value of x that makes the equation true
DiscriminantD = b² − 4ac; determines the number and type of roots
ParabolaThe U-shaped graph of a quadratic function
VertexThe turning point of the parabola — its minimum or maximum
Axis of symmetryThe vertical line x = −b/(2a) that mirrors the parabola
x-interceptA point where the graph crosses the x-axis — the same as a real root
y-interceptThe point (0, c) where the graph crosses the y-axis
Double rootA repeated root that occurs when D = 0
Complex conjugateTwo roots of the form p ± qi that occur when D < 0
Perfect squareAn integer whose square root is an integer: 1, 4, 9, 16, 25, …

Limitations

  • Each entered coefficient must have an absolute value no greater than 1,000,000,000,000. Decimal input supports up to 18 digits across the integer and fractional parts; input strings are also length-limited to protect browser performance.
  • Equation mode accepts expanded expressions with x² or x^2, optional multiplication marks such as 3*x^2, and whole, decimal or fractional coefficients. Expand parentheses first; the parser does not perform symbolic expansion.
  • The factoring tab is available when the equation has rational roots. The square-root method is available when b = 0. Completing the square and the quadratic formula remain available for every quadratic equation.
  • The graph and verification residuals use JavaScript floating-point numbers for display and checking. Exact roots, fractions, the discriminant and vertex coordinates are retained separately as rational or radical values.
  • Radical simplification has a bounded factorization budget. Most ordinary school-level examples simplify fully; exceptionally large radicands may remain exact without being reduced to a completely square-free radical.
  • Biquadratic equations (ax⁴ + bx² + c = 0) are not solved directly. Substitute y = x², solve the resulting quadratic, and then take the appropriate square roots of y.

Frequently asked questions

What is a quadratic equation?

A quadratic equation is a second-degree polynomial equation of the form ax² + bx + c = 0 where a ≠ 0. The highest power of x is 2, and the graph of y = ax² + bx + c is a parabola.

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) / (2a). It gives the roots of any quadratic equation ax² + bx + c = 0. The expression under the square root, b² − 4ac, is called the discriminant.

How do you know how many solutions a quadratic equation has?

Look at the discriminant D = b² − 4ac. If D > 0 there are two distinct real roots. If D = 0 there is one repeated real root. If D < 0 there are two complex conjugate roots and no real x-intercepts.

What does the discriminant tell you?

The discriminant determines the nature of the roots without solving the equation. A positive discriminant means the parabola crosses the x-axis twice. A zero discriminant means it touches the x-axis at one point (the vertex). A negative discriminant means it never crosses the x-axis.

How do you solve a quadratic equation by factoring?

Write the equation in standard form. Find two numbers that multiply to a·c and add to b. Split the middle term using those numbers, factor by grouping, then set each factor to zero. For 2x² + 5x − 3 = 0: a·c = −6, and 6 and −1 multiply to −6 and add to 5. Split 5x into 6x − x, factor to (2x − 1)(x + 3), giving x = 1/2 and x = −3.

How do you complete the square?

Divide by a so the x² coefficient is 1. Move the constant to the right side. Add (b/2a)² to both sides to form a perfect square. Rewrite the left as (x + b/2a)², simplify the right, take the square root of both sides, and solve for x.

What is the vertex of a parabola?

The vertex is the turning point. For y = ax² + bx + c, its x-coordinate is h = −b/(2a) and its y-coordinate is k = c − b²/(4a). It is the minimum if a > 0 and the maximum if a < 0.

What is the axis of symmetry?

The vertical line x = −b/(2a) that divides the parabola into two mirror-image halves. It passes through the vertex.

How do you get exact radical answers?

When the discriminant is positive but not a perfect square, simplify the radical by extracting square factors: √20 = 2√5. Write the roots as (n ± k√m)/d and reduce the fraction. This calculator does that automatically.

What are complex roots?

When the discriminant is negative, the square root of a negative number introduces i = √−1. The roots are complex conjugates: x = (−b ± i√|D|)/(2a). They share a real part and have opposite imaginary parts.

What are Vieta's formulas?

For ax² + bx + c = 0, the sum of the roots is −b/a and the product is c/a. They are useful for checking answers and for building a quadratic from its roots.

What are the three forms of a quadratic equation?

Standard form y = ax² + bx + c; factored form y = a(x − r₁)(x − r₂); and vertex form y = a(x − h)² + k. Each form makes a different feature visible.

Can this calculator handle fractions?

Yes. Standard coefficients, factored-form values and vertex-form values accept fractions such as 1/2 or −3/4, decimals and whole numbers. Exact rational arithmetic is used for the coefficients, discriminant and vertex; decimal approximations are used for the graph and numerical checks.

What equation formats can I enter?

Standard mode accepts a, b and c. Equation mode accepts expanded forms such as 2x^2 + 5x − 3 = 0, x² − 4 = 0 and 3*x^2 = 12. Factored mode accepts a(x − r₁)(x − r₂), and vertex mode accepts a(x − h)² + k. Expand parentheses before using equation mode.

What if a = 0?

If a = 0, the equation is not quadratic. The calculator solves bx + c = 0 when b is nonzero, reports no solution when b = 0 and c is nonzero, and identifies 0 = 0 as true for every x.

Is this quadratic equation solver free?

Yes, completely free with no account required. All computation, graphing and export run in your browser. Nothing you type is uploaded.

Does it work offline?

After the page and its required assets have loaded, the calculator logic runs locally in your browser. The calculator script does not need a remote calculation service for solving equations.

Does it store my data?

The calculator runs its calculations in your browser and does not send entered coefficients to a calculation server. Recent quadratic calculations are stored in this browser's localStorage until you clear the history or browser data.

Sources and calculation methodology

The explanations follow standard algebra methods used in secondary and introductory college mathematics. The calculator independently implements the formulas and identities; the references below support the educational explanations, not an endorsement of this tool.

Implementation: coefficient arithmetic, fractions, the discriminant and vertex coordinates use exact BigInt-based rational arithmetic. Decimal approximations are calculated separately for graph plotting and residual checks. Radical factorization is deliberately time-bounded so unusually large inputs cannot monopolize the browser thread.

Scroll to Top