Skip to content
Omnikalc

Newton's method calculator: find a root with tangent steps

Enter the coefficients of a cubic and a starting guess to see the first Newton iterations and the root after six steps.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Root after 6 iterations

2.09455148

The iteration has converged to a root
f at the root (should be close to 0)
0.0000000000
Iterations that still changed the value
3
First iteration x₁
2.100000
Second iteration x₂
2.094568
Third iteration x₃
2.09455148

Newton’s method is the fastest everyday way to solve an equation that has no neat formula. Starting from a guess, it repeatedly slides down the tangent line to a better guess. This calculator applies the method to a cubic polynomial a·x³ + b·x² + c·x + d, shows the first iterations, and returns the root after six steps with the value of f there.

How the calculation works

  • f(x) = a·x³ + b·x² + c·x + d
  • f′(x) = 3a·x² + 2b·x + c
  • Step xₙ₊₁ = xₙ − f(xₙ) ÷ f′(xₙ)
  • Result = x₆, the value after six iterations
  • Check = f(x₆), which should be close to zero

If the slope at a point is zero, the iteration stays where it is rather than divide by zero.

Example

The classic equation x³ − 2x − 5 = 0 (a = 1, b = 0, c = −2, d = −5) starting from x₀ = 2: the first step gives x₁ = 2.1, the second x₂ = 2.094568, and the third x₃ = 2.09455148. After six iterations, the root is 2.09455148 to eight decimals, f there is about 0, and 3 iterations still changed the value.

Why it matters

Newton’s method is behind the square-root function on calculators, the solvers in spreadsheets and the optimization in machine learning. It converges very quickly near a root, which is why a handful of steps is enough, but it needs a reasonable starting guess. Seeing each iteration shows why.

Good to know

A starting guess near a flat part of the curve can send the iteration far away. A cubic can have up to three real roots: different starting values lead to different ones. If the iteration does not converge, try another starting value, or bracket the root first with a sign change. This tool is for education.

The cubic equation calculator gives all the roots at once, the quadratic equation calculator solves degree two, and the definite integral calculator works with the same polynomial.

Frequently asked questions

What is Newton's method?

Newton's method finds a root of f(x) = 0 by repeating xₙ₊₁ = xₙ − f(xₙ) ÷ f′(xₙ). Each step replaces the curve by its tangent line at the current point and moves to where that line crosses zero. Near a simple root the number of correct digits roughly doubles with each step.

Why does it sometimes fail?

If the starting guess is near a point where the slope is zero, the step becomes huge or undefined, and the iteration can jump to another root, cycle or diverge. A double root makes the convergence slow. Try a different starting value or look at the graph.

How many iterations does it show?

It shows six iterations, which is enough for most well-behaved cubics. The count of iterations that still changed the value tells you when it settled: if all six did, the iteration may need more steps or a better start.

Can I use it for other functions?

This calculator handles a cubic polynomial a·x³ + b·x² + c·x + d. Set a = 0 for a quadratic, and a = b = 0 for a line. For square roots, use f(x) = x² − N by setting a = 0, b = 1, c = 0 and d = −N.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.