{"uid":"cap_jAhxtFWBEx2ZQhKXCBSwE","slug":"agent402-tools-irr-calculator-098941ce","name":"agent402.tools IRR Calculator","description":"Compute the internal rate of return (IRR) of a cashflow stream - the discount rate at which NPV = 0. Index 0 is treated as t=0 (typically the negative initial investment); indices 1..n are inflows in subsequent periods. Solved via Newton-Raphson with bisection fallback. Requires at least one positive and one negative cashflow (otherwise IRR is undefined). Multiple sign changes in the cashflows can produce multiple IRR roots - we return the first one found.","url":"https://agent402.tools/api/irr","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"guess":{"type":"number","description":"Initial guess for IRR as decimal (default 0.1 = 10%). Used as the Newton-Raphson starting point."},"cashflows":{"type":"array","description":"Array of cashflows. Index 0 = t=0. Must contain at least one positive and one negative value. 2-1200 elements."}}},"responseSchema":{"type":"json","example":{"irr":0.248883,"npvAtIrr":0,"converged":true,"iterations":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_y_VmRyBPcazNo0ZTddAhX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the internal rate of return (IRR) of a cashflow stream using Newton-Raphson iteration, finding the discount rate at which NPV equals zero.","exampleAgentPrompt":"What's the IRR on this investment? The cashflows are: year 0 is -50000, then 12000, 15000, 18000, 20000, and 25000 in years 1 through 5. Use a starting guess of 10%.","exampleUseCases":null,"resultDescription":"Returns the computed IRR as a decimal (e.g. 0.18 = 18%) representing the discount rate at which the net present value of the provided cashflow stream equals zero, solved via Newton-Raphson iteration.","failureModes":["Cashflow array has fewer than 2 elements — API returns validation error","No sign change in cashflows (all positive or all negative) — Newton-Raphson cannot converge, returns error","Newton-Raphson fails to converge with given guess — try a different initial guess value","Cashflow array exceeds 1200 elements — returns payload too large error","Payment of 0.001 USDC not fulfilled — returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a quick, accurate IRR calculation for a discrete periodic cashflow stream (e.g. annual project returns, loan schedules) and want server-side Newton-Raphson solving without implementing the algorithm yourself. Ideal for financial agents doing capital budgeting, project evaluation, or loan comparison where IRR is needed as a decision metric.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.984Z","isFirstParty":false}