{
  "tool_id": "ad_spend_roas_calculator",
  "slug": "ad-spend-roas-calculator",
  "path": "/ad-spend-roas-calculator/",
  "mode": "engine_module",
  "usage": "Client-side calculator. Open https://aibizhub.io/ad-spend-roas-calculator/ and fill in the inputs; results render in-browser. Also importable as ES module from https://aibizhub.io/engines/ad-spend-roas-calculator.js — call compute(input) with the JSON shape below.",
  "methodology": "https://aibizhub.io/methodology/ad-spend-roas-calculator/",
  "sample_input": {
    "tool": "ad_spend_roas_calculator",
    "ad_spend": 5000,
    "revenue_generated": 20000,
    "product_cost": 20,
    "target_profit_margin_percent": 20
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "ad_spend": {
        "type": "number"
      },
      "revenue_generated": {
        "type": "number"
      },
      "product_cost": {
        "type": "number"
      },
      "target_profit_margin_percent": {
        "type": "number"
      }
    },
    "required": [
      "tool",
      "ad_spend",
      "product_cost",
      "target_profit_margin_percent"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "revenue": {
        "type": "number",
        "description": "Total revenue in dollars"
      },
      "actualRoas": {
        "type": "number",
        "description": "Actual Return on Ad Spend (revenue / ad spend)"
      },
      "breakEvenRoas": {
        "type": "number",
        "description": "Minimum ROAS to cover COGS"
      },
      "profitAfterAdSpend": {
        "type": "number",
        "description": "Profit after COGS and ad spend in dollars"
      },
      "profitMarginPercent": {
        "type": "number",
        "description": "Net profit margin as a percentage"
      },
      "targetCpa": {
        "type": [
          "number",
          "null"
        ],
        "description": "Target cost per acquisition for desired margin in dollars"
      },
      "roasHealth": {
        "type": "string",
        "enum": [
          "Excellent",
          "Good",
          "Caution",
          "Danger"
        ]
      },
      "guidance": {
        "type": "string",
        "description": "Actionable ROAS optimization guidance"
      },
      "cogs": {
        "type": "number",
        "description": "Total cost of goods sold in dollars"
      },
      "grossProfit": {
        "type": "number",
        "description": "Gross profit before ad spend in dollars"
      }
    }
  }
}
