{"uid":"cap_y0qO3kZrRZR5GORrzUbxD","slug":"delx-commerce-gross-margin-calculator-6ddbd9f1","name":"Delx Commerce Gross Margin Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/gross-margin?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cost":{"type":"number","description":"Input field: cost."},"price":{"type":"number","description":"Input field: price."}}},"responseSchema":{"type":"json","example":{"cost":35,"price":100,"schema":"delx/util-gross-margin/v1","profitable":true,"gross_profit":65,"gross_margin_percent":65}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0eYZAR9tvSxIJAv_2zLnD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates gross profit and gross margin percentage given a cost and price value","exampleAgentPrompt":"Can you calculate the gross margin for a product that costs $35 to make and sells for $100?","exampleUseCases":[{"title":"Pricing sanity check for new product","prompt":"We're thinking of pricing our new gadget at $149 with a production cost of $72 — what's the gross margin and are we actually profitable?"},{"title":"Margin analysis for bulk order negotiation","prompt":"If I drop my selling price to $80 and my cost stays at $55, what does my gross margin look like? I need to know before I negotiate this bulk deal."},{"title":"Agent-driven product profitability screening","prompt":"Screen these two options for me: product A costs $20 and sells for $45, and product B costs $60 and sells for $85 — compute the gross margin for each so I can pick the better one."}],"resultDescription":"Returns a JSON object containing the original cost and price inputs, a boolean indicating whether the product is profitable, the gross profit (price minus cost), the gross margin as a percentage of price, and a schema identifier (delx/util-gross-margin/v1).","failureModes":["Missing required fields (cost or price) returns a validation error","Price of zero causes division-by-zero or undefined margin","Negative cost or price values may produce unexpected results","Non-numeric input types cause schema validation failure"],"whenToPreferThis":"Choose this endpoint when you need a fast, no-signup, pay-per-call gross margin computation without setting up a billing account. Ideal for AI agents that need to evaluate product profitability on demand during pricing workflows, negotiation support, or financial screening tasks. Prefer it over building custom logic when you want a standardized, verifiable result schema for gross margin.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:08.722Z","isFirstParty":false,"canonicalSlug":"delx-commerce-gross-margin-calculator-6ddbd9f1"}