Catalog/biz-margin-markup

Calculators

Margin vs markup converter API

Computes gross margin (profit/price) and markup (profit/cost) from cost+price, or derives price from cost plus a target margin or markup — the conversion businesses constantly confuse. Answers 'what's my margin', 'what's my markup', 'what price gives a 40% margin'.

Price$0.01per request
MethodPOST
Route/v1/calc/biz-margin-markup
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calcmarginmarkuppricinggross-marginretailopsfinance
API URLhttps://x402.hexl.dev/v1/calc/biz-margin-markup
Integration docs
Example request
{
  "cost": 60,
  "price": 100
}
Example response
{
  "formula": "margin = (price - cost) / price ; markup = (price - cost) / cost",
  "cost": 60,
  "price": 100,
  "profit": 40,
  "marginPercent": 40,
  "markupPercent": 66.67,
  "rating": "moderate"
}
Input schema
{
  "type": "object",
  "required": [
    "cost"
  ],
  "properties": {
    "cost": {
      "type": "number",
      "examples": [
        60
      ]
    },
    "price": {
      "type": "number",
      "examples": [
        100
      ]
    },
    "margin": {
      "type": "number",
      "examples": [
        0.4
      ]
    },
    "markup": {
      "type": "number",
      "examples": [
        0.6667
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}