Equation Solver

Solutions
Next

Solving 3x + 7 = 22 takes two lines; x^2 - 5x + 6 = 0 is one step further. Enter the coefficients of a linear or quadratic equation and this solver returns the solution, or the two roots together with the discriminant. When a quadratic has no real roots, the complex conjugate pair is shown as a + bi.

How to solve an equation

  1. 1

    Choose the equation type

    Pick linear (`ax + b = 0`) or quadratic (`ax^2 + bx + c = 0`).

  2. 2

    Enter the coefficients

    Type the values of a, b and c. The result updates as you type.

  3. 3

    Read the solutions

    A linear equation has one solution. A quadratic has two real roots, or a complex conjugate pair, and the discriminant is shown as well.

What the solver handles

Equation form Method
Linear ax + b = 0 Solve x = -b/a
Quadratic ax^2 + bx + c = 0 Quadratic formula with the discriminant D = b^2 - 4ac

Worked example

x^2 - 5x + 6 = 0

Step 1: Identify a=1, b=-5, c=6. Step 2: Compute the discriminant: D = 25 - 24 = 1. Step 3: D > 0 means two real roots. Step 4: Apply the quadratic formula: x = (5 +/- 1) / 2. Step 5: Roots: x = 3 and x = 2. Step 6: Verify: 9 - 15 + 6 = 0 ✓ and 4 - 10 + 6 = 0 ✓.

Linear equations

A linear equation ax + b = 0 has one root: x = -b/a. If a = 0 and b = 0, every value of x satisfies the equation; if a = 0 and b is not zero, there is no solution. The solver reports both cases.

Complex roots

When the discriminant is negative, the quadratic has no real roots. The solver shows the complex conjugate pair as real + imagi and real - imagi. For example, x^2 + 4 = 0 gives the roots 0 + 2i and 0 - 2i.

What the solver does not do

This solver handles one linear or quadratic equation with numeric coefficients. It does not parse typed-in equations, solve cubic or higher-degree polynomials, handle equations with absolute values or roots, or solve systems of equations. Use a dedicated tool for those cases.

Common mistakes

  • Sign errors. The most common cause of unexpected roots. Check every coefficient, especially b in x^2 - 5x + 6 = 0: -5 is not the same as 5.
  • Expecting real roots when the discriminant is negative. A negative D means the roots are complex, not that you entered the wrong numbers. Verify D = b^2 - 4ac when in doubt.
  • Forgetting the a = 0 case. With a = 0 the equation becomes linear; the solver handles it automatically.

Frequently Asked Questions

No. This solver works on one linear or quadratic equation at a time. For simultaneous equations, use a dedicated linear system solver.

No. Only linear and quadratic equations are supported. Cubic and higher-degree polynomials, as well as equations like x = cos(x), are outside the scope of this tool.

A simple-looking quadratic like x^2 + 1 = 0 has no real roots, only the complex pair 0 + 1i and 0 - 1i. If your problem expects real answers, re-check the signs of the coefficients; if complex roots are meaningful in your context (physics, engineering), use them.

No. The coefficients are used to compute the result and are not stored or uploaded. In the step-by-step view they travel inside the page link when you move between steps; nothing is kept on our servers.

Related Tools

Tool available in other languages