How to use the Newton-Raphson Method Calculator
- 1. Enter f(x)Type the function, for example x^3 - 2x - 5. Add f′(x) if you have it.
- 2. Pick x₀ and toleranceStart near the root. The method stops when two values differ by less than the tolerance.
- 3. Read the tableEach row shows xₙ, f(xₙ), f′(xₙ) and the next value.
The Newton-Raphson formula
Newton-Raphson replaces the curve by its tangent at xₙ and takes the point where the tangent cuts the x-axis: xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ). Near a simple root the number of correct digits roughly doubles each step, which is why it is the go-to root-finding method.
If you leave f′(x) blank, the tool uses a central difference [f(x + h) − f(x − h)]/2h with a tiny h. The answer is the same to the shown digits.
Worked example
Solve x³ − 2x − 5 = 0 with x₀ = 2, the classic example Newton himself used. Here f′(x) = 3x² − 2.
Step 1: f(2) = −1, f′(2) = 10, so x₁ = 2 − (−1/10) = 2.1. Step 2: f(2.1) = 0.061, f′(2.1) = 11.23, so x₂ = 2.1 − 0.061/11.23 = 2.0945681. Step 3 gives x₃ = 2.0945515, and step 4 changes nothing at seven decimals. The root is x ≈ 2.0945515, found in 4 iterations.
When it fails
The method can go wrong if f′(x) is close to 0 (the tangent is nearly flat), if x₀ is far from the root, or if the function has several roots close together. The tool stops and tells you if f′ is zero or the values run away. A safe fix is to bracket the root first with the bisection method, then use that value as x₀ here.
Frequently asked questions
How many iterations does Newton-Raphson need?
Usually 3 to 6 for six-decimal accuracy when you start reasonably close to a simple root.
Do I have to enter the derivative?
No. Leave it blank and the tool estimates f′(x) numerically. Entering it matches your textbook working exactly.
Can I use sin, log and exp?
Yes. Use sin(x), cos(x), exp(x), ln(x) for natural log and log(x) for base 10. Angles are in radians.
Is this calculator free?
Yes. You enter your name and WhatsApp number once when you see your result, and other Uncodemy tools then open without the form.