Features Integrations Pricing Calculator Blog Log in Start free trial
PortuguêsEspañolEnglish简体中文
Margin and costs

Selling price formula: the calculation that includes marketplace commission, shipping, and tax

The marketplace selling price formula is: price = (product cost + fixed costs per unit) ÷ (1 − commission − tax − Ads − desired margin). For a product that costs R$ 25, weighs 300 grams, and has a 6% tax rate and a 15% margin, the price comes to R$ 50,37 on Mercado Livre (with a 12% commission) and R$ 51,02 on Shopee. In both cases, the numbers check out: exactly 15% remains after all fees.

Most pricing formulas out there were made for brick-and-mortar stores: cost, expense, margin, done. That doesn't work on marketplaces for one simple reason. The two biggest expenses in a sale—commission and tax—are percentages of a price you haven't figured out yet. That's why the formula has to divide, not multiply.

#The selling price formula, piece by piece

Every expense in a sale falls into one of two groups.

Expenses in reais per unit, which don't change when you raise or lower the price:

  • product cost;
  • packaging and label;
  • Mercado Livre shipping cost (based on weight and price range);
  • Shopee's fixed fee per item (R$ 4,50 up to R$ 79,99; R$ 16, R$ 20, or R$ 26 above that).

Expenses as a percentage of the price, which increase along with it:

  • marketplace commission;
  • tax on the sale (the effective rate under Simples);
  • sponsored listing, if you want the price to cover Ads;
  • the margin you want to keep.

The formula combines the two groups like this:

Price = total expenses in reais ÷ (1 − total percentages)

The divisor is the share of the price left to cover expenses in reais. If commission, tax, and margin add up to 33%, then 67% of the price is left to cover the product, packaging, and shipping. That's why you divide by 0.67.

#Example on Mercado Livre

A product that costs R$ 25, weighs 300 grams, and has R$ 0,60 packaging, a Classic listing in a 12% category, 6% tax, no Ads, and a desired margin of 15%.

  1. Choose the likely price range. A price around R$ 50 falls in the R$ 49 to R$ 78,99 range, where shipping for a package weighing up to 300 g costs R$ 8,15.
  2. Add the expenses in reais: R$ 25 + R$ 0,60 + R$ 8,15 = R$ 33,75.
  3. Add the percentages: 12% + 6% + 15% = 33%. The divisor is 0.67.
  4. Divide: R$ 33,75 ÷ 0.67 = R$ 50,37.
  5. Check the range: R$ 50,37 is between R$ 49 and R$ 78,99. The shipping cost used is correct.
Line Amount
Price R$ 50,37
Commission (12%) R$ 6,04
Tax (6%) R$ 3,02
Shipping cost R$ 8,15
Product and packaging R$ 25,60
Left over R$ 7,56 (15,0%)

#Example on Shopee

Same product, same tax, same margin, on Shopee:

  1. Around R$ 50, the product falls in the range up to R$ 79,99: 20% commission and a R$ 4,50 fixed fee.
  2. Expenses in reais: R$ 25 + R$ 0,60 + R$ 4,50 = R$ 30,10.
  3. Percentages: 20% + 6% + 15% = 41%. Divisor: 0.59.
  4. Price: R$ 30,10 ÷ 0.59 = R$ 51,02.

Shopee calls for a similar price to get the same margin, but for different reasons: higher commission and no weight-based shipping cost. For heavier products, Shopee becomes more favorable because weight isn't part of the calculation. I compared the two channels in Shopee fees in 2026.

#The price-range trap: when the calculated price changes the cost itself

Here's the step almost everyone skips. Mercado Livre's shipping cost and Shopee's fixed fee depend on the price range. If the calculated price falls into a different range than the one you used, the calculation is wrong.

Take a product that costs R$ 45, weighs 400 grams, and has a 15% margin, on Mercado Livre:

  • First try, using the shipping cost for the R$ 49 to R$ 78,99 range (R$ 8,25): (R$ 45 + R$ 0,60 + R$ 8,25) ÷ 0.67 = R$ 80,37. But R$ 80,37 is already in the R$ 79 to R$ 99,99 range, where shipping costs R$ 13,85.
  • Second try, using R$ 13,85: (R$ 45 + R$ 0,60 + R$ 13,85) ÷ 0.67 = R$ 88,73. Now the price falls in the range used. That's the right price for a 15% margin.

And this is where a decision comes in that the formula can't make for you. At R$ 78,99, still in the cheaper shipping range, this product has a 13,8% margin. At R$ 88,73, it has a 15% margin. That's almost R$ 10 more on the listing for a 1,2-point increase in margin. In most categories, selling at R$ 78,99 converts much better and ends up bringing in more profit that month. I explain this price jump in free shipping on Mercado Livre: who pays.

On Shopee, calculating the same product in the first range would give you R$ 84,92, which falls outside that range. Recalculating in the R$ 80 to R$ 99,99 range (14% + R$ 16), the price for a 15% margin is R$ 94,77. At R$ 79,90, still in the first range, the margin is 11,3%.

In practice. A tool seller sent me the pricing spreadsheet he had built himself. The formula was flawless, but it used one flat shipping cost of R$ 14 for every product. Items under R$ 79 were priced too high because their shipping cost was much lower. Heavy items over 5 kg were priced too low because their shipping cost was R$ 20 to R$ 40. The formula was right. The input was wrong in both directions.

#How to include sponsored listings in your price

If you invest in Mercado Ads or Shopee Ads, there are two honest choices:

  1. Include Ads in the divisor. With 8% in Ads, the divisor in the Mercado Livre example goes from 0.67 to 0.59, and the price rises from R$ 50,37 to R$ 57,20. The price covers the Ads spend.
  2. Keep the price and accept a lower margin. The same R$ 50,37 with 8% in Ads leaves you with a 7% margin, not 15%.

What you can't do is calculate the price without Ads, then spend 10% of your revenue on Ads and expect your margin to stay the same. I wrote about this in Good ACOS, bad profit.

#The formula in one line, for reference

Price = (product + packaging + shipping or flat fee) ÷ (1 − commission − tax − Ads − margin), then check that the price falls in the same shipping or commission tier used in the calculation.

If you picked your current markup by guesswork, read why markup can be misleading on marketplaces. And if you want to test it without a spreadsheet, the Milewa calculator has a "price for X% margin" mode that automatically recalculates the tier.

For your entire catalog, the formula needs three details that change every week: the actual commission for each listing, the shipping cost for the correct weight, and your up-to-date cost. Milewa pulls all three from your account, calculates the ideal price for each listing based on the margin you choose, and shows which listings fall short, with the difference in reais per sale.

#Frequently asked questions

What is the sales price formula?

For marketplaces: price = (product cost + fixed costs per unit) ÷ (1 − commission − tax − Ads − target margin), with percentages written as decimals. Fixed costs per unit don't change with the price, such as Mercado Livre shipping, Shopee's flat fee, and packaging.

How do you calculate a product's sales price with a 30% margin?

Add the percentages taken from the price (commission, tax, and Ads) to the 30% margin, then subtract the total from 1. Divide the product cost plus fixed costs per unit by that number. With a total cost of R$ 33,75, a 12% commission, and 6% tax, the divisor is 1 − 0,48 = 0,52, and the price is R$ 64,90. Then check that the shipping cost you used matches the tier the price falls into.

Why doesn't the calculated price always deliver the expected margin?

Because Mercado Livre shipping and Shopee's flat fee change by price tier. If you calculate using the cost for one tier and the final price falls into another, your margin will be different. To fix it, recalculate using the cost for the new tier until the price falls into the same tier used in the calculation.

#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.

Let the formula run automatically for every listing

Milewa calculates the ideal price for each listing based on the margin you choose, using your actual category commission, the shipping tier for the correct weight, and your tax. 14 days free, no card required.

Start my free trial Calculate a sale now

14 days freeNo credit card requiredMercado Livre and Shopee

Real profit from every sale14 days free · no credit card required

Try it free