Analytics & Reporting
November 11, 2025

How to Calculate <blue>Contribution Margin</blue>

Kyle Bomardier
Kyle Bombardier
Table of contents

Scale Smarter with

Connect your sources, clean your data, and watch performance marketing soar with a flat fee and zero drama. Get started with a discovery call

To calculate contribution margin, subtract all variable costs from net revenue: contribution margin = net revenue − variable costs. Divide the result by net revenue to get your contribution margin ratio. Variable costs are the costs that rise with every order, such as product cost, shipping, packaging, payment fees, and returns. The result tells you how much each sale leaves to cover fixed costs, pay for customer acquisition, and produce profit.

Key takeaways

  • Start from net revenue, the price customers actually paid after discounts, not list price.
  • Count every cost that grows with order volume, and leave fixed costs such as salaries and rent out.
  • Contribution margin per order sets the most you can pay to acquire a first-time customer without losing money.
  • Calculate it by product and channel, because a single blended number hides your weakest products.

What is the contribution margin formula?

The formula has two versions, and most teams use both:

  • Contribution margin (dollars) = net revenue − variable costs
  • Contribution margin ratio (percent) = contribution margin ÷ net revenue

The dollar figure shows how much cash a sale generates. The ratio lets you compare products at different price points.

Getting the inputs right matters more than the arithmetic. Most errors come from costs that land in the wrong bucket or never get counted, which is why a marketing data warehouse that joins order, cost, and ad data is often where accurate margin reporting starts.

Which costs count as variable costs?

A cost is variable if it goes up when you sell one more unit and down when you sell one fewer. Common variable costs for an ecommerce or subscription business include:

  • Cost of goods sold: the landed cost of the product, including manufacturing, freight, and duties.
  • Fulfillment: pick, pack, and shipping charges, plus packaging materials.
  • Payment processing: card and wallet fees, which are usually a percentage of the order plus a fixed amount per transaction.
  • Marketplace and platform fees: referral or commission fees charged per sale.
  • Returns: refunds, return shipping, and the cost of product that cannot be resold.
  • Discounts and promotions: these reduce net revenue, so they belong at the top of the calculation rather than in the cost list.

Fixed costs stay roughly the same regardless of volume: salaries, rent, software subscriptions, and agency retainers. They matter for overall profit, but mixing them into contribution margin makes every product look worse than it is.

How do you calculate contribution margin step by step?

A hypothetical example: a skincare brand sells a kit listed at $100. Here is one average order.

  1. Find net revenue. The kit sells with a 20% first-order discount, so net revenue is $80.
  2. Add up variable costs. Product cost is $28, fulfillment and packaging are $11, payment fees are about $2.60, and a returns allowance based on the brand's return history is $4. Total variable costs: $45.60.
  3. Subtract. $80 − $45.60 = $34.40 contribution margin per order.
  4. Convert to a ratio. $34.40 ÷ $80 = 43%.
  5. Subtract acquisition cost. If the brand pays $25 in ad spend to win that customer, contribution after marketing is $9.40.

Some analysts label these layers CM1 (after product cost), CM2 (after fulfillment, fees, and returns), and CM3 (after marketing). The labels matter less than using one definition everywhere, from finance reports to ad dashboards.

How do you use contribution margin to set a CAC target?

Contribution margin per order is the ceiling on what you can pay to acquire a customer on the first purchase. In the example above, any customer acquisition cost below $34.40 makes the first order profitable before fixed costs. Spending more than that means the first order loses money.

Brands with strong repeat purchase rates can choose to spend above that ceiling, because later orders add more contribution. Continuing the hypothetical example: if the average customer places 2.5 orders over their lifetime, lifetime contribution is about $86. Accepting a first-order loss only works if the brand knows how long payback takes and has the cash to wait. The Onward post on improving efficiency with CAC payback and LTV covers how to manage that tradeoff week to week.

Blueprint is a useful reference point. The health subscription company cut customer acquisition cost 57% while scaling monthly ad spend 11x with Onward, as described in the 57% CAC reduction case study.

Blueprint case study stat: 57% reduction in customer acquisition cost while scaling ad spend 11x on a fixed agency fee
A lower CAC leaves more of each order's contribution margin as profit.

Why should you calculate contribution margin by product and channel?

A blended contribution margin averages strong products with weak ones, so the total can look healthy while one product line loses money on every order.

A product with heavy returns may need a lower CAC target than one customers keep. Apparel is a common case: return rates vary widely by style and size, which is why Onward's apparel marketing agency team reports contribution margin after returns, discounts, and marketplace fees rather than on gross sales.

The same logic applies to advertising. Return on ad spend counts revenue, not what it is worth after costs, so the comparison of contribution margin vs. ROAS is worth reading before you set channel targets.

Songfinch, the personalized song company, reads margin at the ad-set level because its marketing data reconciles with Stripe at better than 99%.

Songfinch case study stat: ad-set-level contribution-margin visibility
Calculated by ad set, contribution margin shows which campaigns earn profit and which only earn revenue.

What are the most common contribution margin mistakes?

  • Using list price instead of net revenue. Discounts, coupons, and free-shipping thresholds all reduce what you actually collect.
  • Leaving out returns. Refunds and unsellable inventory are real variable costs.
  • Using stale costs. Freight, packaging, and carrier rates change. Update cost inputs on a set schedule.
  • Counting fixed costs. Salaries and software belong below contribution margin, not inside it.
  • Relying on platform revenue. Ad platforms can over-credit sales. Calculate margin on revenue your store or payment processor actually recorded.

At 500 LEVEL, the sports apparel retailer, margin is visible for each creative asset in one live view built from 9+ data sources.

500 LEVEL and Onward graphic asking whether your revenue is actually making you money after media spend, COGS, and channel fees
The question contribution margin answers: what is left after media spend, COGS, and channel fees?

Frequently asked questions

What is the difference between contribution margin and gross margin?

Gross margin subtracts only cost of goods sold from revenue. Contribution margin goes further and subtracts every variable cost, including fulfillment, payment fees, and returns, so it is the better guide for deciding what each sale is worth.

Should ad spend be included in contribution margin?

Calculate it both ways. Contribution margin before marketing tells you how much you can afford to spend on acquisition. Contribution after marketing tells you whether a campaign, product, or channel actually made money.

What is a good contribution margin?

It depends on your category, your fixed cost base, and how often customers buy again. The useful test is whether contribution after marketing covers fixed costs and leaves profit at the volume you plan to reach.

The bottom line

Contribution margin is net revenue minus every cost that grows with each order. Calculate it per order, convert it to a ratio, and use it to set CAC targets by product and channel. The hard part is not the math but getting reliable cost, order, and ad data into one place. To see your own contribution margin by product and campaign, schedule a free audit.