Newton's Method Calculator screenshot

Newton's Method Calculator

Solve f(x) = 0 with Newton's method, printing the starting point, tolerance, iteration cap and every iterate.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No sign-up, no upload
Refuses a false root

Newton's Method Calculator

Solve f(x) = 0 with Newton's method, printing the starting point, tolerance, iteration cap and every iterate.

How this page computes

Newton's method replaces f near the current point by its tangent and jumps to where that tangent meets zero. The page differentiates f symbolically, runs x ← x − f(x)/f′(x), and prints the iterates.

On x² − 2 starting at 1 it reaches 1.41421356237 in four iterations, which is √2. The stopping rule is |f(x)| ≤ tolerance, and the page prints the residual at the root so the claim is checkable.

A zero derivative at an iterate, a non-finite value, or reaching the iteration cap is a refusal naming the x where it stopped. The page never returns a non-root as a root.

The calculation runs entirely in this browser tab; nothing is uploaded.

Newton's method finds a root by following tangent lines. For x² − 2 from x = 1 it converges to 1.41421356237, which is √2, in four iterations — and the page prints all four.

The page differentiates symbolically, so the slope at each iterate is the exact derivative rather than a finite difference. The starting point, tolerance and iteration cap are printed with the table, because all three decide the answer.

How to use Newton's Method Calculator

Type f(x), the function whose zero you want, and a starting point near the root.

Set the tolerance and the iteration cap. The default tolerance is 1e-10 and the default cap is 50.

Press Run. Read the iterate table and the root line. If the method stalls or leaves the finite plane, the refusal names the x where it stopped.

How the method works

At an iterate xₙ, the tangent is y = f(xₙ) + f′(xₙ)(x − xₙ). Setting y to zero gives xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ). Near a simple root the error squares each step, which is why a handful of iterations usually suffices.

The method fails honestly in three ways: a zero derivative makes the step undefined, a non-finite value stops the walk, and a cap reached without the tolerance means no root was proved. Each is a refusal with the x named.

What to Expect

Best for

  • A simple root of a smooth one-variable function
  • Seeing quadratic convergence in a table
  • Checking a hand-worked Newton iteration

Not ideal for

  • A multiple root, where convergence is slow
  • A function with a zero derivative at the start
  • A root-finding problem with no starting guess nearby

What this tool keeps

  • The function, start, tolerance and cap exactly as typed

What may need cleanup

  • Nothing when it converges; the refusal names the last x when it does not

Common errors

  • A zero derivative at an iterate is refused with the x
  • A cap reached without a root is refused with the last x and f(x)
  • A non-finite f or f′ is refused

Example use cases

  • Solve x^2 - 2 for √2
  • Solve cos(x) - x near 0
  • Show the effect of a poor starting point

Sample input

f(x) = x^2 - 2, start x0 = 1, tolerance 1e-10

Sample output

root ≈ 1.41421356237 with |f(root)| = 4.51e-12 after four iterations

Who this is for

  • Students meeting numerical methods
  • Readers checking a root by hand

Frequently asked questions

Why did it refuse instead of returning a number?

Because a number that is not a root would be wrong. The page stops when the derivative vanishes, a value is not finite, or the cap is reached, and it names the x where that happened.

How fast should it converge?

Near a simple root the error roughly squares each step, so the number of correct digits doubles. A multiple root is slower, and the table shows that immediately.

What is a good starting point?

One near the root and away from a place where f′ is zero. The page cannot choose it for you; it prints the starting point it used so a poor guess is visible in the table.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.