{"uid":"cap_IW4-WPSToxp3TAtcbezX_","slug":"npv-irr-payback-period-profitability-index-calculator-8cd8fe77","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/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_XZwfk_S_xc-pMX3xDGcBK","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 cashflows of [-100000, 30000, 35000, 40000, 45000] (index 0 is the initial outlay at t0) using a 10% annual discount rate.","exampleUseCases":[{"title":"Capital project investment decision","prompt":"I'm evaluating whether to approve a $250,000 factory upgrade. The expected cashflows over 5 years are [-250000, 60000, 75000, 80000, 90000, 95000]. Can you calculate the NPV, IRR, payback period, and profitability index at our 12% hurdle rate?"},{"title":"Real estate deal viability check","prompt":"I'm looking at a rental property that costs $180,000 upfront and will generate $24,000, $26,000, $28,000, $30,000, and $32,000 in net rent over the next 5 years. What's the NPV, IRR, and payback period at an 8% discount rate?"},{"title":"Startup funding comparison","prompt":"We're comparing two funding scenarios. For scenario A, cashflows are [-500000, 100000, 150000, 200000, 250000, 300000]. Compute the NPV, IRR, payback period, and profitability index using a 15% discount rate so we can benchmark them."}],"resultDescription":"Returns a JSON object containing: net present value (NPV) in currency units, internal rate of return (IRR) as a percentage, payback period (in periods), and profitability index — all computed from the submitted cashflow array and discount rate.","failureModes":["Invalid cashflow array (non-numeric values or missing t0) returns a validation error","IRR cannot be computed if cashflows never change sign (no real solution exists)","Discount rate of exactly -100% causes division by zero","Empty cashflow array returns an error","Extremely large arrays may time out or return computation errors"],"whenToPreferThis":"Choose this endpoint when you need a complete suite of standard capital-budgeting metrics — NPV, IRR, payback period, and profitability index — from a single API call with a simple cashflow array and discount rate. Ideal for financial agents, investment screening tools, or any workflow requiring quick discounted cashflow analysis without setting up a full financial modeling library.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:54:21.108Z","isFirstParty":false}