Newton-Raphson Root Calculator
The Newton-Raphson method finds a root of an equation by repeatedly following the tangent line to where it crosses zero. From a starting guess it converges quadratically near a simple root, so only a few steps are usually needed. This calculator lets you type any function of x and a starting guess; it evaluates the derivative numerically, iterates until the change falls below the tolerance, and reports the root, the residual f at the root, and the number of iterations used. If the iteration diverges, the calculator flags that it did not converge.
Newton-Raphson formula
x next = x - f(x) / f'(x)
f'(x) approximated by (f(x + h) - f(x - h)) / (2h)
Stop when |x next - x| < tolerance or iterations reach the cap
Use x as the variable. Supported: + - * / ^, sin, cos, tan, exp, ln, log, sqrt, abs, pi, e.
Root finding context
- Convergence is quadratic near a simple root, so digits roughly double each step.
- A near-zero derivative at any step can cause divergence; pick a better starting guess.
- The method finds one root at a time; different guesses can reach different roots.
- The residual f at the root should be very close to zero for a good solution.
- For x squared minus 2 from a guess of 1, the method converges to the square root of 2.
Newton-Raphson: frequently asked questions
How does the Newton-Raphson method work?
Starting from a guess x0, each step moves to x minus f(x) divided by f'(x), the point where the tangent line crosses zero. Repeating this rapidly converges to a root when the guess is reasonably close and the derivative is not zero. The calculator iterates until the change is tiny or the iteration cap is reached.
How is the derivative computed?
You enter only f(x); the calculator evaluates the derivative numerically with a central difference, f'(x) equals (f(x plus h) minus f(x minus h)) divided by 2h. This makes the tool work for any function you type without needing a separate derivative expression.
Why does Newton-Raphson sometimes fail to converge?
It can diverge or cycle if the starting guess is poor, if the derivative is near zero at some step, or if the function has features like inflection points near the root. If the result does not converge, try a different starting guess closer to where you expect the root.
What functions are supported?
Use x as the variable with plus, minus, times as star, divide, power as caret, and parentheses. Supported functions include sin, cos, tan, exp, ln, log base 10, sqrt, abs and the inverse and hyperbolic trig functions. Constants pi and e are recognised.
How fast does the method converge?
When it works, Newton-Raphson converges quadratically near a simple root, meaning the number of correct digits roughly doubles each step. That is why only a handful of iterations are usually needed to reach machine precision.
Official sources
- NIST Digital Library of Mathematical Functions: Numerical Methods, root finding.
- U.S. National Institute of Standards and Technology: NIST home, mathematical references.
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.