How to calculate profit margin on Shopify, with examples
Plenty of Shopify stores look busy and still lose money. Revenue climbs, orders come in, and yet the bank balance doesn't move. The usual reason is that nobody has worked out the real profit on each order once product cost, shipping, payment fees, discounts and ads are taken out. This guide shows how to calculate profit margin for a Shopify product step by step, with a worked example you can copy.
All numbers below are example figures for a made-up product. Swap in your own costs and fees, which depend on your plan, payment provider, carrier and country.
Margin vs. markup: get this right first
These two get mixed up all the time, and the mix-up leads to underpriced products.
- Markup compares profit to cost: (price − cost) ÷ cost. A product that costs $10 and sells for $20 has a 100% markup.
- Margin compares profit to price: (price − cost) ÷ price. The same product has a 50% margin.
If you aim for a "50% margin" but actually add 50% on top of cost, you end up with a 33% margin. When you set prices, decide which one you mean and stick to it. The rest of this post uses margin.
Step 1: Work out your true cost of goods (COGS)
Cost of goods sold is everything it takes to get one unit ready to ship, not just the supplier price. Add up:
- The unit price from your supplier or manufacturer
- Inbound shipping and any import duties, divided across the units in the shipment
- Packaging: box or mailer, tissue, inserts, labels
- Any per-unit print, assembly or customization cost
Example: a $9.00 unit price, $1.20 per unit of inbound freight and $0.80 of packaging gives a COGS of $11.00.
Step 2: Add the costs of each order
Some costs happen once per order, not once per product. These are the ones sellers forget most often.
- Payment processing fees. Usually a percentage of the order plus a fixed amount. Check the exact rate for your Shopify plan and payment provider.
- Outbound shipping. What you pay the carrier, minus anything the customer pays you for shipping. If you offer free shipping, the whole label cost is yours.
- App fees charged per order, if any of your apps bill that way.
Example: a $40.00 sale with an example fee of 2.9% + $0.30 costs $1.46 in processing. A $6.00 shipping label with free shipping for the customer adds $6.00.
Step 3: Calculate gross profit and margin
Now put it together:
- Profit per order = price − COGS − payment fees − shipping cost
- Profit margin = profit per order ÷ price × 100
Example: $40.00 − $11.00 − $1.46 − $6.00 = $21.54 profit. $21.54 ÷ $40.00 = a 53.9% margin before marketing. That looks healthy, but there is more to take out.
Step 4: Account for discounts
A discount comes straight out of profit, not out of revenue in general. Using the example above, a 20% off code drops the price to $32.00. Processing fees fall a little, to $1.23, but COGS and shipping stay the same, so profit drops to $13.77 and margin to 43.0%. A 20% discount cut profit per order by about 36%.
That is why it helps to run the numbers before a sale, not after. The free Sale & Promo Discount Calculator shows what a discount does to your margin in a few seconds.
Step 5: Find your break-even ROAS
If you run ads, you need to know how much you can spend to win an order before you start losing money. That number is your break-even ROAS (return on ad spend).
- Break-even ROAS = price ÷ profit per order before ads
Example: at full price, $40.00 ÷ $21.54 = a break-even ROAS of about 1.86. If ads bring in less than $1.86 in sales for every $1 spent, each ad-driven order loses money. During the 20% off sale, break-even ROAS rises to $32.00 ÷ $13.77, or about 2.32, so the same ads need to work harder. Try your own numbers with the free Ad Spend & ROAS Calculator.
Step 6: Remember the costs that aren't per order
Your Shopify subscription, monthly app subscriptions, your domain, design tools and any help you pay for are fixed costs. They don't belong in the per-order margin, but they have to be covered by it. Add them up for the month, then divide by the profit per order to see how many orders you need just to break even. The free Break-Even Sales Calculator does this math for you.
What is a "good" profit margin?
There is no single right answer. It depends on your product category, how much you spend on ads, your return rate and how much of your time the store takes. A useful way to think about it: your margin after ads needs to cover your fixed costs, leave room for returns and slow months, and still pay you. If one product can't do that at a price customers accept, it may be better as a bundle add-on, or not worth stocking.
Common mistakes to avoid
- Using the supplier price as your whole product cost and leaving out freight and packaging.
- Forgetting payment processing fees because they're taken out before payouts arrive.
- Offering free shipping without adding the label cost to the margin math.
- Judging ads by ROAS alone without knowing your break-even ROAS.
- Calculating margin once at launch and never updating it when supplier prices or shipping rates change.
A quick pricing checklist
- Write down full COGS for every product, including freight and packaging.
- Look up your actual payment processing rate and typical shipping label cost.
- Calculate profit and margin at full price and at your usual discount.
- Work out break-even ROAS for every product you advertise.
- Total your monthly fixed costs and find your break-even order count.
- Recheck everything when a supplier, carrier or fee changes.
Want it in one spreadsheet?
The Profit & Pricing Calculator puts this in a single spreadsheet for Google Sheets and Excel: a pricing and margin calculator, COGS, a discount calculator and break-even ROAS. Enter your own numbers instead of rebuilding the formulas each time. It is also available on Etsy (opens in a new tab).
If you'd like to talk pricing with other sellers, the free Shopify Store Ops Club (opens in a new tab) on Skool is a good place to ask.
This is general guidance, not tax or financial advice. Check fees and tax rules for your own store and country.