TapCub is live — analytics, insights and live chat, free on one platform
Glossary

Gross Margin: Definition, Formula and Break-Even ROAS

Gross margin is revenue minus cost of goods sold, as a share of revenue. How to calculate it, how it differs from net and contribution margin, and how to turn it into the break-even ROAS your ads must beat.

Sophia Bennett Reviewed by Oliver Reed Also called gross margin percentage Last updated Nov 19, 2026 Glossary

Quick answer

Gross margin is the share of revenue left after the direct cost of what you sold: (revenue − cost of goods sold) ÷ revenue. A 40% margin keeps 40 cents of each dollar before marketing, salaries and tax. For ads, it sets the break-even ROAS: 1 ÷ margin.

Formula: Gross margin % = (Revenue − COGS) ÷ Revenue × 100; break-even ROAS = 1 ÷ gross margin

What gross margin measures

Gross margin is the part of each sale that is left after you pay the direct cost of the thing you sold. It is written as a percentage of revenue, so a 40% gross margin means 40 cents of every dollar of sales stays with the business before rent, salaries, marketing and tax come out. The "direct cost" is called cost of goods sold (COGS) or cost of sales. For a store that is what the stock cost to buy or make, plus inbound freight and the labour and materials that went into it; the US tax agency's guide for small businesses lists purchases, labour, materials and supplies and other direct costs in its cost of goods sold chapter and has a separate "Figuring Gross Profit" section.

Two terms get mixed up here, so fix them early:

  • Gross profit is an amount of money: revenue − COGS.
  • Gross margin (or gross margin percentage, gross profit margin) is the same number divided by revenue.

Gross margin matters to marketers because every return-on-ad-spend figure is built on revenue, and revenue is not what you keep. The rest of this page gives the formula, one set of numbers you can recompute, the line between gross margin and its neighbours, and the mistakes that make ads look profitable when they are not. For the ad-return metrics themselves, see ROI and ROAS.

The formula and a first example

Gross margin % = (Revenue − COGS) ÷ Revenue × 100

Sample data: a product sells for $60 and costs $36 to buy and ship to your warehouse.

  • Gross profit = $60 − $36 = $24.
  • Gross margin = $24 ÷ $60 = 40%.

Across a whole month the same maths works on totals: revenue $100,000, COGS $60,000, gross profit $40,000, gross margin 40%.

Margin is not markup. Markup divides the profit by the cost: $24 ÷ $36 = 66.7%. The same product has a 40% margin and a 66.7% markup, and people who say "we price at 40%" without saying which one they mean end up with prices that are off by a wide gap. Gross margin can never reach 100% unless the cost is zero; markup can be any size.

The break-even line: where ad spend meets gross margin

Return on ad spend (ROAS) is revenue divided by ad spend. Google Ads, for example, reports it as conversion value per cost, and the target is set as that ratio times 100 (About Target ROAS bidding). That ratio does not know what your goods cost. To find out whether an ad covers itself you need one more step:

Break-even ROAS = 1 ÷ gross margin

The logic: each $1 of ad spend must come back as $1 of gross profit, and each $1 of revenue contains only (gross margin) dollars of gross profit.

Gross marginBreak-even ROASGross profit per $1 of ad spend at ROAS 3.0
20%5.00$0.60 − $1.00 = −$0.40
30%3.33$0.90 − $1.00 = −$0.10
40%2.50$1.20 − $1.00 = +$0.20
60%1.67$1.80 − $1.00 = +$0.80
80%1.25$2.40 − $1.00 = +$1.40

Sample data: spend $10,000 on a channel that brings $30,000 of revenue, so ROAS is 3.0. At a 40% gross margin the gross profit is $30,000 × 0.40 = $12,000, and after the $10,000 spend there is $2,000 left (a ratio of 1.2, sometimes called profit on ad spend). At a 30% margin the same campaign loses $1,000 ($9,000 − $10,000). Identical dashboard, opposite verdict. The break-even revenue for $10,000 of spend at a 40% margin is $10,000 ÷ 0.40 = $25,000.

Gross margin vs net margin vs contribution margin

The three margins differ by which costs are taken out of revenue. Keep the order straight and you will not compare a number from one with a rule of thumb from another.

MarginCosts taken out of revenueQuestion it answers
Gross marginCost of goods sold onlyIs the product priced above what it costs?
Contribution marginCOGS plus other costs that rise with each order (shipping, payment fees, variable marketing)How much does one more order add toward fixed costs?
Net marginEverything: COGS, operating costs, interest, taxWhat is left for the owners?

Sample data, one month of a small store: revenue $100,000; COGS $60,000 (gross margin 40%); fulfilment and payment fees $8,000 and ad spend $10,000, leaving $22,000 (22%) after variable costs; rent, salaries and software $15,000, leaving $7,000 (7%) before tax. Gross margin is the largest of the three on purpose, which is why it flatters. When the choice is whether to keep a campaign running, the closer you get to contribution the safer the answer; contribution margin is covered on its own page, and unit economics shows how it lines up with acquisition cost per customer.

What counts as cost of goods sold

Gross margin is only as honest as its COGS. Three questions settle most disagreements:

  • What goes in? Product cost, inbound freight, direct labour and materials for what you make, packaging that ships with the order. Software subscriptions, the marketing team and office rent do not.
  • What about shipping to the customer and returns? Practice varies; many sellers keep outbound shipping and returns out of COGS and treat them as variable costs. Pick one rule, write it down and use it every month.
  • Which period? Use the cost of the units that were actually sold in the period, not what you bought. Stock bought in March and sold in May belongs to May.

For a SaaS or service business the cost of delivery is hosting, support staff and payment processing for those customers, not engineering that builds new features. Software businesses often report much higher gross margins than shops that carry stock, which is why a break-even ROAS of 1.25 can be normal in one and out of reach in the other. Compare your margin to your own history and your own category, not to a figure from another business model.

Common mistakes with gross margin

  • Judging ads on ROAS alone. A ROAS of 3.0 is a win at 60% margin and a loss at 30%. Put the break-even line next to every ROAS you report.
  • Using one margin for the whole catalogue. A discounted product with a 15% margin and a flagship with 60% do not share a break-even. If the mix of what an ad sells shifts, the margin shifts with it; use margin by product line where you can.
  • Mixing up margin and markup. The same price list is 40% in one and 66.7% in the other.
  • Counting revenue before returns and discounts. Revenue should be net of refunds and discount codes, or margin is overstated.
  • Calling gross margin "profit". It is before ad spend, shipping, fees and salaries. The cost of getting the customer is not in it at all.
  • Treating a high margin as proof of a good business. Gross margin ignores how much it costs to win a customer; see CAC payback period for that side.

Gross margin in TapCub

Take the $10,000 / $30,000 example above and run it in TapCub. TapCub measures the revenue side and the spend you enter; it does not hold your cost of goods, so the margin step is a calculation you do yourself.

  1. Bring in spend. Open All-platform analytics › Business › Channel ROI, go to the Costs tab, and add spend one row at a time or import a CSV with day, channel, source, campaign and cost columns (only day and cost are required).
  2. Read the return. On the ROI tab, group by channel, source or campaign. TapCub shows cost per click (spend ÷ sessions), cost per acquisition (spend ÷ conversions, where conversions are purchases on the order ledger) and return on ad spend (revenue ÷ spend, revenue being order amount). With no spend, or no orders, those cells stay empty rather than showing zero.
  3. Apply your margin. Write your break-even ROAS (1 ÷ gross margin) beside the table and mark every campaign under the line. In the sample, a 40% margin gives a line of 2.5, so a campaign at 2.2 is losing money even though it "returns" more than it costs.
  4. Check the revenue is the right revenue. Revenue comes from the order ledger; before you trust a ROAS, see All-platform analytics › Business › Commerce & revenue for where those orders are coming from.

TapCub reports ROAS as revenue ÷ spend, not as a margin-adjusted figure, and it does not run your ads. It tells you which campaigns clear the line you drew.

See also: How to Calculate ROAS: Formula, Break-Even and a Worked Example.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Sophia Bennett

Product Adoption Consultant

Explores customer onboarding, live conversations, and self-service, turning common usage questions into practical guidance and improvements.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

How do you calculate gross margin?

Subtract cost of goods sold from revenue to get gross profit, divide by revenue and multiply by 100. A $60 product costing $36 has $24 of gross profit and a 40% gross margin ($24 ÷ $60). Use net revenue, after refunds and discounts, and the cost of the units actually sold.

What is the difference between gross margin and markup?

Gross margin divides profit by the selling price; markup divides it by the cost. A product selling for $60 that costs $36 has a 40% margin ($24 ÷ $60) and a 66.7% markup ($24 ÷ $36). Margin cannot reach 100% unless the cost is zero, while markup has no ceiling.

What ROAS do I need to break even?

Divide 1 by your gross margin. At a 40% margin the break-even ROAS is 2.5; at 20% it is 5.0; at 60% it is 1.67. Above that line the ads pay for the goods they sold; below it each order loses money before shipping, fees and salaries.

Is gross margin the same as profit?

No. Gross margin is taken before ad spend, shipping, payment fees, salaries, rent and tax. In the sample store, a 40% gross margin became 22% after variable costs and 7% before tax. Treat gross margin as the ceiling on profit, not the profit.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics