Skip to content

Newton's Method Calculator

Enter a function and a starting guess and get the root of f(x) = 0 by Newton's method, with the full iteration table (xₙ, f(xₙ), f′(xₙ), xₙ₊₁), the observed order of convergence, a graph with each tangent step drawn, and the secant and bisection methods alongside for comparison. When a run fails — a zero derivative, a cycle, a runaway — it says why. Free, no sign-up.

Use + − * / ^ and brackets. To solve g(x) = h(x), enter g(x) − h(x). Functions: sin, cos, tan, exp, ln, log (base 10), sqrt, abs and more. Constants: pi and e.

Results

1.414213562

Root estimate

4.44E-16

|f(root)|

5

Iterations

the step fell below the tolerance

Stopped because

The formula

xₙ₊₁ = xₙ − f(xₙ) / f′(xₙ), with f′(x) = 2x

Iteration table

nxₙf(xₙ)f′(xₙ)xₙ₊₁|xₙ₊₁ − xₙ|
01-121.55E-1
11.50.2531.4166666678.33E-2
21.4166666670.0069444444442.8333333331.4142156862.45E-3
31.4142156860.0000060073048832.8284313731.4142135622.12E-6
41.4142135620.0000000000045106141042.8284271251.4142135621.59E-12

Convergence

Observed order of convergence ≈ 2. Newton's method has order 2 at a simple root (the number of correct digits roughly doubles each step), the secant method about 1.62, and bisection 1 (one more bit per step).

The three methods side by side

MethodRoot|f(root)|StepsOutcome
Newton's method1.4142135624.44E-165the step fell below the tolerance
Secant method——1f is not defined
Bisection1.4142135622.32E-1028the step fell below the tolerance

Secant uses x₁ = 1.5; bisection uses the bracket [1.4, 1.425] (found near x₀ if you gave none).

Graph

  • y = f(x)
Graph of f(x) with the Newton's method iterates marked on the x-axis0.60.811.21.41.61.82-2-1012xyx ≈ 1.41421

How to Use the Newton's Method Calculator

  1. 1. Type f(x). The calculator solves f(x) = 0. To solve cos x = x, enter cos(x) - x. Newton's method needs the derivative, and the calculator finds it symbolically.
  2. 2. Choose a method and a starting guess. Newton's method needs one guess x₀ near the root, the secant method two guesses, and bisection a bracket [a, b] where f changes sign.
  3. 3. Set the tolerance. The run stops when the step is smaller than the tolerance (relative to the size of x).
  4. 4. Read the table, the notes and the graph. Each row is one iteration. The graph draws each tangent line that Newton's method follows to the x-axis.

The Three Methods

MethodUpdateOrderNeeds
Newtonxₙ₊₁ = xₙ − f(xₙ)/f′(xₙ)2 at a simple rootf′ and one guess
Secantxₙ₊₁ = xₙ − f(xₙ)(xₙ − xₙ₋₁)/(f(xₙ) − f(xₙ₋₁))about 1.62two guesses
Bisectionkeep the half of [a, b] where f changes sign1 (one bit per step)a sign-changing bracket

Newton's method replaces the curve by its tangent line at xₙ and takes the tangent's x-intercept as the next guess. Near a simple root the number of correct digits roughly doubles each step. The secant method does the same with a line through the last two points, needing no derivative. Bisection is slow but cannot fail once a root is bracketed. See Burden and Faires, Numerical Analysis, chapter 2, for the derivations and convergence proofs.

Worked Example: √2 as the Root of x² − 2

Here f(x) = x² − 2 and f′(x) = 2x. Starting at x₀ = 1:

nxₙf(xₙ)f′(xₙ)xₙ₊₁
01−121.5
11.50.2531.416666667
21.4166666670.0069444442.8333333331.414215686
31.4142156860.0000060072.8284313731.414213562
41.4142135624.5×10⁻¹²2.8284271251.414213562

The error falls from 0.4 to 0.09 to 0.002 to 2×10⁻⁶ to 1.6×10⁻¹², roughly squaring each time, and the observed order comes out at 2.000. Run on the same problem, the secant method (from 1 and 2) needs 7 steps and bisection on [1, 2] needs 33 to reach the same tolerance of 10⁻¹⁰. Starting Newton's method from x₀ = 1 on cos x − x also finds the root 0.7390851332 in 5 steps.

When Newton's Method Fails

  • Zero derivative. Starting x² − 2 at x₀ = 0 gives f′(0) = 0, so the tangent is horizontal and never meets the axis. Move the guess.
  • A cycle. x³ − 2x + 2 from x₀ = 0 jumps 0 → 1 → 0 → 1 forever. Bisection cannot cycle.
  • Runaway. arctan x from x₀ = 2 overshoots further every step and escapes to infinity.
  • Leaving the domain. From x₀ = 5, ln x lands on a negative number after one step.
  • A multiple root. For (x − 1)² the iterates converge, but only linearly, halving the error each time (34 steps for 10⁻¹⁰). The notes under the table report the ratio and the multiplicity it implies; applying Newton's method to f/f′ restores fast convergence.

Frequently Asked Questions

How do you use Newton's method step by step?
Pick a guess x₀ near the root, compute f(x₀) and f′(x₀), and set x₁ = x₀ − f(x₀)/f′(x₀). Repeat with x₁, and so on, until successive guesses agree to the accuracy you need. The iteration table shows each of these computations.
How do I choose a good starting guess?
Look at the graph and pick a point close to where the curve crosses the x-axis, on the side where the curve is steep and not near a flat spot (a point where f′ ≈ 0). A guess near a turning point sends the first step far away.
Why does Newton's method sometimes not converge?
Because it depends on the tangent line being a good stand-in for the curve. A flat tangent, a curve that bends sharply between the guess and the root, or a root that does not exist can send the iterates to the wrong place, round in a circle or off to infinity. The calculator names which of these happened.
When should I use bisection or the secant method instead?
Use bisection when you can bracket a sign change and need a guarantee: it always converges, though slowly. Use the secant method when f′ is awkward or expensive; it needs no derivative and still converges fast. The side-by-side table runs all three on your function.
What does the order of convergence mean?
If each error is about the previous error raised to the power p, the method has order p. Order 2 (Newton's, at a simple root) doubles the number of correct digits each step; order 1 (bisection, or Newton at a multiple root) gains a fixed amount per step. The tool estimates p from the last three steps.
Can it find complex roots or all roots at once?
No. It finds one real root near your starting guess. To find another root, change the starting guess; the graph helps you see where the curve crosses the axis. For the roots of a quadratic, the Quadratic Equation Solver gives them all exactly, including complex ones.

Related Tools

More in Math Calculators

See all Math Calculators