Skip to content
The Calculatorz
Calculus

Equation Solver (Find the Roots of f(x) = 0)

Solve any equation in one variable numerically and find all its real roots in a range, for polynomials, exponentials, logarithms and trig.

Equation and search range

Equation

How to use this calculator

Type an equation in x, such as x^3 − 2x − 5 = 0, e^x = 3x or cos(x) = x. If there is no equals sign the calculator solves expression = 0. Choose the range to search; it scans the range for sign changes and refines every root it finds with Newton's method and bisection.

Formula

The equation is rewritten as g(x) = left side − right side = 0. The range is divided into 4,000 steps; wherever g changes sign (or touches zero), the root is found by bisection and polished by Newton's method, xₙ₊₁ = xₙ − g(xₙ) ÷ g′(xₙ).

Calculator credits

Calculator developmentJulia Edwards

Editorial supervision

Expert reviewIfrahMSc Mathematics

Published byThe Calculatorz

Last updated

Read how we research, test, review and correct our calculators in our editorial policy.

Frequently asked questions

What kinds of equations can it solve?

Any equation in one variable built from arithmetic, powers, roots, exponentials, logarithms and trigonometric functions.

Why didn't it find a root I expected?

The root may be outside the search range, or the curve may only touch the axis without crossing it very closely. Widen or narrow the range and try again.

Can it find complex roots?

No, only real roots. For polynomials of degree 2 or 3, the quadratic and cubic solvers give complex roots too.

How accurate are the roots?

Each root is refined until the change is below about 10⁻¹², and the calculator reports g(x) at the root as a check.

What is Newton's method?

An iterative method that follows the tangent line to the x-axis: xₙ₊₁ = xₙ − f(xₙ) ÷ f′(xₙ). It converges very quickly near a root.

Why might tan(x) give false roots?

At vertical asymptotes tan(x) jumps from +∞ to −∞, which looks like a sign change. The calculator discards points where the function value is not close to zero.

References & methodology sources

These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.

  1. Strang, G., & Herman, E. J. (2016). Newton's method. In Calculus volume 1 (Section 4.9). OpenStax. View source
  2. Strang, G., & Herman, E. J. (2016). Calculus volume 1. OpenStax. View source
  3. Olver, F. W. J., Lozier, D. W., Boisvert, R. F., & Clark, C. W. (Eds.). (2024). NIST Digital Library of Mathematical Functions. National Institute of Standards and Technology. View source
  4. Stewart, J., Clegg, D. K., & Watson, S. (2021). Calculus: Early transcendentals (9th ed.). Cengage. View source