Skip to content
MoneyDeck

Newton's Method Calculator

Find a root of any equation with Newton–Raphson, every iteration shown

Updated · Free, no signup

Solve f(x) = 0. Supports ^, sqrt, sin, cos, tan, exp, ln, log10, abs, pi, e.

Stop when |xₙ₊₁ − xₙ| is below this value.

Root x

2.094551481542

Status

Converged in 5 iterations

Iterations

5

f(x) at the root

0

Derivative f′(x)

3x^2 - 2
  • x ≈ 2.09455148154 satisfies f(x) ≈ 0.

f(x) near the root

Newton–Raphson iterations

nxₙf(xₙ)f′(xₙ)xₙ₊₁|xₙ₊₁ − xₙ|
02-1102.10.1
12.10.06111.232.094568121104190.005432
22.094568121104190.0001857231711.1616472.09455148169820.00001664
32.09455148169821.739761e-911.1614382.094551481542331.558726e-10
42.09455148154233011.1614382.094551481542330

About the Newton's Method Calculator

This Newton's method calculator finds a root of an equation f(x) = 0 numerically using the Newton–Raphson iteration xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ). Type the function, pick a starting guess x₀, and it differentiates f symbolically, runs the iterations until successive estimates agree to your tolerance, and shows every step — xₙ, f(xₙ), f′(xₙ) and the change — in a table.

Calculus and numerical-methods students use it to check hand iterations, and engineers and scientists use it to solve equations with no algebraic solution, such as cos(x) = x or eˣ = 3x. Near a simple root the method converges quadratically: the number of correct digits roughly doubles with each step, so five or six iterations usually reach full double precision.

Newton’s method finds one root at a time, and which one depends on the starting value. It can fail when f′(x) is zero or tiny near the guess, or wander off when the guess is far from any root — the calculator reports these cases instead of returning a false answer. To find a different root, start closer to it; the graph helps you choose. Trig functions use radians, and ln(x) is the natural log.

With the default inputs, the root x is 2.094551481542. Change any value above to recalculate instantly.

How to use the newton's method calculator

  1. 1Rewrite your equation as f(x) = 0 and type f(x), for example cos(x) - x.
  2. 2Enter a starting guess x₀ close to the root you want (the graph helps).
  3. 3Choose a tolerance and a maximum number of iterations.
  4. 4Read the root, the status and f(x) at the root to confirm it is near zero.
  5. 5Check the iteration table to watch the digits converge step by step.

Formula and method

xₙ₊₁ = xₙ − f(xₙ) / f′(xₙ)

Newton’s method replaces the curve by its tangent line at the current estimate xₙ and takes the point where that tangent crosses the x-axis as the next estimate. The tangent at xₙ is y = f(xₙ) + f′(xₙ)(x − xₙ); setting y = 0 gives the update formula above. The derivative is found symbolically, and the loop stops when two successive estimates differ by less than the tolerance.

Near a simple root (where f′ ≠ 0) the error shrinks quadratically: eₙ₊₁ ≈ (f″/2f′)·eₙ², so each step roughly doubles the number of correct digits. At a repeated root convergence slows to linear, and if f′(xₙ) = 0 the tangent is horizontal and the method cannot continue. Results are double-precision floating point (about 15–16 significant digits).

xₙ
Current estimate of the root (x₀ is your starting guess)
f(xₙ)
Function value at the estimate
f′(xₙ)
Derivative (slope of the tangent) at the estimate
tolerance
Stopping threshold for |xₙ₊₁ − xₙ|

Worked examples

Newton's own example: x³ − 2x − 5 = 0

From x₀ = 2: f(2) = −1 and f′(2) = 10, so x₁ = 2.1. Then x₂ ≈ 2.094568, x₃ ≈ 2.0945514816, and two more steps confirm the change is below 1e-10. The root is x ≈ 2.0945514815.

Square root of 2 from x² − 2 = 0

Newton’s update for x² − 2 is xₙ₊₁ = (xₙ + 2/xₙ)/2, the ancient Babylonian method. From 1 it gives 1.5, 1.416667, 1.414216, 1.41421356237…, matching √2 to full precision.

Solving cos(x) = x

With f′(x) = −sin(x) − 1, starting at x₀ = 1 the iterates are 0.750364, 0.739113, 0.7390851334, 0.7390851332. This is the Dottie number, the only real solution of cos x = x.

Horizontal tangent at the start

At x₀ = 0 the derivative 2x is zero, so the tangent line never crosses the x-axis and Newton’s method cannot take a step. In fact x² + 1 has no real roots at all.

Frequently asked questions

How does Newton’s method work?+

It starts from a guess, draws the tangent line to the curve at that point, and uses the tangent’s x-intercept as the next guess. Repeating this usually homes in on a root very quickly, with the number of correct digits roughly doubling each step.

Why does Newton’s method sometimes fail?+

It fails when the derivative is zero or nearly zero (a horizontal tangent sends the next guess far away), when the start is too far from a root, or when iterates cycle between values. Changing the starting guess usually fixes it.

How do I choose a good initial guess?+

Pick a value close to where the graph crosses the x-axis, for example from a sketch or by checking where f(x) changes sign between two values. The closer the guess, the faster and more reliable the convergence.

How many iterations does Newton’s method need?+

For a simple root and a reasonable guess, typically 4–7 iterations reach 10–15 correct digits, because convergence is quadratic. Repeated roots converge only linearly and may need dozens of steps.

What is the difference between Newton’s method and the bisection method?+

Bisection halves an interval that brackets a sign change: it is guaranteed to converge but gains only about one binary digit per step. Newton’s method needs the derivative and a decent guess but converges far faster.

Can Newton’s method find complex roots?+

With real starting values and real functions it stays on the real line, so it finds only real roots. Finding complex roots requires complex arithmetic and a complex starting guess, which this calculator does not do.

Related tools