Internal rate of return (IRR) calculator
Internal rate of return of periodic cash flows, with every IRR reported when there is more than one.
- Version 1
- Checked against 3 published values
- Free, no sign-up
Examples
Result: ECMA-376 example
| IRR percent IRR per period, in percent. Unit: percent. |
8.6631 rounded |
|---|---|
| All IRR percent Every IRR found, lowest first, in percent. |
8.6631 |
| IRR is unique True when there is exactly one IRR. |
yes |
| Sign changes How many times the cash flows change sign. |
1 |
Rounding: Half even, 4 decimal places. Calculator finance/irr@1.
How it is calculated
Σ CFₜ / (1 + IRR)ᵗ = 0Finds the discount rate at which the net present value of the cash flows is zero. Unlike spreadsheet IRR(), no starting guess is needed: all IRRs between −100% and the mathematical bound are searched, each one is pinned down with exact arithmetic, and the result is correctly rounded. When the cash flows change sign more than once there can be several IRRs; all are returned and a warning explains.
- Cash flows are one period apart; the first one is at time 0.
- Amounts are plain numbers in any single currency; no currency conversion is done.
References
Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.
Use it from your code
curl https://api.curatedapi.com/v1/calc/finance/irr \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"cash_flows": ["-70000", "12000", "15000", "18000", "21000", "26000"]
}'
The same call in Python
import os
import requests
payload = {
"cash_flows": ["-70000", "12000", "15000", "18000", "21000", "26000"],
}
response = requests.post(
"https://api.curatedapi.com/v1/calc/finance/irr",
headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
json=payload,
timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
"cash_flows": ["-70000", "12000", "15000", "18000", "21000", "26000"],
};
const response = await fetch("https://api.curatedapi.com/v1/calc/finance/irr", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log((await response.json()).result);
MCP tool calc_finance_irr at https://mcp.curatedapi.com.
Inputs, outputs and errors in the API reference.
Put it on your website
<div data-curatedapi-widget="finance/irr" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>
Use a public key registered for your site. Calculations are billed like API calls. How widgets work.
Related calculators
- Black-76 calculator for options on futures
- Black-Scholes option price and Greeks calculator
- Bond duration and convexity calculator
- Compound interest calculator
- EU and UK APRC calculator
- Extra mortgage payment calculator
- FHA mortgage insurance (MIP) calculator
- Implied volatility calculator
- Loan EMI calculator
- Mortgage affordability calculator
- Mortgage calculator
- Net present value (NPV) calculator
- Refinance break-even calculator
- Rent or buy calculator
- Return on investment (ROI) calculator
- Savings goal calculator
- Simple interest calculator
- US APR calculator (Truth in Lending, Regulation Z)
- USDA loan guarantee fee calculator
- VA funding fee calculator
- Yield to call calculator
Add this calculator to your website
Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.
Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.