Newton’s Method Calculator (Free, with Iteration Table)

CalculusFreeNo sign-up

A Newton’s method calculator finds a root of f(x) = 0 by repeating xn+1 = xn − f(xn)/f′(xn). For f(x) = x³ − 2x − 5 starting at x₀ = 2: f(2) = −1 and f′(2) = 10, so x₁ = 2 + 0.1 = 2.1. Three more steps give the root x ≈ 2.09455148.

Newton’s method calculator with iteration table
Reads asReads asf(x) = x3 − 2x − 5
Type x^3 for x³, 2x for 2·x, sqrt(x), e^x, ln(x), sin(x), cos(x). For a root of an equation such as cos x = x, enter cos(x) − x.
Try:
Root found by Newton’s method
x ≈ 2.09455148

Starting from x₀ = 2, Newton’s method reaches the root x ≈ 2.09455148 of f(x) = x³ − 2x − 5 after 4 iterations. Check: f(2.09455148) ≈ −8.9 × 10⁻¹⁶.

Root x2.09455148
Iterations4
f(root)−8.9 × 10⁻¹⁶
Derivative f′(x)3x2 − 2
Stopped becausestep < 10⁻⁸
Newton’s formula for this functionxₙ₊₁ = xₙ − (x³ − 2x − 5) / (3x² − 2)
n xₙ f(xₙ) f′(xₙ) xₙ₊₁ |xₙ₊₁ − xₙ|
0 2 −1 10 2.1 0.1
1 2.1 0.061 11.23 2.0945681211 0.00543
2 2.0945681211 0.000185723 11.1616 2.0945514817 1.7 × 10⁻⁵
3 2.0945514817 1.74 × 10⁻⁹ 11.1614 2.09455148154 1.6 × 10⁻¹⁰
1.822.22.4−4−224x₄ = 2.09455root ≈ 2.0945515
Step 4 of 4
f(x) = x³ − 2x − 5tangent line at xₙnext guess xₙ₊₁ (where the tangent meets the x-axis)
Compare with the bisection method
Bisection interval[2, 3]
Bisection iterations27
Newton iterations4
Bisection root2.09455148
10⁰10⁻²10⁻⁴10⁻⁶10⁻⁸10⁻¹⁰03691215182124iteration
Newton: error |xₙ − root|Bisection: error |midpoint − root|

Using an automatic interval around the root, bisection needs 27 halvings to reach the same tolerance; Newton’s method needed 4. Bisection gains about one binary digit per step, while Newton roughly doubles the number of correct digits near a simple root. Bisection, however, never fails once f(a) and f(b) have opposite signs.

Bisection table (27 rows)
k a b midpoint c f(c) half-width
1 2 3 2.5 5.625 0.5
2 2 2.5 2.25 1.891 0.25
3 2 2.25 2.125 0.3457 0.125
4 2 2.125 2.0625 −0.3513 0.0625
5 2.0625 2.125 2.09375 −0.008942 0.0313
6 2.09375 2.125 2.109375 0.1668 0.0156
7 2.09375 2.109375 2.1015625 0.07856 0.00781
8 2.09375 2.1015625 2.09765625 0.03471 0.00391
9 2.09375 2.09765625 2.095703125 0.01286 0.00195
10 2.09375 2.095703125 2.0947265625 0.001954 0.000977
11 2.09375 2.0947265625 2.09423828125 −0.003495 0.000488
12 2.09423828125 2.0947265625 2.09448242188 −0.0007708 0.000244
13 2.09448242188 2.0947265625 2.09460449219 0.0005917 0.000122
14 2.09448242188 2.09460449219 2.09454345703 −8.96 × 10⁻⁵ 6.1 × 10⁻⁵
15 2.09454345703 2.09460449219 2.09457397461 0.0002511 3.1 × 10⁻⁵
16 2.09454345703 2.09457397461 2.09455871582 8.07 × 10⁻⁵ 1.5 × 10⁻⁵
17 2.09454345703 2.09455871582 2.09455108643 −4.41 × 10⁻⁶ 7.6 × 10⁻⁶
18 2.09455108643 2.09455871582 2.09455490112 3.82 × 10⁻⁵ 3.8 × 10⁻⁶
19 2.09455108643 2.09455490112 2.09455299377 1.69 × 10⁻⁵ 1.9 × 10⁻⁶
20 2.09455108643 2.09455299377 2.0945520401 6.23 × 10⁻⁶ 9.5 × 10⁻⁷
21 2.09455108643 2.0945520401 2.09455156326 9.12 × 10⁻⁷ 4.8 × 10⁻⁷
22 2.09455108643 2.09455156326 2.09455132484 −1.75 × 10⁻⁶ 2.4 × 10⁻⁷
23 2.09455132484 2.09455156326 2.09455144405 −4.18 × 10⁻⁷ 1.2 × 10⁻⁷
24 2.09455144405 2.09455156326 2.09455150366 2.47 × 10⁻⁷ 6.0 × 10⁻⁸
25 2.09455144405 2.09455150366 2.09455147386 −8.58 × 10⁻⁸ 3.0 × 10⁻⁸
26 2.09455147386 2.09455150366 2.09455148876 8.05 × 10⁻⁸ 1.5 × 10⁻⁸
27 2.09455147386 2.09455148876 2.09455148131 −2.63 × 10⁻⁹ 7.5 × 10⁻⁹
Show steps
  1. DerivativeDifferentiate f(x) = x3 − 2x − 5: f′(x) = 3x2 − 2
  2. Sum and difference ruled/dx[x3 − 2x − 5] = d/dx[x3] − d/dx[2x] − d/dx[5]
  3. Power ruled/dx[x3] = 3·x2 = 3x2
  4. Constant multiple ruled/dx[2x] = 2·1 = 2
  5. Constant ruled/dx[5] = 0
  6. Formulaxₙ₊₁ = xₙ − f(xₙ) / f′(xₙ): follow the tangent line at xₙ down to the x-axis.
  7. Iteration 1x₁ = 2 − (−1) / (10) = 2.1
  8. Iteration 2x₂ = 2.1 − (0.061) / (11.23) = 2.0945681211
  9. Iteration 3x₃ = 2.0945681211 − (0.00018572317) / (11.161647) = 2.0945514817
  10. RepeatKeep going with the same formula; the table shows every iteration.
  11. StopStop when |xₙ₊₁ − xₙ| < 10⁻⁸. Root x ≈ 2.09455148, and f(x) ≈ −8.9 × 10⁻¹⁶.

Next: see the derivative step by step · solve the equation exactly · graph f(x)

Newton’s Method Calculator (Free, with Iteration Table)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the Newton’s method calculator

  1. Type the function f(x). To solve an equation such as cos x = x, move everything to one side and enter cos(x) − x.
  2. Enter a starting value x₀ close to where you expect the root. A quick look at the graph helps.
  3. Choose the tolerance, what must be small to stop (the step size, |f(x)|, or both) and the maximum number of iterations, then press Run iterations.
  4. Read the root, the iteration table and any warning. Use Prev, Next and Play under the graph to watch each tangent line, and compare with bisection below it.

You never have to type the derivative: the calculator differentiates f(x) symbolically and shows the rules it used.

How Newton’s method works

At the current guess xn, draw the tangent line to the graph of f. Its equation is y = f(xn) + f′(xn)(x − xn). Set y = 0 and solve for x: the tangent meets the x-axis at

xn+1 = xn − f(xn) / f′(xn)

Near a simple root the tangent line is an excellent stand-in for the curve, so each new guess is much closer than the last. In practice the number of correct digits roughly doubles with every step. This is called quadratic convergence.

Worked example: √2 with Newton’s method

√2 is the positive root of f(x) = x² − 2, with f′(x) = 2x. The formula simplifies to xn+1 = xn − (xn² − 2)/(2xn). Start at x₀ = 1.

n xn f(xn) f′(xn) xn+1
0 1 −1 2 1.5
1 1.5 0.25 3 1.4166666667
2 1.4166666667 0.0069444444 2.8333333333 1.4142156863
3 1.4142156863 0.0000060073 2.8284313725 1.4142135624

After four steps x = 1.4142135624, and √2 = 1.41421356237… The number of correct digits went 1, 3, 6, 12.

Doing it without a calculator

With fractions, the √2 example stays exact: x₁ = 3/2, then x₂ = 3/2 − (1/4)/3 = 17/12, then x₃ = 17/12 − (1/144)/(17/6) = 577/408. 577/408 = 1.4142156…, already within 0.000003 of √2. The same pattern works for any square root √a with xn+1 = (xn + a/xn)/2.

Stopping criteria

  • Step size: stop when |xn+1 − xn| is below the tolerance. This is the usual choice and the default here.
  • Residual: stop when |f(xn+1)| is below the tolerance. Useful when you care about how nearly the equation holds, but a very steep function can have a small step with a large f value, and a very flat one the reverse.
  • Both: the safest choice for homework checks.
  • Maximum iterations: always set a limit, because Newton’s method can fail to converge.

When Newton’s method fails

Problem Example What happens
Horizontal tangent x² − 2 from x₀ = 0 f′(0) = 0, so the formula divides by zero.
Cycle x³ − 2x + 2 from x₀ = 0 x₁ = 1 and x₂ = 0 again; the guesses bounce forever.
Divergence arctan x from x₀ = 1.5 Each tangent overshoots further: about −1.69, 2.32, −5.11, 32.3, …
No real root x² + 1 The guesses wander and never settle.
Repeated root (x − 1)² from x₀ = 3 It converges, but only halves the error each step (2, 1.5, 1.25, …).

The fix is almost always a better starting value. If you cannot find one, use bisection to get close first, then switch to Newton.

Newton’s method vs the bisection method

Bisection keeps an interval [a, b] where f(a) and f(b) have opposite signs and halves it every step. It always works once you have such an interval, but it gains only about one binary digit per step. For x³ − 2x − 5 on [2, 3] with tolerance 10⁻⁸, bisection needs 27 steps; Newton’s method from x₀ = 2 needs 4. Bisection cannot find a root where the graph only touches the axis, such as (x − 1)², because there is no sign change. The calculator runs both and plots their errors on a log scale.

Newton’s Method practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is the Newton’s method update formula?

Found a mistake? Let us know!

2. Use f(x) = x² − 5 and x₀ = 2. What is x₁?

Found a mistake? Let us know!

3. Use f(x) = x³ − x − 1 and x₀ = 1. What is x₁?

Found a mistake? Let us know!

4. Why does Newton’s method fail for f(x) = x² − 4 starting at x₀ = 0?

Found a mistake? Let us know!

5. For f(x) = x³ − 2x + 2 starting at x₀ = 0, what happens?

Found a mistake? Let us know!

6. Applying Newton’s method to x² − 3 from x₀ = 3/2 gives x₁ as a fraction. What is it?

Found a mistake? Let us know!

7. Near a simple root, how does Newton’s method typically converge?

Found a mistake? Let us know!

8. Which method is guaranteed to converge once f(a) and f(b) have opposite signs?

Found a mistake? Let us know!

9. Newton’s method on f(x) = (x − 2)² converges slowly. Why?

Found a mistake? Let us know!

10. Bisection starts with an interval of width 1 and halves it every step. After how many steps is the width smaller than 0.001 for the first time?

Found a mistake? Let us know!

Frequently asked questions

What is Newton's method?

Newton's method (also called the Newton-Raphson method) is a way to approximate a root of f(x) = 0. You start with a guess, follow the tangent line to where it crosses the x-axis, and repeat until the guesses stop changing.

What is the Newton-Raphson formula?

xn+1 = xn − f(xn)/f′(xn). For √2 with f(x) = x² − 2 and x₀ = 1, the first step gives 1 − (−1)/2 = 1.5, and the next gives 1.4166667.

How do you do Newton's method on a calculator such as the TI-84?

Type the starting value and press ENTER. Then type ANS − f(ANS)/f′(ANS) using your function, for example ANS − (ANS² − 2)/(2ANS), and press ENTER repeatedly. Each press gives the next xn; stop when the digits you need no longer change.

How do you do Newton's method without a calculator?

Use fractions and simple functions. For x² − 2 from x₀ = 1 you get 3/2, 17/12 and 577/408, which is already within 0.000003 of √2.

Is Newton's method on the AP Calculus exam?

Newton's method is a standard application of the derivative in calculus textbooks, built on the tangent-line (linear) approximation. Whether a particular exam tests it depends on that exam's current course description, so check the official AP Calculus course description or your teacher's syllabus.

Is Newton's method useful, and does it always converge?

It is one of the most used root-finding methods in science and engineering because it is so fast near a root; calculators and computers use versions of it for square roots and for solving equations. It does not always converge: a flat tangent, a poor starting value, a cycle or a missing real root can all make it fail, which is why the calculator warns you.

Related calculators

More calculus calculators

Browse all 541 calculators

Related to This Article

What people say about "Newton’s Method Calculator With Iteration Table"?

No one replied yet.

Leave a Reply