Type an equation the way you would write it on paper — 3x + 5 = 20, x^2 - 5x + 6 = 0, 2^x = 10, sin(x) = 0.5 — and this equation solver finds the values of x that make both sides equal.
How it solves depends on the equation:
- Linear equations (first degree) are solved exactly, with the classic steps: move the x terms to one side, the numbers to the other, then divide.
- Quadratic equations are solved with the discriminant and the quadratic formula, including exact answers with square roots such as .
- Everything else — cubic and higher polynomials, exponential, logarithmic, trigonometric or absolute-value equations — is solved numerically: the solver scans an interval you choose (−100 to 100 by default), catches every sign change and every point where the curve just touches zero, and refines each root to about 15 significant digits.
When a numerical root is a simple fraction or a multiple of π, the exact form is shown too. Each answer is checked by substituting it back into both sides.
How to use this calculator
- Type the equation with x as the unknown. Use
^for powers,*or nothing for multiplication (2x,3(x+1)), and/for division. Without an "=" sign the expression is set equal to 0. - Available functions:
sqrt,ln(natural log),log(base 10),exp,sin,cos,tan, their inversesasin,acos,atan, andabs. Constants:pi,e. - For trigonometric equations, choose radians or degrees.
- For equations solved numerically, adjust the search interval if you expect solutions beyond −100…100.
- Read the solutions, the exact form when there is one, and open the steps.
The formula
Linear equation. Any first-degree equation can be rearranged to with , so
If , there is either no solution () or every is a solution ().
Quadratic equation. For , the discriminant decides the number of real roots, and
Other equations. Write . If is continuous on and and have opposite signs, the intermediate value theorem guarantees a root between them. Bisection halves that interval about 50 times, until it is as narrow as floating-point numbers allow.
Worked example
Linear: . Subtract 5: . Divide by 3: . Check: .
Quadratic: gives , so : and .
Exponential: . Taking logarithms, , and the solver returns .
Trigonometric: in degrees between −100 and 100 gives . In radians the same interval holds 63 solutions, from upwards; the two closest to 0 are and , and the solver shows these exact forms with π.
Limits of numerical solving
A numerical solver only sees what happens at the points it samples. With 20,000 points, two roots closer together than the grid step can be missed, and a function that oscillates extremely fast (such as near 0) cannot be resolved completely. Roots exactly at the edge of the domain (for example ) may also be missed. Narrow the interval around a suspected root to get a finer grid. Complex roots are not searched, except for quadratics, where they are given in a note.
Frequently asked questions
How do I solve for x?
Isolate x by doing the same operation to both sides: add or subtract to move terms, then multiply or divide to remove the coefficient. For 3x + 5 = 20, subtract 5 (3x = 15), then divide by 3 (x = 5). The solver shows these steps for every linear equation.
How do I solve an exponential equation like 2^x = 10?
Take the logarithm of both sides: x · ln 2 = ln 10, so x = ln 10 ÷ ln 2 ≈ 3.3219. Type 2^x = 10 and the solver finds the same value numerically.
Why do I get several solutions for sin(x) = 0.5?
Trigonometric functions repeat, so the equation has infinitely many solutions. The solver lists those inside the search interval. Choose degrees and the interval 0 to 360 to get the two classic answers, 30 and 150.
What does "every real number is a solution" mean?
After simplifying, both sides are identical, for example 2(x + 1) = 2x + 2. Such an equation is an identity: any x makes it true. The opposite case, such as x + 1 = x + 2, has no solution at all.
Can it solve systems of equations or equations with two unknowns?
No. This solver handles one equation in one unknown, x. For a straight line through two points use the line equation calculator, and for quadratics with full detail use the quadratic formula calculator.
Last updated: