Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Calculating IRR for Multi-Year Investments

Hello! Welcome back to our journey through real estate investment metrics.

In our last lesson, we focused on Net Present Value (NPV), a metric that tells you in today's euros exactly how much value an investment creates relative to your required rate of return. We answered the question, "Does this investment exceed my target return?"

Today, we'll tackle a related and equally important question: "What is the actual percentage return this investment is projected to generate over its lifetime?" This brings us to your learning outcome for this lesson: to calculate the Internal Rate of Return (IRR) for multi-year investment cash flows. IRR is one of the most frequently cited metrics in real estate, so understanding how to calculate and interpret it is crucial for analyzing deals.

1. What is the Internal Rate of Return (IRR)?

At its core, the Internal Rate of Return is the annualized rate of return that an investment is expected to generate. It considers all cash flows over the entire holding period—your initial investment, the annual cash flows from rent, and the final proceeds from the sale—and accounts for the time value of money.

Conceptually, you can think of IRR as the break-even discount rate. It is the specific discount rate that makes the Net Present Value (NPV) of all cash flows equal to zero. In Spain, you will see IRR referred to as TIR (Tasa Interna de Retorno).

Let's start with a video that provides an excellent high-level introduction to IRR, explaining what it is and how it differs from other metrics you've seen.

How to Calculate Internal Rate of Return (IRR) for Real Estate Investing

This video, 'How to Calculate Internal Rate of Return (IRR) for Real Estate Investing' from Coach Carson, provides a clear definition of IRR and explains its benefits.

Please watch the first section from 00:24 to 04:21. Focus on how IRR differs from metrics like cash-on-cash return and how it incorporates the entire life of the investment.

2. The Relationship Between IRR and NPV

As the video explained, IRR and NPV are deeply connected.

  • NPV takes a discount rate (your required return) and gives you a value in euros.
  • IRR takes the cash flows and gives you a discount rate (the project's intrinsic return).

This leads to a simple and powerful decision rule:

An investment is considered attractive if its Internal Rate of Return (IRR) is greater than your required rate of return (the discount rate you'd use for NPV).

Why? If IRR > Required Return, it mathematically guarantees that NPV > 0. They are two sides of the same coin.

The image below, from a Spanish financial education site, perfectly illustrates this. It shows that the IRR (TIR) is the rate where the NPV (VAN) of the cash flows equals zero. When comparing two projects, the one with the higher IRR is generally preferred, assuming they have similar risk profiles.

Internal Rate of Return (TIR) Explanation and Comparison
This diagram compares two investment alternatives, a bakery (Panadería) and a fruit shop (Frutería). It defines TIR as the discount rate at which the VAN (NPV) is zero and shows that by calculating the TIR for each, you can determine the more profitable option.

3. Calculating IRR with Python

While the concept is straightforward, calculating IRR isn't as simple as plugging numbers into a formula like we did for NPV. It requires solving a polynomial equation to find the rate r where the NPV formula equals zero. This is an iterative process, perfectly suited for a computer.

Given your background, you'll find it much more efficient and scalable to use Python. We'll use the numpy_financial library, just as we did for NPV.

Let's watch a short demonstration on how to use the irr function. This video picks up exactly where the NPV tutorial from our last lesson left off.

How to Use Python & NumPy Financial to Calculate NPV & IRR

This clip from 'How to Use Python & NumPy Financial to Calculate NPV & IRR' by Matt Macarty demonstrates the irr function and proves its connection to NPV.

Watch the segment from 05:41 to 06:42. Notice how the function only needs the list of cash flows and how the presenter validates the result by using the calculated IRR as the discount rate in the NPV function.

Python Implementation

The npf.irr() function is simpler to use than npf.npv() because it takes the entire cash flow series as one argument, including the initial investment at time 0.

Let's use the same cash flow series from our NPV example in the previous lesson:

  • Initial Investment (): -€150,000
  • Future Cash Flows ( to ):
    • Year 1: €5,100
    • Year 2: €5,400
    • Year 3: €5,700
    • Year 4: €6,000
    • Year 5 (Annual CF + Reversion): €995,526

Here is the Python code to calculate the IRR for this investment:

import numpy_financial as npf

# The full cash flow series, including the initial investment (negative) at time 0.
cash_flows = [
    -150000, # C0
    5100,    # C1
    5400,    # C2
    5700,    # C3
    6000,    # C4
    995526   # C5
]

# Calculate the IRR
internal_rate_of_return = npf.irr(cash_flows)

print(f"The Internal Rate of Return (IRR) is: {internal_rate_of_return:.2%}")

# Decision making using IRR
required_return = 0.08 # Our discount rate from the last lesson
if internal_rate_of_return > required_return:
    print(f"The IRR of {internal_rate_of_return:.2%} is greater than the required return of {required_return:.2%}. Project is attractive.")
else:
    print(f"The IRR of {internal_rate_of_return:.2%} is not greater than the required return of {required_return:.2%}. Project should be rejected.")

Output:

The Internal Rate of Return (IRR) is: 45.47%
The IRR of 45.47% is greater than the required return of 8.00%. Project is attractive.

This confirms the conclusion from our NPV analysis, but provides a new, powerful piece of information: the investment is projected to yield an annualized return of 45.47%.

Handling Irregular Cash Flows: XIRR

A common real-world scenario is that cash flows don't occur at perfect yearly intervals. You might pay for the property on March 30, receive your first rent payment on May 1, and so on. The standard IRR function assumes equal time periods between each cash flow.

For irregular timings, you should use a function called XIRR. While Excel has this built-in, in Python you can use a specialized library like pyxirr. This is a practical tool to be aware of as you build more sophisticated models.

How can calculate the special cash flow's irr with excel or ...

This StackExchange thread discusses exactly how to calculate IRR for irregular cash flows in Python. It's a great example of a practical problem solved with code.

Read the top two answers. The first introduces the concept of XIRR and the Python packages xirr and pyxirr. The second provides a concrete code example using pyxirr and pandas, which will be very familiar to you.

4. Pros and Cons of Using IRR

IRR is powerful, but it's not perfect. It's essential to understand its advantages and limitations. For this, we'll return to the Coach Carson video, which provides a balanced view.

How to Calculate Internal Rate of Return (IRR) for Real Estate Investing

This final segment of the Coach Carson video discusses the pros and cons of IRR, which is crucial for its proper use in decision-making.

Watch from 14:22 to the end. Pay close attention to the cons, especially the ability to 'juice' the results by changing assumptions and the unrealistic 'reinvestment rate assumption'.

To summarize the key points from the video:

Pros:

  • Includes All Returns: Accounts for income, appreciation, and loan paydown.
  • Time Value of Money: Properly weighs cash flows based on when they occur.
  • Comparability: As a percentage, it's easy to compare different projects (e.g., Project A's 15% IRR vs. Project B's 12% IRR).

Cons:

  • Reinvestment Rate Assumption: IRR implicitly assumes that all intermediate cash flows are reinvested at the IRR itself. If your IRR is 25%, the formula assumes you can reinvest your annual profits at that same high rate, which is often unrealistic. This can overstate the true return. (A metric called Modified IRR (MIRR), which we'll see later, addresses this).
  • Sensitive to Assumptions: Small changes to the holding period or exit price can dramatically change the IRR, making it easy to manipulate. Always scrutinize the underlying assumptions.
  • Multiple/No IRR: With unconventional cash flows (e.g., a large capital expense midway through the project), it's possible to have multiple valid IRR solutions or none at all.
Test your understanding!

You are analyzing a fix-and-flip project with a very short timeline. The projected cash flows are:

  • Time 0: -€220,000 (Purchase & Renovation Costs)
  • End of Year 1: €265,000 (Net Sale Proceeds)

Your required rate of return for this type of risky, short-term project is 15%.

  1. Using Python, calculate the IRR for this investment.
  2. Based on your calculation, should you accept this project?
Show answer
  1. Python Calculation:

    import numpy_financial as npf
    
    cash_flows = [-220000, 265000]
    irr_result = npf.irr(cash_flows)
    
    print(f"The IRR is: {irr_result:.2%}")
    

    The calculated IRR is 20.45%.

  2. Decision: Yes, you should accept the project. The project's IRR of 20.45% is greater than your required rate of return of 15%. This is equivalent to saying the project has a positive NPV at a 15% discount rate.

Conclusion

You have now added the Internal Rate of Return to your analytical toolkit, giving you a powerful way to measure and compare the total, time-adjusted return of potential real estate deals. By understanding its relationship with NPV and its inherent limitations, you can use it wisely to make better investment decisions.

Key Takeaways:

  • IRR is the annualized rate of return that makes the NPV of an investment equal to zero.
  • It provides a single percentage that represents the total return of a project, accounting for all cash flows and the time value of money.
  • The primary decision rule is: Accept if IRR > Required Rate of Return.
  • In Python, use npf.irr(cash_flows) where cash_flows is a list that includes the initial negative investment.
  • Be mindful of IRR's limitations, particularly the reinvestment rate assumption and its sensitivity to your projected exit value and timeline.

Preview of the Next Lesson:
So far in this module, we've focused on using discounted cash flow analysis (NPV and IRR) to evaluate an investment's profitability. These methods are part of what's called the Income Approach to valuation. In the next module, we will broaden our perspective and explore other ways to determine a property's value. We'll start by learning how to describe the methodology of the Sales Comparison Approach, a fundamental technique used by appraisers that relies on the prices of recently sold, similar properties.

Can't find a good explanation? Sign up and we'll make it for you

Sign up