How to calculate marketing ROI using costs and contribution

Marketing ROI should compare the contribution left by campaign sales with the full cost of marketing. What the campaign caused and whether the business made money need evidence beyond revenue attribution.

Gouache illustration of a woman measuring one of four potted seedlings at a sunny lakeside window

The short answer

For a contribution-based marketing return on investment, calculate net campaign sales after discounts and refunds, subtract variable order or service-delivery costs, then subtract all marketing costs. Divide the remaining amount by those same marketing costs and multiply by 100. Label the result attributed if it uses attributed sales; call it incremental only when a credible causal estimate supports the contribution input.

  1. Marketing ROI uses a defined marketing-cost denominator; do not change it midway through the calculation.
  2. ROAS divides attributed revenue by ad spend; profit needs a contribution measure.
  3. Use paid orders or a clearly stated revenue-recognition basis rather than leads or unchecked purchase events.
  4. Attribution assigns credit. Incrementality estimates what would not have happened without the marketing.

Use a formula that answers the budget question

Return on investment (ROI) compares a return with the investment required to obtain it. For deciding whether marketing covers its cost, this guide uses a specific convention: marketing ROI = (contribution before marketing minus marketing costs) divided by marketing costs, multiplied by 100.

Contribution before marketing means net sales, including any retained shipping charges, minus variable costs of supplying those sales. Net sales are after discounts and refunds and exclude collected tax. Variable costs can include product cost, fulfillment, delivery, payment processing, sales commissions and return handling.

This is a contribution-based return on marketing expenditure, distinct from company net profit or a return on all operating costs. Fixed overhead, financing and income tax are outside this calculation unless explicitly allocated. Some ROI reports use a total-investment denominator instead, so state the formula beside the result.

The US Small Business Administration's break-even guidance distinguishes price, variable costs and contribution margin. The same distinction matters here: only part of revenue is available to pay for marketing.

Build a ledger before calculating the percentage

Choose one campaign or defined group of campaigns, one currency, a reporting window and a sales-credit rule. Match unique order IDs to payment status, discounts, refunds and variable costs. For a services business, keep signed contract value, invoiced revenue and collected payments as separate figures.

A paid-order cohort is useful for a cash-oriented ecommerce view, alongside the accountant's revenue-recognition policy. Later refunds belong back with the orders used in the campaign analysis even if the accounting report records the refund in a later month. Explain this timing difference in the reconciliation.

Shopify explicitly notes that sales reports include unpaid and canceled orders and track orders rather than money received. Google Analytics 4 (GA4) documents purchase and refund events, which depend on implementation. Reconcile both systems with your commerce and payment records before treating a dashboard revenue field as settled cash.

Scroll the table to compare every column.
Keep every amount in one place
AmountTreatment in this calculationCommon mistake
Discounts and refundsReduce salesSubtracting them again as marketing expense
Product and fulfillment costsReduce contribution before marketingTreating gross margin as full contribution
Payment, commission and return costsInclude as variable costs where applicableAssuming refunds reverse every fee
Media, agency and creative costsInclude in marketing costsUsing ad spend as the entire denominator
Marketing staff and softwareAllocate consistently to campaign scopeCounting shared costs in every campaign in full
Collected tax and customer depositsHandle according to their actual natureCalling every incoming payment sales revenue

Include the full marketing bill once

Add media spend, creative production, agency or contractor fees, campaign software, measurement work and allocated internal marketing labor. Use a documented allocation for shared subscriptions and staff rather than an arbitrary percentage chosen after seeing the result. Count an expense already included in variable selling costs once.

Separate launch costs from recurring costs so the reader can see whether a weak first period includes work that will be reused. Report what the launch actually cost, including assets you will reuse. Keep an allocation schedule if your decision model spreads that cost across campaigns.

For a decision about the next budget increment, show avoidable additional costs separately from the fully loaded view. A campaign can cover its marginal media spend while falling short of its share of the marketing team and tools. Those are different questions, each answered by consistent arithmetic.

Worked example: 80% attributed marketing ROI

All figures below are illustrative assumptions rather than company results. Assume 500 original paid orders are credited to one campaign under one attribution model. Their product sales after discounts total $50,000 before refunds. Refunds are $5,000, leaving $45,000 net product sales. Assume no customer shipping charges and exclude tax.

Variable order costs are $27,000, including product costs net of recoverable returned inventory, fulfillment, payment fees and return handling. Contribution before marketing is $45,000 minus $27,000, or $18,000. Marketing costs total $10,000: $6,000 media, $2,000 creative and agency, $1,000 allocated internal labor and $1,000 allocated software and measurement.

The contribution remaining after marketing is $8,000. Divide $8,000 by $10,000 and multiply by 100 to obtain 80%. Under this convention, the campaign has $0.80 left per $1 of marketing cost after the included variable and marketing costs, before excluded overhead and tax. Because the sales were attributed rather than causally established, call this attributed marketing ROI.

Scroll the table to compare every column.
Illustrative campaign contribution and marketing cost ledger
StepCalculationResult
Net product sales$50,000 minus $5,000 refunds$45,000
Contribution before marketing$45,000 minus $27,000 variable costs$18,000
Total marketing costs$6,000 + $2,000 + $1,000 + $1,000$10,000
Contribution after marketing$18,000 minus $10,000$8,000
Attributed marketing ROI$8,000 / $10,000 x 10080%
Net-revenue ROAS$45,000 / $6,000 media spend7.5x

How 7.5x ROAS relates to marketing ROI

Return on ad spend (ROAS) is attributed revenue divided by ad spend. Shopify's definition explicitly distinguishes revenue from profit and direct ad spend from broader business costs. In the example, a net-revenue ROAS of 7.5x means $7.50 of attributed net sales per $1 of media.

Subtracting one from 7.5 and calling the result a 650% profit return would leave out variable costs and the other $4,000 of marketing costs. The contribution-based calculation above produces 80%, using a different numerator and denominator. Both figures can be correct when labeled, and they answer different questions.

Also specify whether a platform's revenue includes refunds, shipping or tax. A reported ROAS based on $50,000 before refunds will differ from a calculation based on $45,000 after refunds. Reconcile the definitions before concluding that tracking needs repair.

Keep attribution and causation separate

An attribution model assigns sales credit among recorded interactions. A buyer might click an ad, read an email and return directly to purchase. Several platforms may claim the same order, so use an order-level allocation that credits each actual sale once in your combined financial ledger rather than adding their reported revenue together.

Incrementality asks what would have happened without the campaign. A randomized exposed-versus-holdout comparison can estimate that difference when assignment, measurement and sample size support the design. Google describes incrementality testing separately from day-to-day attribution reports. Use contribution differences where possible, as well as additional purchase counts.

For sensitivity only, suppose just 60% of the example's $18,000 attributed contribution were incremental. That would be $10,800. Subtracting $10,000 marketing cost leaves $800, an 8% return. The 60% is an assumption rather than a measured adjustment or a recommended default. It shows how strongly the conclusion depends on causality. Without a credible test, report attributed ROI and its uncertainty rather than an invented lift factor.

Wait for the revenue and returns to mature

Choose an observation window that reflects the buying cycle and returns policy, then use comparable maturity across campaigns. Compare a new campaign with unresolved leads to an older one once its orders are collected and refunds settled. Show preliminary results with an as-of date, then update the same cohort.

For long sales cycles, report leads, qualified opportunities and collected revenue separately. Forecast contribution can help planning when its assumptions are labeled, and projected pipeline and eventual paid revenue count as one return rather than two. Likewise, keep expected repeat purchases separate from observed first-order results.

Artificial intelligence (AI) can draft explanations of reconciled totals or flag missing cost fields, while campaign credit, unknown costs and budget moves stay with the people who approve them. GLCO's data systems service can help connect the order, campaign and cost records needed for a repeatable calculation.

Questions before you start

What is a good marketing ROI?

Set the target from your own costs. Under this convention, 0% means contribution covers the included marketing costs, with fixed overhead still to cover. In the example, a 40% pre-marketing contribution margin requires $10,000 / 0.40 = $25,000 net sales to cover $10,000 marketing cost, assuming that margin holds. Set a higher target where overhead, uncertainty or financing needs require it, and distinguish attributed break-even from incremental break-even.

Can I calculate ROI when marketing spend is zero?

Use a different measure when the denominator is zero. Report contribution and explain the costs excluded or genuinely absent rather than showing infinite ROI. Organic marketing often still has staff, production or software costs. Add the relevant allocated costs if you are evaluating that activity, and use the same policy when comparing it with paid campaigns.

Sources and further reading

  1. SBA: Break-even analysis
  2. Shopify: Sales reports
  3. Google: Measure ecommerce
  4. Shopify: Return on ad spend
  5. Google: Incrementality testing
Great Lakes Computing Office logo

Written by Great Lakes Computing Office

We build custom software, AI workflow automation and websites for businesses in Toledo and Detroit Metro. Work with us when you want one workflow scoped at a fixed price, with automation pilots from $3,500 and websites from $2,000, and your business keeping the code, accounts, prompts and documentation. See our published prices or read about the company.

Make this useful for my team.

Bring the question you want your reports to answer. We can look at the data, website or sales workflow and scope a practical next step. We reply within one business day.

Request a call