Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics, Econometrics and Research Methods book
Mathematics

Newton–Raphson Method: Finding an Investment’s IRR Step by Step

Solar panels cost $8,000 and save $2,000 a year. What return do they earn? Use the Newton–Raphson method to find the IRR in three quick steps.

In 30 seconds
  • The Newton–Raphson method finds a root of \( f(x) = 0 \) by repeatedly sliding down the tangent line: \( x_{n+1} = x_n-\dfrac{f(x_n)}{f'(x_n)} \).
  • It is the standard tool for an internal rate of return (IRR), because the IRR equation is usually a polynomial of high degree with no formula for its roots.
  • Case: solar panels costing $8,000 that save $2,000 a year for five years have an IRR of about 7.93%. Newton–Raphson gets there in three steps; simple fixed-point iteration needs about 25.
  • Near a root, the number of correct digits roughly doubles with every step. Far from a root, or near a turning point, the method can wander or fail.
  • Exam point: Newton–Raphson is not in the Cambridge 9709 syllabus, which tests sign changes and \( x_{n+1} = F(x_n) \); it does appear in some other A level specifications.

The case: is the solar investment worth it?

A community centre is offered rooftop solar panels for $8,000. The installer estimates they will cut the electricity bill by $2,000 a year for five years, after which the centre plans to review the system. (These figures are illustrative.) The centre could instead borrow or keep its money in the bank at 6% a year. The treasurer wants one number to compare with that 6%: the rate of return the panels themselves earn.

That number is the internal rate of return, the discount rate \( r \) at which the money out and the money in balance exactly in today’s terms. Each saving is discounted by \( (1 + r) \) for every year you wait for it, so the IRR solves

\[ -8000 + \frac{2000}{1 + r} + \frac{2000}{(1 + r)^2} + \cdots + \frac{2000}{(1 + r)^5} = 0. \]

The left-hand side is the project’s net present value (NPV) at rate \( r \).[3] Try a couple of values. At \( r = 5\% \) the NPV is about $659, so the project beats 5%. At \( r = 10\% \) it is about −$418, so it falls short of 10%. The IRR is somewhere in between. But where, exactly? There is no neat algebraic step that isolates \( r \), so we need a method that homes in on it.

The concept: following the tangent to the root

Write \( x = 1 + r \), multiply the NPV equation through by \( x^5 \) and divide by \(-2000\). The equation becomes a polynomial:

\[ g(x) = 4x^5-x^4-x^3-x^2-x-1 = 0. \]

This is a quintic, and there is no general formula for the roots of a quintic. So we guess, and then improve the guess.

Here is the idea. Stand on the curve \( y = g(x) \) at your current guess \( x_n \). Close up, a smooth curve looks almost straight, so replace it by its tangent line there. A straight line is easy to solve: just find where the tangent crosses the \( x \)-axis. Call that point \( x_{n+1} \). It is usually much closer to the root than \( x_n \) was. Repeat from the new point, and the guesses close in on the root very fast.[1]

Key termNewton–Raphson method: an iterative method for solving \( f(x) = 0 \) in which each new estimate is the point where the tangent to \( y = f(x) \) at the previous estimate meets the \( x \)-axis. It is also called Newton’s method.

The tangent at \( (x_n, f(x_n)) \) has gradient \( f'(x_n) \), so its equation is \( y-f(x_n) = f'(x_n)(x-x_n) \). Setting \( y = 0 \) and solving for \( x \) gives the formula.[2]

\[ x_{n+1} = x_n-\frac{f(x_n)}{f'(x_n)} \]

Here \( x_n \) is the current estimate of the root, \( f(x_n) \) is the value of the function there (how far the curve is from the axis), \( f'(x_n) \) is the gradient of the curve there, and \( x_{n+1} \) is the improved estimate. The method needs a starting value \( x_1 \) and requires \( f'(x_n) \ne 0 \).

Mathematics Made Simple textbook coverChapter 17 of Mathematics Made Simple teaches numerical methods, from sign changes to iteration, with worked examples.Get the textbook · $12

Why this formula fits the case

Three features of the IRR problem make Newton–Raphson a natural choice. First, the equation has no closed-form solution, so some numerical method is unavoidable. Second, \( g(x) \) is a polynomial, so its derivative is easy to write down: \( g'(x) = 20x^4-4x^3-3x^2-2x-1 \). Third, we have a good starting guess: we already know the IRR lies between 5% and 10%, so \( x_1 = 1.1 \) is close.

The simpler alternative is fixed-point iteration. Rearrange the NPV equation as \( r = 0.25\left(1-(1 + r)^{-5}\right) \) and use \( r_{n+1} = 0.25\left(1-(1 + r_n)^{-5}\right) \). It does converge, because the gradient of the right-hand side near the root is about 0.79, which is less than 1. But that also means each step only removes about 21% of the error. Starting from 10%, it gives 9.48%, 9.10%, 8.83%, … and takes about 25 steps to settle at 7.93%. Newton–Raphson, as you will see, needs three.

When is Newton–Raphson not the tool? When the derivative is hard to find or expensive to compute, when you have no idea where the root is, or when the curve has a turning point near your guess. In those cases a bracketing method (such as repeated halving of an interval with a sign change) is slower but safer.

Setting it up

QuantityMeaningIn the case
\( x \)Unknown\( 1 + r \), the growth factor per year
\( g(x) \)Function whose root we want\( 4x^5-x^4-x^3-x^2-x-1 \), a rescaled NPV
\( g'(x) \)Gradient\( 20x^4-4x^3-3x^2-2x-1 \)
\( x_1 \)Starting value1.1 (a 10% guess)
Stopping ruleWhen to stopWhen two estimates agree to the accuracy needed, then confirm with a sign change

Two practical points. The rescaling does not move the root, because we only multiplied by \( x^5 \), which is positive, and by a constant. And you should keep full calculator accuracy between steps, writing down rounded values only for the record.

Solving it

Worked example

Use the Newton–Raphson method with \( x_1 = 1.1 \) to find the IRR of the solar panels correct to two decimal places of a percent.

Step 1At \( x_1 = 1.1 \): \( g(1.1) \) \( = 4(1.61051) \) \(-1.4641 \) \(-1.331 \) \(-1.21 \) \(-1.1 \) \(-1 \) \( = 6.44204-6.1051 \) \( = 0.33694 \).
Step 2\( g'(1.1) \) \( = 20(1.4641) \) \(-4(1.331) \) \(-3(1.21) \) \(-2(1.1) \) \(-1 \) \( = 29.282-5.324-3.63-2.2-1 \) \( = 17.128 \).
Step 3\( x_2 \) \( = 1.1-\dfrac{0.33694}{17.128} \) \( = 1.1-0.019672 \) \( = 1.080328 \).
Step 4\( g(x_2) = 0.015805 \) and \( g'(x_2) = 15.5374 \), so \( x_3 \) \( = 1.080328-\dfrac{0.015805}{15.5374} \) \( = 1.079311 \).
Step 5\( g(x_3) = 0.0000405 \) and \( g'(x_3) = 15.4578 \), so \( x_4 \) \( = 1.079311-0.0000026 \) \( = 1.079308 \).
Step 6\( x_3 \) and \( x_4 \) agree to five decimal places, so \( r = x-1 \approx 0.0793 \), an IRR of about 7.93%.
Step 7Check with a sign change: \( g(1.07925) \approx -0.0009 < 0 \) and \( g(1.07935) \approx 0.0006 > 0 \), so the root lies between them and the IRR is 7.93% to 2 d.p.

The panels earn about 7.93% a year, comfortably above the 6% alternative.

Look at the errors. The distance from the true root was about 0.0207 at \( x_1 \), 0.0010 at \( x_2 \), 0.0000026 at \( x_3 \) and less than 0.000000001 at \( x_4 \). Each error is roughly a constant times the square of the one before. That is called quadratic convergence, and it is why the number of correct digits roughly doubles each step.

One Newton–Raphson step on g(x) = 4x⁵ − x⁴ − x³ − x² − x − 1
g(x)tangent at x₁ = 1.1
1.041.051.061.071.081.091.11.111.12−0.6−0.4−0.200.20.40.6x = 1 + rg(1.1, 0.337)x₂ ≈ 1.0803root 1.0793
Figure 1. Newton–Raphson replaces the curve by its tangent at x₁ = 1.1 and slides down to where the tangent meets the axis, x₂ ≈ 1.0803. That single step already lands within about 0.001 of the root, x ≈ 1.0793.

Exam questions usually give a plain cubic rather than a cash-flow problem, but the routine is the same.

Worked example

The equation \( x^3-3x-5 = 0 \) has one real root. Use Newton–Raphson with \( x_1 = 2 \) to find it correct to 3 decimal places.

Step 1\( f(x) = x^3-3x-5 \), \( f'(x) = 3x^2-3 \), so \( x_{n+1} = x_n-\dfrac{x_n^3-3x_n-5}{3x_n^2-3} \).
Step 2\( f(2) = 8-6-5 = -3 \), \( f'(2) = 9 \): \( x_2 = 2 + \dfrac{3}{9} = 2.333333 \).
Step 3\( f(x_2) = 0.703704 \), \( f'(x_2) = 13.333333 \): \( x_3 \) \( = 2.333333-0.052778 \) \( = 2.280556 \).
Step 4\( f(x_3) = 0.019351 \), \( f'(x_3) = 12.602801 \): \( x_4 \) \( = 2.280556-0.001535 \) \( = 2.279020 \).
Step 5\( x_5 = 2.279019 \), which agrees with \( x_4 \) to 5 d.p.
Step 6Sign check: \( f(2.2785) \approx -0.0065 < 0 \) and \( f(2.2795) \approx 0.0061 > 0 \). The root is 2.279 to 3 d.p.

Four steps from a rough start of 2 give the root to six figures.

Mathematics Made Simple Practice Questions coverPractise iteration until it is automatic: the Practice Questions book has 1,565 questions with full working.Get 1,565 questions · $9

What the answer tells us

In the case’s terms. An IRR of 7.93% means the panels repay the $8,000 and, on top, earn a return equivalent to 7.93% a year on the money tied up in them. Since the centre’s alternative is 6%, the investment adds value. Figure 2 shows the same decision another way: at a 6% discount rate the NPV is positive.

NPV of the solar panels at different discount rates $
NPV(r) = −8000 + 2000 × annuity factor
2468101214161820−2500−2000−1500−1000−50050010001500200025000r (%)NPVIRR ≈ 7.93%r = 5%: NPV ≈ $659r = 10%: NPV ≈ −$418
Figure 2. NPV falls as the discount rate rises. The IRR is the rate where the curve crosses zero: about 7.93%. Below it the project adds value; above it, it destroys value.

Is it reasonable? Five payments of $2,000 total $10,000, which is $2,000 more than the cost, so the return must be positive. A rough check: the average amount tied up over five years is about half of $8,000, and $2,000 of profit over five years is $400 a year on roughly $4,000, about 10%. Discounting pulls the true figure below that, so 7.93% is the right order of size.

Sensitivity. The IRR depends heavily on the savings estimate. If the panels saved $1,800 a year instead of $2,000, the same Newton–Raphson routine gives an IRR of about 4.1%, below the 6% hurdle, and the decision flips. A small spreadsheet that reruns the iteration for different savings figures is worth more to the treasurer than the single answer.

When Newton–Raphson goes wrong

The method is fast, but it is not foolproof. Take \( f(x) = x^3-3x-5 \) again.

  • Starting at a turning point. With \( x_1 = 1 \), \( f'(1) = 3-3 = 0 \). The tangent is horizontal and never meets the axis, so the formula asks you to divide by zero.
  • Starting on the wrong side of a turning point. With \( x_1 = 0 \), the iterates go −1.67, −0.80, −3.66, −2.50, … They bounce around the two turning points for nearly twenty steps, are thrown out to about 58, and only then come back to 2.279. A poor start wastes effort or, for some functions, never converges at all.
  • Several roots. If cash flows change sign more than once (say a big clean-up cost at the end), the NPV equation can have more than one IRR. Newton–Raphson finds whichever root your starting value happens to lead to, so always sketch the NPV curve first.
Common mistakeRounding between steps. If you round \( x_2 \) to 1.08 before the next step in the IRR example, you throw away most of what the first step gained. Keep the full value in your calculator (use the ANS key) and round only what you write down.
Common mistakeStopping because two iterates look the same. Agreement suggests you are close, but it does not prove the accuracy. For a final answer to 3 d.p., show a sign change across the interval from 0.0005 below to 0.0005 above your answer.
Exam tipNewton–Raphson is not in the Cambridge 9709 syllabus. Papers 2 and 3 test locating roots by a change of sign and fixed-point iteration \( x_{n+1} = F(x_n) \), including showing a root is correct to a given accuracy.[4] It is not a named topic in AP Calculus either, although its key idea, the tangent-line approximation, is. If your course does include it (for example, some UK A level specifications), set out the formula with \( f \) and \( f’ \) written in full, give each iterate to the stated number of places, and finish with a sign-change check.

For a clear path from sign changes to iteration and convergence, the Mathematics Made Simple textbook covers numerical methods in Chapter 17, and Appendix B links the maths to economics. To practise, the Mathematics Made Simple practice book has iteration questions with every iterate shown.

Mathematics Made Simple bundle coverNumerical methods, calculus and economics maths in one place: both books for $16.Both books · $16

Practice questions

Use a calculator and keep full accuracy between steps.

EasyQ1. Use Newton–Raphson on \( f(x) = x^2-7 \) with \( x_1 = 3 \) to find \( x_2 \) and \( x_3 \). Compare with \( \sqrt{7} \). Show worked answer
\( f'(x) = 2x \). \( x_2 \) \( = 3-\dfrac{9-7}{6} \) \( = 3-\dfrac{1}{3} \) \( = 2.666667 \).
\( x_3 \) \( = 2.666667-\dfrac{7.111111-7}{5.333333} \) \( = 2.666667-0.020833 \) \( = 2.645833 \).
\( \sqrt{7} = 2.645751 \), so \( x_3 \) is already correct to 3 d.p.
EasyQ2. Show that Newton–Raphson applied to \( f(x) = x^2-a \) gives \( x_{n+1} = \tfrac{1}{2}\left(x_n + \dfrac{a}{x_n}\right) \). Use it with \( a = 10 \) and \( x_1 = 3 \) to find \( x_3 \). Show worked answer
\( x_{n+1} \) \( = x_n-\dfrac{x_n^2-a}{2x_n} \) \( = \dfrac{2x_n^2-x_n^2 + a}{2x_n} \) \( = \dfrac{x_n^2 + a}{2x_n} \) \( = \tfrac{1}{2}\left(x_n + \dfrac{a}{x_n}\right) \).
\( x_2 = \tfrac{1}{2}(3 + 3.333333) = 3.166667 \); \( x_3 \) \( = \tfrac{1}{2}(3.166667 + 3.157895) \) \( = 3.162281 \). (\( \sqrt{10} = 3.162278 \).)
MediumQ3. A project costs $1,000 and returns $600 at the end of each of the next two years. (a) Show that its IRR satisfies \( 5x^2-3x-3 = 0 \), where \( x = 1 + r \). (b) Use Newton–Raphson with \( x_1 = 1.1 \) to find \( x_3 \), and compare with the exact root from the quadratic formula. Show worked answer
(a) \( -1000 + \dfrac{600}{x} + \dfrac{600}{x^2} = 0 \). Multiply by \( x^2 \): \( -1000x^2 + 600x + 600 = 0 \); divide by −200: \( 5x^2-3x-3 = 0 \).
(b) \( f'(x) = 10x-3 \). \( x_2 = 1.1-\dfrac{-0.25}{8} = 1.13125 \); \( x_3 \) \( = 1.13125-\dfrac{0.004883}{8.3125} \) \( = 1.130663 \).
Exact: \( x = \dfrac{3 + \sqrt{69}}{10} = 1.130662 \). The IRR is about 13.07%.
MediumQ4. A student applies Newton–Raphson to \( f(x) = x^3-12x + 3 \) with \( x_1 = 2 \). Explain why the method fails. Then start from \( x_1 = 3 \) and find \( x_2 \), \( x_3 \) and \( x_4 \) to 4 d.p. Show worked answer
\( f'(x) = 3x^2-12 \), and \( f'(2) = 0 \): \( x = 2 \) is a turning point, the tangent is horizontal, and the formula divides by zero.
From 3: \( x_2 = 3-\dfrac{-6}{15} = 3.4 \); \( x_3 = 3.4-\dfrac{1.504}{22.68} = 3.3337 \); \( x_4 = 3.3316 \).
ExamQ5. (a) Show that the equation \( \ln x + x-3 = 0 \) has a root between 2 and 3. [2] (b) Show that the Newton–Raphson iteration for this equation can be written \( x_{n+1} = \dfrac{x_n\left(4-\ln x_n\right)}{1 + x_n} \). [3] (c) Using \( x_1 = 2 \), find the root correct to 3 decimal places, showing each iterate to 4 decimal places. [3] Show worked answer
(a) \( f(2) = \ln 2-1 = -0.307 < 0 \) and \( f(3) = \ln 3 = 1.099 > 0 \) [1]. \( f \) is continuous for \( x > 0 \) and changes sign, so there is a root in \( (2, 3) \). [1]
(b) \( f'(x) = \dfrac{1}{x} + 1 = \dfrac{1 + x}{x} \) [1]. \( x_{n+1} \) \( = x_n-\dfrac{(\ln x_n + x_n-3)\,x_n}{1 + x_n} \) [1] \( = \dfrac{x_n + x_n^2-x_n\ln x_n-x_n^2 + 3x_n}{1 + x_n} \) \( = \dfrac{x_n(4-\ln x_n)}{1 + x_n} \). [1]
(c) \( x_2 = 2.2046 \), \( x_3 = 2.2079 \), \( x_4 = 2.2079 \) [2]. Sign check: \( f(2.2075) < 0 \), \( f(2.2085) > 0 \), so the root is 2.208 to 3 d.p. [1]

Frequently asked questions

What is the Newton–Raphson method in simple terms?

It is a way of solving \( f(x) = 0 \) by repeated improvement. From a guess, draw the tangent to the curve and see where it hits the \( x \)-axis; that is your next guess. The formula \( x_{n+1} = x_n-f(x_n)/f'(x_n) \) does this in one line.

How do you calculate IRR with the Newton–Raphson method?

Write the NPV as a function of \( r \) (or of \( x = 1 + r \)), set it equal to zero, differentiate, and iterate from a sensible starting rate such as 10%. Spreadsheet IRR functions use an iterative method of this kind, which is why they let you supply a starting guess.

Why does Newton–Raphson sometimes fail?

It fails if \( f'(x_n) = 0 \), because the tangent is flat. It can also wander or jump to a different root if you start far from the root you want or near a turning point. A quick sketch and a starting value close to the root usually prevent this.

Is Newton–Raphson faster than fixed-point iteration?

Usually, yes. Near a simple root its error is roughly squared each step, while fixed-point iteration only multiplies the error by about \( |F'(\alpha)| \) each step. In the solar case that was three steps against about 25.

References

  1. Burden, R. L., Faires, J. D. and Burden, A. M. (2016). Numerical Analysis, 10th edn, Chapter 2 “Solutions of Equations in One Variable”. Boston: Cengage Learning.
  2. Strang, G. and Herman, E. (2016). Calculus Volume 1, Section 4.9 “Newton’s Method”. Houston: OpenStax. https://openstax.org/details/books/calculus-volume-1
  3. Brealey, R. A., Myers, S. C. and Allen, F. (2020). Principles of Corporate Finance, 13th edn, Chapter 5 on net present value and other investment criteria. New York: McGraw-Hill Education.
  4. Cambridge International Education. Cambridge International AS & A Level Mathematics 9709: syllabus for examination in 2026 and 2027, Pure Mathematics 2 and 3, Numerical solution of equations. cambridgeinternational.org
Mathematics Made Simple complete bundle cover
This topic has a full chapter in Mathematics Made Simple, with 1,565 fully worked practice questions in the bundle.Mathematics Made Simple Complete Bundle — Textbook + 1,565 Practice Questions
Get it for $16
E

The EconTutorials team writes clear, exam-focused lessons in economics and statistics for A-Level, IB, AP and university students, with more than 13 years of classroom teaching behind every guide and book in the Made Simple series.