Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Equation Solver

Solve for x: exact answers where they exist, every root checked, both sides graphed.

Math No upload Works offline Free, no sign-up

One unknown (any letter). Use + − * / ^, brackets, √ or sqrt(), |x|, π, e, sin, cos, tan, ln, log, log_2, exp. 2x, x(x+1) and sin x work without ×. No “=” means “= 0”.

Interval for numerical solving and the graph

Polynomial and rational equations are solved exactly everywhere; other equations are searched in this interval (π can be typed as pi).

Try:

Solutions

— —

Read as

    Left side: Right side: Solutions: where the curves meet

    How it was solved

      Next steps

      About the Equation Solver

      Type an equation in one unknown — 3(x − 2) + 4 = 2x + 7, x^2 − 5x + 6 = 0, (x + 1)/(x − 2) = 3, √(x + 3) = x − 3, 2^x = 10 or sin x = 0.5 — and get every solution, each one checked by putting it back into both sides. A graph of the two sides shows the solutions where the curves meet, and the steps say how they were found.

      Polynomial and rational equations are solved exactly whenever possible: whole numbers and fractions, square roots such as (3 + √5)/2, cube roots, and complex roots such as (−1 + √3 i)/2 — with repeated roots and their multiplicity. Roots that make a denominator zero are shown and rejected as extraneous. When a polynomial has no simpler exact form, all its roots, real and complex, are found numerically. Other equations — with roots, absolute values, exponentials, logarithms or trigonometry — are solved on an interval you choose, by looking for sign changes and refining each one. Everything runs in your browser.

      How to use it

      1. Type the equation. Write powers with ^ (or x²), multiply with * or just side by side (2x, 3(x + 1), x sin x), and use sqrt or √, |x|, π, e, sin, cos, tan, ln, log (base 10) and log_2. Without an “=”, the expression is set equal to 0.
      2. Press Enter or Solve (it also solves as you type). Check the “Read as” line to see how the equation was understood.
      3. Read the solutions: exact forms where they exist, decimals always, the check of each root, and rejected values with the reason.
      4. For equations that are solved numerically, choose the interval to search — for example 0 to 2π for a trigonometric equation. The interval also sets the range of the graph. Copy the answer with the Copy button.

      Examples

      A linear equation
      Input
      3(x − 2) + 4 = 2x + 7
      Result
      x = 9

      Simplify to 3x − 2 = 2x + 7, subtract 2x, add 2.

      A quadratic
      Input
      x^2 − 5x + 6 = 0
      Result
      x = 2 or x = 3

      D = 25 − 24 = 1; factored: (x − 2)(x − 3) = 0.

      Complex roots
      Input
      x^2 + x + 1 = 0
      Result
      x = (−1 ± √3 i)/2 — no real solution
      A quartic
      Input
      x^4 − 5x^2 + 6 = 0
      Result
      x = ±√2 or x = ±√3
      An extraneous root
      Input
      x/(x − 1) = 1/(x − 1)
      Result
      No solution: x = 1 makes a denominator zero
      A radical equation
      Input
      √(x + 3) = x − 3
      Result
      x = 6

      Squaring both sides would also give x = 1, which does not satisfy the original equation; this tool solves the original equation directly.

      A trigonometric equation
      Input
      sin x = 0.5 on 0 to 2π
      Result
      x ≈ 0.5235987756 (π/6) and 2.617993878 (5π/6)
      No formula needed
      Input
      x^5 − x + 1 = 0
      Result
      x ≈ −1.167303978, plus four complex roots

      Quintic equations have no general formula in radicals; the roots are found numerically and checked.

      Common uses

      • Checking homework answers for linear, quadratic and higher-degree equations — with the steps and the check.
      • Finding where two functions are equal (where their graphs cross), such as e^x = 3x.
      • Solving rational and radical equations and seeing which candidate roots are extraneous.
      • Getting accurate numerical roots of polynomials of high degree, including the complex ones.

      How exact solutions are found

      Fractions are cleared by multiplying both sides by the lowest common denominator, which turns a rational equation into a polynomial P(x) = 0 (every root is then checked against the original denominators). The polynomial is split into repeated factors (square-free factorization), which gives each root’s multiplicity. Rational roots come from the rational root theorem: any root p/q has p dividing the constant term and q dividing the leading coefficient. A quadratic factor is solved with the quadratic formula, x = (−b ± √(b² − 4ac))/(2a), with the square root simplified; factors of degree 2–4 with whole-number coefficients are looked for too, and equations such as x⁴ − 10x² + 1 = 0 and x³ = 2 get nested or cube-root forms. What is left is solved with the Aberth–Ehrlich method (Aberth 1973), which finds all complex roots at once; Sturm’s theorem gives the exact number of real roots.

      How other equations are solved

      The equation is written as f(x) = left side − right side = 0, and f is evaluated at 20,001 evenly spaced points of the interval. Where f changes sign between two neighbouring points, Brent’s method — a safe mix of bisection, the secant method and inverse quadratic interpolation (Brent 1973, chapter 4) — narrows the root down to full precision. Places where |f| dips to 0 without changing sign (as for |x − 2| = 0 or sin x = 1) are found by minimising |f| — they count only if |f| really reaches 0 up to rounding, so cos x + 1.00000000001 = 0 correctly has no solution — and roots at the edge of the domain (such as √x = 0) are found where a side stops being defined. Where the two sides are equal on a whole stretch (|x| = x for every x ≥ 0), that stretch is given instead of single points. A sign change across a vertical asymptote, as tan x has at π/2, is recognised and rejected. Every root is then substituted back into both sides; decimals that match a simple value such as π/6, √2 or ln 3 are labelled.

      How to type equations

      • Powers: x^2, x², x^(1/3), 2^x, e^x (or exp(x)).
      • Multiplication can be left out: 2x, 3(x + 1), (x + 1)(x − 1), x sin x.
      • Roots: sqrt(x) or √x, cbrt(x) or ∛x, root(x, 5) for a fifth root.
      • Absolute value: |x − 1| or abs(x − 1).
      • Logarithms: ln x (natural), log x (base 10), log_2(x) or log2(x), any base with log_3(x).
      • Trigonometry in radians: sin, cos, tan, sec, csc, cot, asin (or arcsin), sinh …; sin^2 x means (sin x)², sin^-1 x means arcsin x.
      • Any single letter can be the unknown: 3t − 6 = 0, sin θ = 1.

      Limitations

      • One equation in one unknown, with real inputs. Systems of equations, inequalities and equations with complex coefficients are not supported.
      • Non-polynomial equations are solved only on the chosen interval. Roots closer together than the sample spacing, or roots where both sides only nearly touch, can be missed; trigonometric equations usually have infinitely many solutions, of which only those in the interval are listed.
      • Decimals reach from about 10⁻³⁰⁰ to 10³⁰⁸. Where every term is smaller than that (e^x for x below −745), the two sides cannot be told apart, so no solution is reported there and the page says so; where a side is larger, solutions cannot be searched for.
      • Exact forms cover rational numbers, square roots (also nested ones for biquadratic equations), cube and fourth roots of x³ = c and x⁴ = c, and the complex roots that go with them. Other cubic and quartic equations are given as decimals rather than with the Cardano or Ferrari formulas. Polynomials can have degree up to 200; exact factoring is tried up to degree 60. When an expanded polynomial is very sensitive to rounding, as (x + 1)¹⁵⁰ = 2 is, roots that do not pass the check are left out and the page says how many.
      • Decimals are shown to 10 significant digits (about 8 for a root where the graph only touches the axis). Roots in high-degree polynomials can be sensitive to their coefficients; each one shown has passed the check by substitution.

      Privacy

      Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

      Frequently asked questions

      How do I solve a quadratic equation?

      Move everything to one side to get ax² + bx + c = 0, then use x = (−b ± √(b² − 4ac))/(2a). The discriminant b² − 4ac tells you what to expect: positive gives two real roots, zero one repeated root, negative two complex roots. For x² − 5x + 6 = 0: a = 1, b = −5, c = 6, D = 1, so x = (5 ± 1)/2 = 3 or 2.

      What is an extraneous solution?

      A value that comes out of a solving step but does not satisfy the original equation. Multiplying both sides by an expression that can be 0, or squaring both sides, can create one. In x/(x − 1) = 1/(x − 1), multiplying by x − 1 gives x = 1 — but x = 1 makes the denominators 0, so it is rejected and there is no solution.

      Why does it say “matches π/6” instead of giving an exact answer?

      Equations such as sin x = 0.5 are solved numerically. When a decimal agrees with a simple value — π/6, √2, ln 3 or a fraction — to about 12 digits, the tool points this out. It is a strong hint, not a proof; the exact answer from trigonometry here is indeed x = π/6 + 2kπ or 5π/6 + 2kπ.

      Why are there no solutions for sin x = 2?

      The sine of a real number is always between −1 and 1, so sin x = 2 has no real solution — the graph shows the two sides never meet. (It has complex solutions, which this tool does not look for in non-polynomial equations.)

      What does multiplicity mean?

      How many times a root is repeated. In (x − 1)²(x + 2) = 0, x = 1 is a double root (multiplicity 2) and x = −2 a simple root. At a root of even multiplicity the graph touches the axis without crossing it.

      Is log base 10 or base e?

      Here log is base 10 and ln is the natural logarithm (base e). For another base use log_b, for example log_2(x).

      Can it solve two equations at once?

      No — it solves one equation for one unknown. If an equation contains two letters, replace all but one with numbers.

      Quick answers and tool search

      Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.