{"uid":"cap_rnMvF9Zo1JIfuRaLPQq7z","slug":"npv-irr-payback-period-profitability-index-calculator-7fe878cf","name":"NPV / IRR / Payback Period / Profitability Index Calculator","description":"Net present value and internal rate of return for a cashflow array (index 0 = t0) at a given discount rate; also payback period and profitability index.","url":"https://api.24klabs.ai/api/v1/npv-irr-calculator","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cashflows":{"type":"array"},"discount_rate":{"type":"number"}}},"responseSchema":{"type":"json","example":{"npv":143.28,"irr_pct":17.5,"payback_period":2.6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OU5gK8qTztiMvsO6g0amF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes net present value (NPV), internal rate of return (IRR), payback period, and profitability index for a cashflow array at a specified discount rate.","exampleAgentPrompt":"Calculate the NPV, IRR, payback period, and profitability index for a project with an initial outlay of -$50,000 at t0 and annual inflows of $15,000, $18,000, $22,000, $20,000, and $10,000 over the next 5 years, using a discount rate of 8%.","exampleUseCases":[{"title":"Real estate investment viability check","prompt":"I'm evaluating a rental property. The upfront cost is -$200,000 at year 0, and I expect net rental income of $18,000, $20,000, $22,000, $24,000, and $180,000 (including sale) over 5 years. Can you calculate the NPV, IRR, payback period, and profitability index at a 7% discount rate?"},{"title":"Startup project capital budgeting","prompt":"Our startup is deciding whether to build a new product. The investment is -$80,000 now, with projected cashflows of -$10,000, $25,000, $40,000, $55,000, and $60,000 over 5 years. What are the NPV, IRR, payback period, and profitability index at a 12% hurdle rate?"},{"title":"Comparing two equipment purchase options","prompt":"I need to compare buying a piece of manufacturing equipment. Option A has cashflows of -$30,000, $8,000, $10,000, $12,000, $10,000. Can you compute its NPV, IRR, payback period, and profitability index at a 9% discount rate so I can benchmark it against another option?"}],"resultDescription":"Returns a JSON object containing: the net present value (NPV) of the cashflow series at the given discount rate, the internal rate of return (IRR) as a percentage, the payback period in periods, and the profitability index. All metrics are computed against the cashflow array where index 0 represents time zero (t0).","failureModes":["Invalid or malformed cashflow array (non-numeric values, empty array)","Discount rate not provided or outside valid range","IRR cannot be computed if cashflows never change sign (no real solution exists)","Payback period may be undefined if cumulative cashflows never turn positive","Payment/authentication failure for x402 micropayment"],"whenToPreferThis":"Use this endpoint when you need multiple capital budgeting metrics (NPV, IRR, payback period, profitability index) from a single API call rather than computing them separately. Ideal for AI agents performing investment screening, financial modeling, or project evaluation where all four standard DCF metrics are needed together. At $0.004 per call it is cost-effective for high-frequency analysis pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:49:01.850Z","isFirstParty":false}