Profit margin: how to calculate it for each marketplace sale (with formula and example)
Profit margin is how much you keep from each real in sales after paying all the costs for that sale: margin = (price − sale costs) ÷ price × 100. A product sold for R$ 100 on Mercado Livre, with a 12% commission, R$ 14,95 shipping, 6% tax, a cost of R$ 40, and R$ 0,60 packaging, leaves R$ 26,45, a 26.45% margin. If you do the same calculation using only the product cost, you’ll get 60%. That gap is why a store can bring in plenty of revenue and still end the month with no money.
The formula is simple. The tricky part is knowing what to include. I’ll show you the formula, what counts as "sale costs" on a marketplace, and what margin you need to end the month with a profit.
#The profit margin formula
There are three ways to write the same calculation, and they all give the same result:
- In reais: profit per sale = price − sale costs.
- As a percentage: margin = profit per sale ÷ price × 100.
- In Excel: with the price in B2 and the costs in C2,
=(B2-C2)/B2, with the cell formatted as a percentage.
Margin is always calculated based on the selling price. When you calculate it based on cost, it’s called markup, and the numbers look much higher. I explain the difference in markup: what it is and why it can be misleading.
#What goes into marketplace selling costs?
Anything that only exists because that sale happened. On Mercado Livre and Shopee, the minimum list is:
| Cost | How it’s charged | In the R$ 100 example |
|---|---|---|
| Commission | % of the price, by category (ML) or tier (Shopee) | R$ 12.00 |
| Shipping cost (ML) or fixed fee (Shopee) | R$ per unit, by weight and tier (ML) or by tier (Shopee) | R$ 14.95 |
| Tax | % of the price (effective Simples tax rate) | R$ 6,00 |
| Product cost | R$ per unit, average stock cost | R$ 40,00 |
| Packaging and label | R$ per unit | R$ 0,60 |
| Profit on the sale | R$ 26.45 |
The example uses a 300-gram product, Classic with a 12% commission and green reputation, based on the official September 2026 shipping table. See the full calculation in how much you keep from a R$ 100 sale.
Note that this 26.45% margin still doesn’t account for paid listings, returns, or the store’s fixed expenses. It has a name: contribution margin. It’s how much each sale contributes toward paying for the rest of the operation. I explain the different layers in gross, contribution, and net margin.
#How margin changes with price
Margin isn’t a property of the product. It depends on the product’s price and sales channel. Here’s the same 300-gram item, with a cost of R$ 40, on Mercado Livre:
| Price | Profit per sale | Margin |
|---|---|---|
| R$ 59,90 | R$ 0,37 | 0,6% |
| R$ 78,99 | R$ 16,02 | 20,3% |
| R$ 79.00 | R$ 11.23 | 14,2% |
| R$ 100.00 | R$ 26.45 | 26,5% |
| R$ 129.00 | R$ 48.23 | 37,4% |
Two things stand out in this table. Margin grows much faster than the price because the product cost and shipping stay the same while revenue rises. And there’s a jump between R$ 78,99 and R$ 79: raising the price by one cent cuts profit by R$ 4,79 because the shipping cost moves to a different tier.
In practice. An automotive accessories seller told me he worked "with a 40% margin on everything." In his spreadsheet, margin meant price minus product cost, divided by price. When we recalculated it with commission, shipping, and tax, the average dropped to 17%, and his seven best-selling products, all under R$ 50, were between 3% and 8%. His formula wasn’t wrong. He was leaving things out.
#What margin do you need?
There’s no one right margin for everyone. There’s a minimum, and it depends on your operation.
Each sale’s margin needs to cover more than just the sale itself:
- Paid listings, as a percentage of revenue. If you spend 8% of revenue on Mercado Ads or Shopee Ads, 8 percentage points of your margin are already spoken for.
- Returns, which can wipe out the entire sale and sometimes the return shipping cost, too. A store with a 3% return rate loses roughly that much margin.
- Fixed expenses: rent, salaries, software, accountant fees, and your own pay. Divide the month’s total by the month’s revenue.
Add the three together. That’s the minimum margin per sale needed for the store to make a profit. With 8% for Ads, 2% for returns, and 7% for fixed expenses, the minimum is 17%. Any product below that is being subsidized by the others.
For the reverse calculation—how many sales it takes to cover the month’s bills—see your store’s break-even point.
#Three mistakes that inflate margin
Calculating based on cost. A 50% margin and 100% markup describe the same product. If someone says "I make 100% on top," they’re talking about markup.
Forgetting the channel’s variable costs. Commission, shipping, and tax together take 25% to 45% of the price of a typical product. Leave any of them out, and your margin becomes a number that only looks good on paper.
Using the wrong purchase cost. If you bought the same product for R$ 32 in January and R$ 40 in September, today’s margin needs to use today’s cost or the average stock cost. Using the old purchase price inflates your margin without you noticing. I show the impact in the cost mistake that inflates your margin.
#How to calculate margin correctly
For one product, the formula is simple: subtract commission, shipping or fixed fees, tax, product cost, and packaging from the price, then divide by the price. To test different prices before changing a listing, the Milewa calculator uses the current Mercado Livre and Shopee tables.
For your entire store, margin needs to be calculated order by order, because the same product sells at different prices, with different promotions and shipping costs, throughout the month. Milewa does this using your actual orders: it applies the commission and shipping charged by the marketplace, your cost and tax, adds the Ads spend for each listing, and shows margin by order, product, and for the entire month. It also flags products below your minimum.
#Frequently asked questions
How do you calculate a product’s profit margin?
Subtract all the costs of that sale (product, commission, shipping, tax, and packaging) from the selling price, then divide the result by the price. Multiply by 100 to get the percentage. A product sold for R$ 100 that leaves R$ 26,45 after these costs has a 26.45% margin.
Is profit margin calculated based on cost or price?
Based on the selling price. When you calculate it based on cost, the correct term is markup. The difference matters: a product that costs R$ 50 and sells for R$ 100 has a 100% markup and a 50% gross margin. Since marketplace commission and tax are percentages of the price, margin based on price is the right way to compare them.
What’s a good profit margin for selling on Mercado Livre?
There’s no universal number, but there is a logical minimum: before Ads, each sale’s margin needs to be higher than your Ads spend plus the share of revenue lost to returns and fixed expenses. A store that spends 8% on Ads and has fixed expenses equal to 7% of revenue needs a margin above 15% per sale just to break even.
How do you calculate profit margin in Excel?
With the price in column B and the total sale costs in column C, use =(B2-C2)/B2 and format the cell as a percentage. The most common mistake is putting only the product cost in column C and forgetting commission, shipping, and tax. That can make the margin look two or three times higher than it really is.
#Sources
- Mercado Livre — Shipping costs for MercadoLíder, sellers with a green reputation, or sellers without a reputation
- Mercado Livre — Costs of selling a product
- Shopee — Commission policy for CNPJ and CPF sellers
Marketplace fees change. The numbers in this article are valid for the period mentioned — before setting your price, check the current table in your account.
See your margin for every order, without a spreadsheet
Milewa calculates the margin for every order in your store using the actual commission, shipping, and tax, and adds the Ads spend for each listing. See which products support your operation and which just move money around. 14 days free, no card required.
14 days freeNo credit card requiredMercado Livre and Shopee