Margly
Costs & margins

Understanding margins — what gets calculated where

Gross margin, CM1, net margin, break-even ROAS — formulas, inputs, when to track them.

4 min read

Margin cascade — from top down#

Margly calculates 3 levels of margins in a cascade. Each level subtracts the next group of costs from the previous one:

Revenue
  − COGS (Cost of Goods Sold = purchase price of sold goods)
= Gross Margin
  − Logistics (logistics_spend)
= CM1 (Contribution Margin 1)
  − Marketing (marketing_spend)
  − Operating costs (opex)
= Net Margin

Margly calculates all three levels according to your VAT setting (incl. VAT / excl. VAT) — the formulas respect your configuration.

Gross margin#

Revenue − purchase prices of sold goods. The percentage is gross margin divided by revenue × 100.

When to track it: the simplest KPI, you see it for every product. When it's low, you have a problem with purchase prices or selling prices.

Target for an e-shop: typically 30–50 %. Below 25 % is a problem (you'll have nothing to pay the rest from).

CM1 (Contribution Margin 1)#

Gross margin − logistics. Tells you how much you have left after delivering a package to the customer.

When to track it: if you have lots of small orders (logistics eats into profit). Track the difference between CM1 and gross margin — if the difference is >10 %, it's time to think about a minimum cart value for free shipping.

Net margin#

CM1 − marketing − operating costs (opex). This is the final money that remains for you.

When to track it: always. It's your main KPI. If it's in the negative, you are selling at a loss.

Target for an e-shop: typically 5–15 % in the Czech Republic. Below 5 % you have a very thin reserve, above 20 % you are excellent.

Break-even ROAS#

Margly calculates a break-even threshold for each campaign's ROAS — below it the ad loses money, above it earns. Formula:

Break-even ROAS = 100 / your margin in %

Margly can calculate three variants (default is net margin):

BaseWhat it includesWhen it is used
net (default)COGS + logistics + marketing + opexMost accurate — includes all costs. Requires imported costs.
cm1 (fallback)COGS + logisticsIf you don't have imported operating/marketing costs.
gross (fallback)COGS onlyIf you don't even have logistics. Conservative, higher break-even threshold.

Example: net margin 15 % → break-even ROAS = 100 / 15 ≈ 6.67. ROAS below 6.67 = loss, above 6.67 = profit.

VAT and margins#

Margly calculates margins according to your VAT preference in VAT settings:

  • Show with VAT (default) — revenue with VAT, COGS with VAT, margin with VAT. Better for non-VAT-payers or comparison with the cash register.
  • Show without VAT — revenue without VAT, COGS without VAT, margin without VAT. Better for VAT payers, because VAT doesn't affect their profit.

What to do when margins don't match#

  1. Gross margin 100 % — purchase prices are missing. Fill them in your e-shop administration (Shoptet, Upgates, Shopify) — Margly will pull them on the next data sync. Manual entry of purchase prices in Margly is not available. (PDF / Excel import is only for operating costs like logistics, marketing, opex, not for product purchase prices.)
  2. Net margin significantly higher than reality — you haven't included all costs. Add payroll, rent, marketing.
  3. Break-even ROAS "—" — Margly doesn't have enough data to calculate the margin (costs at all levels are missing). Then break-even cannot be precisely determined.
  4. ROAS is "—" for a campaign — you don't have an ad platform connected or no campaign was running in the period.

What's next#

Was this helpful?

Related articles