Cost of goods sold (COGS): what it is, how to calculate it, and what goes into the cost of selling on Mercado Livre and Shopee
Cost of goods sold (COGS) is the cost to you of the products sold from your stock during a given period. The formula is COGS = beginning inventory + purchases − ending inventory, all at cost. A store that started October with R$ 30 mil in stock, bought R$ 40 mil, and ended with R$ 36 mil had COGS of R$ 34 mil, not R$ 40 mil. On a marketplace, where commission, shipping, tax, and Ads take 30% to 45% of the price, COGS above 50% of revenue almost always means zero profit.
COGS is the biggest expense for almost every store, so errors in this figure distort your margin more than anything else. I’ll show you two ways to calculate it and what to include and leave out.
#Two ways to calculate COGS
Using inventory (for the full month):
COGS = beginning inventory + purchases − ending inventory
| Item | Amount |
|---|---|
| Beginning inventory (October 1) | R$ 30.000 |
| (+) October purchases | R$ 40.000 |
| (−) Ending inventory (October 31) | R$ 36.000 |
| October COGS | R$ 34.000 |
This calculation requires counting your stock or using a system that tracks stock at cost at the beginning and end of the month.
Per sale (product by product):
COGS = units sold × product's weighted average cost
This method lets you see the margin on each order. Add up the COGS for all sales during the month, and you’ll get the same figure as the stock-based calculation, as long as your costs are accurate and there are no losses.
#Weighted average cost: the right cost for each unit
When you buy the same product multiple times at different prices, the cost of each unit sold is the weighted average cost of your stock:
| Purchase | Units | Unit cost | Total |
|---|---|---|---|
| Previous stock | 100 | R$ 20.00 | R$ 2.000 |
| New purchase | 200 | R$ 23,00 | R$ 4.600 |
| Average cost | 300 | R$ 22,00 | R$ 6.600 |
Future sales are recorded at R$ 22 until your next purchase changes the average. Using R$ 20 (the earlier purchase price) inflates your margin; using R$ 23 (the latest price) lowers it. I explain the effect in the costing mistake that makes your margin look ten points higher.
#What goes into COGS
- Product purchase price.
- Shipping for the purchase, allocated across the units.
- Nonrecoverable taxes on the purchase (under Simples, taxes listed on the purchase invoice are generally included in cost; the interstate tax rate difference paid on the purchase is included too).
- Assembly or preparation of the product before sale, if applicable.
#What doesn’t go into COGS
- Marketplace commission and fixed fee.
- Shipping cost to the buyer (on Mercado Livre) and shipping adjustments (on Shopee).
- Shipping packaging, label, and tape.
- Sponsored listing.
- Sales tax.
These are variable selling costs. They fall between gross profit and contribution margin on the income statement. Mixing them into COGS makes it harder to see how much goes to the supplier and how much goes to the marketplace. See the full model in the income statement for a marketplace store.
#What percentage should COGS be?
There’s no single right percentage for every store, but there is a logical limit. Add up what the marketplace and your operations take from each sale:
| Item | Typical % of price |
|---|---|
| Commission and shipping (or fixed fee) | 20% a 35% |
| Tax (Simples) | 4% a 10% |
| Listing ads | 0% a 10% |
| Packaging and returns | 1% a 4% |
| Total before COGS | about 30% to 45% |
If all of this already takes 40% of the price and COGS is 50%, only 10% is left to cover fixed expenses and generate profit. That’s why, for marketplace sellers, COGS above 50% of revenue is a warning sign, and above 60% almost certainly means a loss.
In practice. A small electronics store had COGS at 58% of revenue and couldn't understand why there was never any money left, since it was "selling at a 40% margin." The margin it calculated was based on cost, not price, and ignored the 12% to 14% commission and shipping. When it calculated COGS by product, its best-selling accessories had COGS at 65%. The solution wasn't to cut supplier costs, which were already as low as possible, but to sell these accessories in bundles, with a higher average order value and shipping costs spread across more items.
#The most common COGS mistakes
- Using the month's total purchases as COGS. Purchases are an investment in stock; COGS is what went out through sales. In a month with large purchases, the results look like a loss; the next month shows a false profit.
- Using the cost from the latest invoice instead of the average cost.
- Forgetting the shipping cost on purchases, which can exceed 10% of the cost for cheap, bulky products.
- Not recording losses and damage. A product broken in stock is a cost, even if it was never sold.
- Incorrect cost entered for a bundle listing. The cost of a bundle is the sum of its components, not the cost of one unit. I wrote about this in bundles on Mercado Livre.
#The right cost for every order
To know the margin on each sale, COGS needs to be assigned to the order using the average cost at the time. Milewa applies each product's cost to every Mercado Livre and Shopee order, separates "new purchase," which applies going forward, from "correction," which rewrites the history, and flags orders with no cost entered—the ones that distort margin the most. You can import costs from a spreadsheet or from an export from Bling, Tiny, or Omie.
#Frequently asked questions
What is COGS?
COGS stands for cost of goods sold: what the products sold during a given period cost you. It isn't the total amount you bought that month. It's the cost of what actually left stock through sales.
How do you calculate COGS?
Use the formula COGS = beginning inventory + purchases during the period − ending inventory, all at cost. With beginning inventory of R$ 30 mil, purchases of R$ 40 mil, and ending inventory of R$ 36 mil, COGS is R$ 34 mil. To calculate it by sale, multiply the units sold by each product's weighted average cost.
Does marketplace commission count toward COGS?
No. COGS includes only the cost of the goods: purchase price, shipping on purchases, and purchase taxes that can't be recovered. Commission, shipping to the buyer, packaging, and listing costs are variable selling costs and appear as separate lines on the income statement.
What is the ideal COGS for marketplace sellers?
There's no single number, but COGS needs to leave room for commission, shipping, tax, and Ads, which together often take 30% to 45% of the price on marketplaces. That's why COGS above 50% of revenue leaves little or no profit for most stores.
#Sources
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.
The cost of every sale, without an inventory spreadsheet
Milewa applies each product's cost to every Mercado Livre and Shopee order, using average cost and purchase history, and shows your real margin. You can import costs from a Bling or Tiny spreadsheet. Try it free for 14 days, no card required.
14 days freeNo credit card requiredMercado Livre and Shopee