{"uid":"cap_WqiHA8eoVAJIIL1aj2ibk","slug":"x402toll-roi-roas-calculator-8181519a","name":"x402toll ROI & ROAS Calculator","description":"ROI %, ROAS, profit, and profit margin from revenue and cost (e.g. ad spend).","url":"https://x402toll.com/v1/commerce/roi","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cost":{"type":"number"},"revenue":{"type":"number"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EWD4U78kTEMuRnZmRBI7S","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes ROI percentage, ROAS, profit, and profit margin from a revenue figure and a cost (e.g. ad spend).","exampleAgentPrompt":"I spent $1,200 on ads last month and brought in $4,800 in revenue — can you calculate my ROI, ROAS, profit, and profit margin?","exampleUseCases":null,"resultDescription":"Returns ROI as a percentage, ROAS (revenue divided by cost), gross profit (revenue minus cost), and profit margin as a percentage — all derived from the provided revenue and cost values.","failureModes":["Missing required fields (cost or revenue): returns validation error","Zero cost value may cause division-by-zero error for ROI/ROAS calculations","Non-numeric values in cost or revenue fields cause schema validation failure","Negative revenue or cost values may produce unexpected or undefined results","Payment failure (insufficient USDC balance) prevents call from completing"],"whenToPreferThis":"Use this endpoint when you need a fast, authoritative computation of standard marketing or business profitability metrics (ROI %, ROAS, profit, profit margin) from just two inputs — cost and revenue — without doing the math manually or risking formula errors. Ideal for evaluating ad campaign performance, e-commerce margins, or any spend-vs-return analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:34:55.933Z","isFirstParty":false}