Internal Rate of Return (IRR) (irrn)
Calculate the Internal Rate of Return (IRR) for a series of cashflows. Get periodic and annual interest rates.
Internal Rate of Return (IRR)
Purpose
The Internal Rate of Return (IRR) function calculates the interest rate at which the net present value of cash inflows equals the net present value of cash outflows.
Use Cases
- Calculating the rate of return on an investment.
- Evaluating the profitability of a project.
How to Use
- Enter the cash flows for each period.
- Select the time interval for the cash flows.
- Click on the calculate button to get the internal rate of return.
Input Values
- Cashflow: Amount of cash flow for each period.
- Description: Enter the cash flow values for each period. (e.g., -40000, 5000, 8000, 12000, 30000)
- Cashflow Interval: Time interval for the cash flows.
- Default unit is year.
Output Values
- Periodic Interest Rate: The calculated internal rate of return in percentage per interval.
- Annual Interest Rate: The calculated internal rate of return in percentage per year.
Any other Instruction
Make sure to enter the correct cash flow values and select the appropriate time interval for accurate results.
Code Analysis
- The function takes cash flow values and cash flow interval as input.
- It calculates the internal rate of return using the numpy financial library.
- The result is returned as both periodic and annual interest rates.
Technical Parameters
- cashflow_interval, cashflows
Return Values
- Periodic Interest Rate, Annual Interest Rate
Example Expressions
You can use the following expressions to directly evaluate in a non-interactive manner using eval():
irrn('yr', pd.DataFrame({'Cashflow': [-40000, 5000, 8000, 12000, 30000]})
irrn('mo', pd.DataFrame({'Cashflow': [-1000, 200, 300, 400, 500]})
Click on Help icon to open the help page on a separate window.