Contribution margin: what it is and how to calculate it

Contribution margin is what you keep from each sale after paying for the product, VAT, fees, and shipping. Here's how to calculate it, with an example.

Francisco Brienza

· 6 min read

Contribution margin = (price − variable costs) ÷ price. Example: $15.058 ÷ $40.000 = 37.6%
In this article

Contribution margin is what you keep from each sale after paying everything it costs to make that sale: the product, VAT, fees, and shipping. You calculate it by subtracting those costs from the price and dividing by the price. It's what gives you your breakeven ROAS, the minimum your ads need to hit so you don't lose money.

It sounds simple, but almost nobody calculates it in full. People count the cost of the product and forget about bank and platform fees, card installment fees, shipping, or taxes.

The result: you think you keep 75% of each sale, when you actually keep 37.6%.

Summary

  • Contribution margin = (price − variable costs) ÷ price.
  • Variable costs are the ones you pay every time you make a sale: product, VAT, fees, shipping, and packaging. Fixed costs, like salaries or rent, aren't included.
  • Neither Meta nor Google knows your contribution margin, so the ROAS they show you doesn't tell you whether you're making money. We explain why below.

How do you calculate contribution margin?

Contribution margin = (sale price − variable costs) ÷ sale price

  • Sale price: what the customer pays for the product.
  • Variable costs: everything that goes out every time you make a sale: the cost of the product, the VAT on the sale, the payment method fee, your store platform's fee, the shipping you cover, and packaging.

You can express it in pesos (how much you keep per sale) or as a percentage (what share of the price you keep). For ad decisions, you use the percentage. That's what you use to calculate your breakeven ROAS.

Example: the contribution margin of a Shopify store

A cosmetics store on Shopify sells a perfume for $40.000, which the customer pays in 3 installments:

Amount % of price
Sale price (VAT included) $40.000 100%
Product cost −$10.000 25%
VAT on the sale (21%) −$6.942 17.4%
Card fee for 3 installments (example: 7%) −$2.800 7%
Shopify fee (example: 2%) −$800 2%
Shipping you absorb −$4.000 10%
Packaging −$400 1%
Contribution margin $15.058 37.6%

The store keeps $15.058 from each perfume, or 37.6% of the price. If it had only subtracted the product cost, it would have thought it was keeping 75%. That's double.

How is it different from gross margin and net margin?

Gross margin Contribution margin Net margin
Subtracts from the price Only the product cost All variable costs Variable costs, advertising, and fixed costs
In the example 75% 37.6% Depends on your advertising and fixed costs
What it's for Comparing products Deciding how much you can invest in advertising Knowing whether the business makes money

When someone says "profit margin," they could mean any of the three, and the difference is huge. For ad decisions, contribution margin is the one that matters: it's what you have left to pay for your ads.

What's a good contribution margin?

There's no single number that works for everyone. It depends on your category and how you sell. What you can know is how much room it gives you to play with ads, because your margin sets your breakeven ROAS:

Contribution margin Breakeven ROAS
60% 1.67x
40% 2.5x
37.6% (the example) 2.66x
25% 4x

The higher your margin, the lower the ROAS you need to avoid losing money, and the more room you have to scale your ads.

Why does your margin change how you read Meta's ROAS?

Because ROAS only looks at sales, and your margin decides whether those sales leave you any money. On top of that, the ROAS Meta shows you is inflated:

1. The same ROAS can mean making or losing money. A 3x ROAS means making money with a 60% margin and losing money with a 25% margin, and it looks exactly the same in Meta's report.

2. They both claim the same sale. If someone saw your ad on Instagram without clicking and then bought through Google, both Meta and Google claim that sale. There was one sale; the reports show two.

With the margin from the example, the breakeven ROAS is 2.66x, so a campaign with a true ROAS of 2.4x is losing money. But if Meta claims 157 sales for every 100, it shows up in its report at 3.8x, telling you it's profitable. We explain this in The same sale, counted three times.

3. They're missing data. Between iOS, ad blockers, and device switching, sometimes the pixel doesn't see a purchase, and Meta fills it in with estimates.

How can you know your contribution margin without doing the math?

By connecting your store (Tiendanube, Shopify, VTEX, WooCommerce, and more) and your ad accounts to Elykia.

It matches every sale with what it cost you: the product, shipping, each payment method's fees, and taxes. It also reconstructs each customer's journey, click by click, and counts every sale only once, even if it went through both Meta and Google.

That gives you your real contribution margin and the profit each channel, campaign, and ad leaves you after paying for advertising. And all in one place: how much each customer is worth including repeat purchases, the journey behind each purchase, and the ability to ask Claude about all of it.

What you get with Elykia:

  • Sell more while spending less. You see which campaigns are eating your margin and move that money to the ones that leave you a profit.
  • Scale without fear. Before raising your budget, you know how much each sale from your ads leaves you.
  • Get better customers from Meta. You send back the sales Elykia tracks, so its algorithm learns from people who buy, not from clicks.

Frequently asked questions

Does contribution margin include advertising?

No. It's what you keep before paying for advertising, which is why it tells you how much you can invest in ads. If you also subtract advertising, you get the profit each sale leaves you after ads.

How often should you recalculate it?

Every time a major cost changes: your supplier's price, shipping, fees, or your own prices. In Argentina, with inflation, it's worth reviewing at least once a month.

How do I increase my contribution margin?

The most common levers are four: raising prices, negotiating costs with your supplier, setting a minimum order amount for free shipping, and pushing payment methods with lower fees, like bank transfers or paying in a single installment.

Join the Elykia Newsletter

Science applied to marketing: in-house studies, market benchmarks, Claude skills and the latest from Meta and Google.

No spam, promise.