Skip to content
LoveToCalc

Newton–Raphson method

Guess a root, follow the tangent down to the x-axis and guess again from there. Near a simple root each step roughly doubles the number of correct decimals.

In Swedish: Newton-Raphsons metod

The curve y = x² − 2 with a first guess x₀ = 2 on the x-axis. The tangent at the curve above it crosses the axis at 1.5, which is closer to the root √2 ≈ 1.414 than the guess was.

The formula

xₙ is your current guess, f(xₙ) the function’s value there, f′(xₙ) the derivative there and xₙ₊₁ the next, better guess. Repeat until the guesses stop changing.

Why it works

Close to a point, a curve looks almost like its tangent. The tangent at xₙ is a straight line, and where a straight line that is not horizontal crosses the x-axis can be worked out: it has slope f′(xₙ) and sits at height f(xₙ), so it reaches zero after a step of f(xₙ) / f′(xₙ). Where it crosses is the next guess.

Near the root the tangent is a very good picture of the curve, and the error roughly squares with each step. Three correct decimals become six, six become twelve.

Worked example: √2

√2 is the root of f(x) = x² − 2, with derivative f′(x) = 2x. Start at x₀ = 1:

Step xₙ Correct decimals
0 1 0
1 1 − (−1) / 2 = 1.5 0
2 1.5 − 0.25 / 3 ≈ 1.416 667 2
3 ≈ 1.414 216 5
4 ≈ 1.414 213 562 11

Four steps, and every digit on the calculator is right.

An equation algebra cannot solve

cos x = x has no solution by ordinary algebra. Write it as f(x) = cos x − x, with f′(x) = −sin x − 1, and start at x₀ = 1 (radians):

When it fails

The cure is usually a better starting guess: sketch the graph or try a few values and see where the function changes sign.

Common mistakes

Frequently asked questions

Why the two names? Isaac Newton described the idea in the 17th century for polynomials. Joseph Raphson wrote it in the form used today, with a fresh guess at each step.

Do I need to be able to differentiate? Yes, the derivative gives the tangent’s slope. If you cannot differentiate the function, an approximate numerical derivative will do, but the method then converges more slowly.

Last reviewed October 6, 2026 ·How pages are reviewed

Calculate it in practice

CalculusAll formulas