{"uid":"cap_-Vgbd-ss1Bh-y0V_lHTV4","slug":"agenttools-roi-calculator-0a5bcac9","name":"AgentTools ROI Calculator","description":"Calculate return on investment: profit (or loss) and the percentage return relative to the initial amount invested. Use this when an agent needs to return on investment as a percentage.","url":"https://agenttools-hub.vercel.app/api/v1/finance/roi-calculator?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["initial","final"],"properties":{"final":{"type":"number","description":"Final value"},"initial":{"type":"number","description":"Amount invested"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"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_YAlI76NXUaf1CkFdxnYl_","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":"Calculates return on investment, returning both the absolute profit/loss and the percentage return relative to the initial invested amount.","exampleAgentPrompt":"I invested $5,000 in a stock and it's now worth $6,750 — can you calculate my ROI and tell me the percentage gain?","exampleUseCases":[{"title":"Stock investment return check","prompt":"I bought shares for $10,000 and sold them for $13,500. What's my ROI as a percentage?"},{"title":"Real estate profit analysis","prompt":"I purchased a property for $250,000 and sold it for $310,000. Can you calculate my return on investment?"},{"title":"Startup funding performance review","prompt":"Our fund invested $50,000 in a startup and the stake is now valued at $42,000. What's the ROI percentage — are we up or down?"}],"resultDescription":"Returns the profit or loss amount (final minus initial) and the ROI as a percentage ((final - initial) / initial * 100), so the agent knows both the absolute gain/loss and the relative return on the investment.","failureModes":["Missing required 'initial' or 'final' query parameters returns a validation error","Passing zero as the initial investment will cause a division-by-zero error","Non-numeric values for initial or final will be rejected","Payment failure (402) if USDC micropayment is not provided or accepted"],"whenToPreferThis":"Use this endpoint when you need a quick, reliable computation of ROI percentage and profit/loss from just two numbers (initial and final value). Prefer it over building your own formula when working inside an agent pipeline that already handles x402 micropayments, and when you need a clean JSON response without the overhead of a full financial analytics platform.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:41:07.150Z","isFirstParty":false,"canonicalSlug":"agenttools-roi-calculator-0a5bcac9"}