{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"irr"},"result":{"entity_type":"calculator","id":"irr","calculator_id":"irr","canonical_url":"https://tttkmbb.com/finance/irr","name":"IRR Calculator","title":"IRR Calculator – Internal Rate of Return of an Investment's Cash Flows","category":"finance","category_name":"Finance","tool_name":"calculate_irr","featured_mcp_tool":false,"description":"Solves numerically for the discount rate at which the net present value of an initial investment and its subsequent cash flows equals zero, and reports the undiscounted gain and the number of sign changes (a warning for multiple IRRs).","use_when":"You want the annualized (per-period) return implied by an investment's cash-flow pattern, e.g. to compare projects or check a fund's stated return.","do_not_use_when":"Cash flows change sign more than once (multiple IRRs may exist; use npv at your hurdle rate), or there are only two values (use cagr).","inputs":[{"name":"initial_investment","label":"Initial investment","type":"number","required":true,"max":1000000000000000,"exclusive_min":0,"description":"Outlay at time 0, entered as a positive number.","example":1000},{"name":"cash_flows","label":"Cash flows","type":"number_list","required":true,"description":"Net cash flow at the end of periods 1, 2, 3 … (negative values allowed).","example":[500,400,300]}],"outputs":[{"name":"irr_percent","label":"IRR","type":"number","unit":"% per period","decimals":2,"description":"Rate at which NPV = 0 (annual if the cash flows are yearly)."},{"name":"net_undiscounted_gain","label":"Undiscounted gain","type":"number","decimals":2,"description":"Σ cash_flows − initial_investment (NPV at 0 %)."},{"name":"total_cash_flows","label":"Sum of cash flows","type":"number","decimals":2,"description":"Σ cash_flows."},{"name":"number_of_periods","label":"Number of periods","type":"integer","decimals":0,"description":"Length of cash_flows."},{"name":"sign_changes","label":"Sign changes","type":"integer","decimals":0,"description":"Sign changes in the series (−investment, CF_1 … CF_n); more than 1 means several IRRs can exist."}],"input_schema":{"type":"object","properties":{"initial_investment":{"description":"Outlay at time 0, entered as a positive number.","type":"number","maximum":1000000000000000,"exclusiveMinimum":0,"examples":[1000]},"cash_flows":{"description":"Net cash flow at the end of periods 1, 2, 3 … (negative values allowed).","type":"array","items":{"type":"number"},"examples":[[500,400,300]]}},"additionalProperties":false,"required":["initial_investment","cash_flows"]},"output_schema":{"type":"object","properties":{"irr_percent":{"description":"Rate at which NPV = 0 (annual if the cash flows are yearly). Unit: % per period.","type":"number","x-unit":"% per period"},"net_undiscounted_gain":{"description":"Σ cash_flows − initial_investment (NPV at 0 %).","type":"number"},"total_cash_flows":{"description":"Σ cash_flows.","type":"number"},"number_of_periods":{"description":"Length of cash_flows.","type":"integer"},"sign_changes":{"description":"Sign changes in the series (−investment, CF_1 … CF_n); more than 1 means several IRRs can exist.","type":"integer"}}},"formula":"Solve −initial_investment + Σ_{t=1..n} cash_flows[t] / (1 + IRR)^t = 0 for IRR by bisection on (−99 %, 1000 %)","method":"Bisection to machine precision on the NPV function, which is guaranteed to converge when the series has one sign change (conventional investment). The IRR is a per-period rate and assumes interim cash flows are reinvested at the IRR.","sources":[{"name":"Investopedia – Internal Rate of Return (IRR): Formula and Examples","url":"https://www.investopedia.com/terms/i/irr.asp","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Internal rate of return","url":"https://en.wikipedia.org/wiki/Internal_rate_of_return","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"−1,000 then 500, 400, 300","inputs":{"initial_investment":1000,"cash_flows":[500,400,300]},"expected":{"irr_percent":10.65,"net_undiscounted_gain":200,"total_cash_flows":1200,"number_of_periods":3,"sign_changes":1},"url":"https://tttkmbb.com/api/v1/calculate/irr?initial_investment=1000&cash_flows=500%2C400%2C300"},{"name":"−10,000 then 3,000, 4,000, 5,000, 2,000","inputs":{"initial_investment":10000,"cash_flows":[3000,4000,5000,2000]},"expected":{"irr_percent":15.32,"net_undiscounted_gain":4000,"sign_changes":1},"url":"https://tttkmbb.com/api/v1/calculate/irr?initial_investment=10000&cash_flows=3000%2C4000%2C5000%2C2000"}],"faq":[{"q":"Why can there be no IRR?","a":"If the cash flows never turn positive (or the series never changes sign) NPV never crosses zero, so no rate satisfies the equation; the calculator returns CALCULATION_ERROR in that case."},{"q":"IRR or NPV?","a":"NPV measures value created at your required return and ranks mutually exclusive projects correctly; IRR is a convenient rate for comparing against a hurdle rate but can mislead when project sizes or timings differ."}],"tags":["irr","internal rate of return","rate of return","cash flow return","capital budgeting","npv zero"],"related":[{"calculator_id":"npv","reason":"Value of the same cash flows at a chosen rate."},{"calculator_id":"cagr","reason":"Return between a single start and end value."},{"calculator_id":"roi","reason":"Simple total return without timing."}],"links":{"html":"https://tttkmbb.com/finance/irr","markdown":"https://tttkmbb.com/finance/irr.md","json":"https://tttkmbb.com/finance/irr.json","api":"https://tttkmbb.com/api/v1/calculate/irr","schema":"https://tttkmbb.com/api/v1/calculators/irr","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:45:05Z"}