{
  "title": "Return on ad spend calculator",
  "human_url": "https://happytails.ai/en/business-tools/return-on-ad-spend-calculator/",
  "agent_url": "https://happytails.ai/agents/en/business-tools/return-on-ad-spend-calculator/",
  "language": "en",
  "markdown_url": "https://happytails.ai/en/business-tools/return-on-ad-spend-calculator.md",
  "content": "Return on ad spend calculator\nCompare revenue ROAS with the profit each campaign really keeps after product costs, order costs and ad spend. Enter attributed revenue and orders from your own attribution model or ad platform.\nHow can we improve this tool?\nReport a problem or share an idea.\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\nHow to use Return on ad spend calculator\nPaste one campaign per line with its ad spend, attributed revenue and, if you have them, orders and gross margin.\nEnter your gross margin and the shipping and other variable cost per order.\nCalculate and compare each campaign ROAS with its contribution after ads.\nDownload the report and the campaign CSV.\nUseful next steps\nCustomer acquisition cost calculator\nUtm builder\nMargin\nRevenue ROAS\nROAS is attributed revenue divided by ad spend, the definition used in the Google Ads Help page About Target ROAS bidding (retrieved 16 October 2026). A ROAS of 3.20 means 3.20 of attributed revenue for each 1 of ad spend. It says nothing about profit, because that revenue still has to pay for the products and for getting each order to the customer.\nContribution after ads\nContribution before ads is attributed revenue times your gross margin, minus orders times the cost per order, the contribution approach in Marketing Metrics by Farris, Bendle, Pfeifer and Reibstein (2nd edition, Pearson, 2010). Subtracting ad spend gives contribution after ads. In the example, Search generic has a ROAS of 3.20 but loses 29.50: 10,880 times 40% is 4,352.00, minus 151 orders times 6.50, minus 3,400 of ad spend. A campaign breaks even at a ROAS of its revenue divided by its contribution before ads, and contribution per 1 of ad spend is contribution before ads divided by spend.\nAttribution is your input\nThe revenue and orders you enter come from your own attribution model, analytics or ad platform. Platforms often credit the same sale to more than one campaign, so blended totals can overstate revenue, and the calculator does not de-duplicate or attribute sales. Each campaign amount is rounded to the currency decimal places and the totals add the rounded amounts. You can give a campaign its own gross margin in an optional margin column.",
  "content_format": "text/plain",
  "visibility": "public",
  "links": [
    {
      "name": "Customer acquisition cost calculator",
      "url": "https://happytails.ai/en/calculators/customer-acquisition-cost-calculator/"
    },
    {
      "name": "Utm builder",
      "url": "https://happytails.ai/en/marketing-tools/utm-builder/"
    },
    {
      "name": "Margin",
      "url": "https://happytails.ai/en/calculators/margin/"
    }
  ],
  "tool": {
    "id": "return-on-ad-spend-calculator",
    "category": "business-tools",
    "built": true,
    "requirements": "Up to 200 campaigns and 100,000 characters, with campaign names of up to 80 characters. Ad spend and revenue from 0 to 1,000,000,000,000, orders up to 1,000,000,000 and margins from 0 to 100 percent with two decimal places. Cost per order up to 1,000,000. Calculated on your device. Download a JSON report and CSV files.",
    "implementation": {
      "fields": [
        {
          "key": "grossMargin",
          "label": "Gross margin on attributed revenue (%)",
          "value": "40",
          "help": "Revenue minus product cost, as a share of revenue. Used for rows that leave the margin column empty.",
          "type": "text",
          "inputMode": "decimal",
          "maxLength": 32
        },
        {
          "key": "costPerOrder",
          "label": "Shipping and other variable cost per order",
          "value": "6.50",
          "help": "Needs the orders column. Enter 0 to leave it out.",
          "type": "text",
          "inputMode": "decimal",
          "maxLength": 32
        },
        {
          "key": "currency",
          "label": "Currency code",
          "value": "USD",
          "type": "text",
          "maxLength": 3,
          "autoCapitalize": "characters"
        },
        {
          "key": "precision",
          "label": "Currency decimal places",
          "value": "2",
          "type": "select",
          "values": [
            "0",
            "1",
            "2",
            "3",
            "4",
            "5",
            "6"
          ]
        },
        {
          "key": "rounding",
          "label": "Rounding",
          "value": "half-up",
          "type": "select",
          "values": [
            "half-up",
            "half-even",
            "half-down",
            "down",
            "up",
            "floor",
            "ceiling"
          ],
          "labels": {
            "half-up": "Half up (ties away from zero)",
            "half-even": "Half even (ties to even)",
            "half-down": "Half down (ties toward zero)",
            "down": "Toward zero (truncate)",
            "up": "Away from zero",
            "floor": "Toward negative infinity",
            "ceiling": "Toward positive infinity"
          }
        }
      ],
      "registrationFamily": "commerce-margins",
      "presentation": "metrics",
      "note": "ROAS is your attributed revenue divided by ad spend. Contribution after ads is gross profit on that revenue minus per-order costs and the ad spend. Attributed revenue and orders come from your own attribution model or ad platform. Processing stays on your device.",
      "inputMaxLength": 100000,
      "inputErrorCode": "COMMERCE_MARGINS_TOO_LONG",
      "experience": {
        "automatic": false,
        "single": false,
        "inputMaxLength": 100000,
        "inputMode": "text",
        "label": "Campaign results",
        "placeholder": "campaign,spend,revenue,orders",
        "help": "One campaign per line: name, ad spend, attributed revenue, then optional orders and gross margin. Write numbers without thousands separators. Up to 100,000 characters. Review the settings before running.",
        "action": null
      },
      "mode": "explicit",
      "interactive": false
    },
    "execution": "Browser interface",
    "api": null,
    "browser_agent": {
      "supported": true,
      "name": "run_current_tool",
      "discovery": "WebMCP on the human page in a supporting browser",
      "verification": "See audit/API-AUDIT.md; availability is not verification"
    }
  },
  "markdown": "# Return on ad spend calculator\n\n- Human page: https://happytails.ai/en/business-tools/return-on-ad-spend-calculator/\n- Markdown: https://happytails.ai/en/business-tools/return-on-ad-spend-calculator.md\n- Structured JSON: https://happytails.ai/agents/en/business-tools/return-on-ad-spend-calculator/index.json\n- Visibility: public\n\n## Tool capabilities\n\n| Property | Value |\n| --- | --- |\n| Tool ID | `return-on-ad-spend-calculator` |\n| Category | business-tools |\n| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |\n| Browser execution | Use the visible action or interactive controls. |\n| Browser processing | Browser; see tool notes for network behavior. |\n| HTTP API | Not callable through HTTP. |\n| Browser-agent interface | run_current_tool |\n\n### Implementation notes\n\nROAS is your attributed revenue divided by ad spend. Contribution after ads is gross profit on that revenue minus per-order costs and the ad spend. Attributed revenue and orders come from your own attribution model or ad platform. Processing stays on your device.\n\n### Inputs and settings\n\nText input: Campaign results.\n\nExample or placeholder shown in the interface (not a validated fixture):\n\n```text\ncampaign,spend,revenue,orders\n```\n\nOne campaign per line: name, ad spend, attributed revenue, then optional orders and gross margin. Write numbers without thousands separators. Up to 100,000 characters. Review the settings before running.\n\n| Setting | Meaning | Control type | Default | Constraints |\n| --- | --- | --- | --- | --- |\n| `grossMargin` | Gross margin on attributed revenue (%) | text | \"40\" |  |\n| `costPerOrder` | Shipping and other variable cost per order | text | \"6.50\" |  |\n| `currency` | Currency code | text | \"USD\" |  |\n| `precision` | Currency decimal places | select | \"2\" | Allowed: 0, 1, 2, 3, 4, 5, 6 |\n| `rounding` | Rounding | select | \"half-up\" | Allowed: half-up, half-even, half-down, down, up, floor, ceiling |\n\n### Browser-agent workflow\n\n1. Open the human page in a browser that supports WebMCP.\n2. Discover the interface exposed by that page; use its actual schema.\n3. Select files on the page first when the tool requires files.\n4. Call `run_current_tool` with valid input and settings.\n5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.\n\nCalls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.\n\n### Planning specification\n\nUp to 200 campaigns and 100,000 characters, with campaign names of up to 80 characters. Ad spend and revenue from 0 to 1,000,000,000,000, orders up to 1,000,000,000 and margins from 0 to 100 percent with two decimal places. Cost per order up to 1,000,000. Calculated on your device. Download a JSON report and CSV files.\n\nThis describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.\n\n### Complete machine-readable capability record\n\n```json\n{\n  \"id\": \"return-on-ad-spend-calculator\",\n  \"category\": \"business-tools\",\n  \"built\": true,\n  \"requirements\": \"Up to 200 campaigns and 100,000 characters, with campaign names of up to 80 characters. Ad spend and revenue from 0 to 1,000,000,000,000, orders up to 1,000,000,000 and margins from 0 to 100 percent with two decimal places. Cost per order up to 1,000,000. Calculated on your device. Download a JSON report and CSV files.\",\n  \"implementation\": {\n    \"fields\": [\n      {\n        \"key\": \"grossMargin\",\n        \"label\": \"Gross margin on attributed revenue (%)\",\n        \"value\": \"40\",\n        \"help\": \"Revenue minus product cost, as a share of revenue. Used for rows that leave the margin column empty.\",\n        \"type\": \"text\",\n        \"inputMode\": \"decimal\",\n        \"maxLength\": 32\n      },\n      {\n        \"key\": \"costPerOrder\",\n        \"label\": \"Shipping and other variable cost per order\",\n        \"value\": \"6.50\",\n        \"help\": \"Needs the orders column. Enter 0 to leave it out.\",\n        \"type\": \"text\",\n        \"inputMode\": \"decimal\",\n        \"maxLength\": 32\n      },\n      {\n        \"key\": \"currency\",\n        \"label\": \"Currency code\",\n        \"value\": \"USD\",\n        \"type\": \"text\",\n        \"maxLength\": 3,\n        \"autoCapitalize\": \"characters\"\n      },\n      {\n        \"key\": \"precision\",\n        \"label\": \"Currency decimal places\",\n        \"value\": \"2\",\n        \"type\": \"select\",\n        \"values\": [\n          \"0\",\n          \"1\",\n          \"2\",\n          \"3\",\n          \"4\",\n          \"5\",\n          \"6\"\n        ]\n      },\n      {\n        \"key\": \"rounding\",\n        \"label\": \"Rounding\",\n        \"value\": \"half-up\",\n        \"type\": \"select\",\n        \"values\": [\n          \"half-up\",\n          \"half-even\",\n          \"half-down\",\n          \"down\",\n          \"up\",\n          \"floor\",\n          \"ceiling\"\n        ],\n        \"labels\": {\n          \"half-up\": \"Half up (ties away from zero)\",\n          \"half-even\": \"Half even (ties to even)\",\n          \"half-down\": \"Half down (ties toward zero)\",\n          \"down\": \"Toward zero (truncate)\",\n          \"up\": \"Away from zero\",\n          \"floor\": \"Toward negative infinity\",\n          \"ceiling\": \"Toward positive infinity\"\n        }\n      }\n    ],\n    \"registrationFamily\": \"commerce-margins\",\n    \"presentation\": \"metrics\",\n    \"note\": \"ROAS is your attributed revenue divided by ad spend. Contribution after ads is gross profit on that revenue minus per-order costs and the ad spend. Attributed revenue and orders come from your own attribution model or ad platform. Processing stays on your device.\",\n    \"inputMaxLength\": 100000,\n    \"inputErrorCode\": \"COMMERCE_MARGINS_TOO_LONG\",\n    \"experience\": {\n      \"automatic\": false,\n      \"single\": false,\n      \"inputMaxLength\": 100000,\n      \"inputMode\": \"text\",\n      \"label\": \"Campaign results\",\n      \"placeholder\": \"campaign,spend,revenue,orders\",\n      \"help\": \"One campaign per line: name, ad spend, attributed revenue, then optional orders and gross margin. Write numbers without thousands separators. Up to 100,000 characters. Review the settings before running.\",\n      \"action\": null\n    },\n    \"mode\": \"explicit\",\n    \"interactive\": false\n  },\n  \"execution\": \"Browser interface\",\n  \"api\": null,\n  \"browser_agent\": {\n    \"supported\": true,\n    \"name\": \"run_current_tool\",\n    \"discovery\": \"WebMCP on the human page in a supporting browser\",\n    \"verification\": \"See audit/API-AUDIT.md; availability is not verification\"\n  }\n}\n```\n\n## Page guide\n\nCompare revenue ROAS with the profit each campaign really keeps after product costs, order costs and ad spend. Enter attributed revenue and orders from your own attribution model or ad platform.\n\nHow can we improve this tool?\n\nReport a problem or share an idea.\n\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\n\n### How to use Return on ad spend calculator\n\n1. Paste one campaign per line with its ad spend, attributed revenue and, if you have them, orders and gross margin.\n2. Enter your gross margin and the shipping and other variable cost per order.\n3. Calculate and compare each campaign ROAS with its contribution after ads.\n4. Download the report and the campaign CSV.\n\n## Useful next steps\n\n- [Customer acquisition cost calculator](https://happytails.ai/en/calculators/customer-acquisition-cost-calculator/) ([Markdown](https://happytails.ai/en/calculators/customer-acquisition-cost-calculator.md))\n\n- [Utm builder](https://happytails.ai/en/marketing-tools/utm-builder/) ([Markdown](https://happytails.ai/en/marketing-tools/utm-builder.md))\n\n- [Margin](https://happytails.ai/en/calculators/margin/) ([Markdown](https://happytails.ai/en/calculators/margin.md))\n\n## Revenue ROAS\n\nROAS is attributed revenue divided by ad spend, the definition used in the Google Ads Help page About Target ROAS bidding (retrieved 16 October 2026). A ROAS of 3.20 means 3.20 of attributed revenue for each 1 of ad spend. It says nothing about profit, because that revenue still has to pay for the products and for getting each order to the customer.\n\n### Contribution after ads\n\nContribution before ads is attributed revenue times your gross margin, minus orders times the cost per order, the contribution approach in Marketing Metrics by Farris, Bendle, Pfeifer and Reibstein (2nd edition, Pearson, 2010). Subtracting ad spend gives contribution after ads. In the example, Search generic has a ROAS of 3.20 but loses 29.50: 10,880 times 40% is 4,352.00, minus 151 orders times 6.50, minus 3,400 of ad spend. A campaign breaks even at a ROAS of its revenue divided by its contribution before ads, and contribution per 1 of ad spend is contribution before ads divided by spend.\n\n### Attribution is your input\n\nThe revenue and orders you enter come from your own attribution model, analytics or ad platform. Platforms often credit the same sale to more than one campaign, so blended totals can overstate revenue, and the calculator does not de-duplicate or attribute sales. Each campaign amount is rounded to the currency decimal places and the totals add the rounded amounts. You can give a campaign its own gross margin in an optional margin column.\n"
}