{
  "tool_id": "margin_markup_discount",
  "slug": "margin-markup-discount-calculator",
  "path": "/margin-markup-discount-calculator/",
  "mode": "engine_module",
  "usage": "Client-side calculator. Open https://aibizhub.io/margin-markup-discount-calculator/ and fill in the inputs; results render in-browser. Also importable as ES module from https://aibizhub.io/engines/margin-markup-discount-calculator.js — call compute(input) with the JSON shape below.",
  "methodology": "https://aibizhub.io/methodology/margin-markup-discount-calculator/",
  "sample_input": {
    "tool": "margin_markup_discount",
    "mode": "margin_to_price",
    "cost": 40,
    "margin_percent": 35
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "mode": {
        "type": "string"
      },
      "cost": {
        "type": "number"
      },
      "margin_percent": {
        "type": "number"
      }
    },
    "required": [
      "tool",
      "mode",
      "cost"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "mode": {
        "type": "string"
      },
      "cost": {
        "type": "number"
      },
      "listPrice": {
        "type": "null"
      },
      "salePrice": {
        "type": "number"
      },
      "grossProfit": {
        "type": "number"
      },
      "marginPercent": {
        "type": "number"
      },
      "markupPercent": {
        "type": "number"
      },
      "discountPercent": {
        "type": "null"
      },
      "formulaTrace": {
        "type": "string"
      },
      "warnings": {
        "type": "array",
        "items": {}
      },
      "assumptionsEcho": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "inputSalePrice": {
            "type": "null"
          },
          "inputListPrice": {
            "type": "null"
          },
          "inputMarginPercent": {
            "type": "number"
          },
          "inputMarkupPercent": {
            "type": "null"
          },
          "inputDiscountPercent": {
            "type": "null"
          }
        }
      }
    }
  }
}
