{"uid":"cap_BpoL0QnTk33qf-Ox2o2cn","slug":"agenttools-margin-markup-calculator-2a273d28","name":"AgentTools Margin & Markup Calculator","description":"Calculate gross profit, profit margin (profit as % of price) and markup (profit as % of cost) from a unit cost and selling price — the two numbers people constantly mix up. Use this when an agent needs to profit margin vs markup, both computed.","url":"https://agenttools-hub.vercel.app/api/v1/finance/margin-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":["cost","price"],"properties":{"cost":{"type":"number","description":"Cost"},"price":{"type":"number","description":"Selling price"}}}},"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_r0LMK1Id0MXezCzN6hwbI","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 gross profit, profit margin (profit as % of selling price), and markup (profit as % of cost) from a unit cost and selling price.","exampleAgentPrompt":"My product costs me $35 to make and I sell it for $60 — can you tell me both the profit margin and the markup percentage so I understand the difference?","exampleUseCases":[{"title":"Retail product pricing check","prompt":"I buy these phone cases for $8 each and sell them for $22 — what's my gross profit, margin, and markup on each unit?"},{"title":"Freelance service rate sanity check","prompt":"My cost basis for a project is $1,200 and I'm quoting the client $1,800 — what's the profit margin and markup percentage on that?"},{"title":"Understanding margin vs markup confusion","prompt":"I always mix these up — if something costs $45 and sells for $75, can you give me both the profit margin as a percent of price and the markup as a percent of cost?"}],"resultDescription":"Returns gross profit (selling price minus cost), profit margin as a percentage of selling price, and markup as a percentage of cost — giving both figures that are frequently confused with one another.","failureModes":["Missing required 'cost' or 'price' query parameter returns an error","Non-numeric values for cost or price cause a validation error","Zero cost value may cause division-by-zero for markup calculation","Negative values may return unexpected or undefined results","Service unavailability due to Vercel hosting downtime"],"whenToPreferThis":"Choose this endpoint when you need both profit margin and markup computed simultaneously from cost and price inputs — especially useful when users conflate the two metrics. Ideal for quick pricing calculations in e-commerce, retail, freelance, or manufacturing contexts without needing a full accounting system.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:42:36.376Z","isFirstParty":false,"canonicalSlug":"agenttools-margin-markup-calculator-2a273d28"}