How to Calculate Profit Margin for Your Online Store
A complete breakdown of profit margin for online stores: the formula, real examples with platform fees, and the minimum margin you need to survive.
This guide provides educational estimates. Consult an accountant before making pricing or business decisions.
Calculator
Results update as you type
The profit margin formula for online stores
Profit margin tells you what percentage of every dollar in sales actually becomes profit after costs. For an online store, the core formula is straightforward:
Gross Margin = (Revenue − Cost of Goods Sold) ÷ Revenue × 100
If you buy a product for $15 and sell it for $40, your gross margin is ($40 − $15) ÷ $40 × 100 = 62.5%. That sounds great — but platform fees, shipping, and ads aren’t in that number yet.
Why platform fees destroy margins you didn’t account for
Most new sellers calculate margin using just cost and selling price. That’s a mistake. Every platform takes a cut before money reaches your bank account.
| Platform | Transaction fee | Payment fee | Listing fee |
|---|---|---|---|
| Etsy | 6.5% | 3% + $0.25 | $0.20 per item |
| Shopify (Basic) | None* | 2.9% + $0.30 | Monthly plan |
| Amazon (FBM) | 8–15% | Included | $0.99/item or plan |
| eBay | 12.35% avg | Included | Free (limit) |
Using the same $15 cost / $40 price example on Etsy:
- Transaction fee: $40 × 6.5% = $2.60
- Payment processing: $40 × 3% + $0.25 = $1.45
- Listing fee: $0.20
- Shipping (assume free to buyer, $5 cost): $5.00
- Total fees + cost: $15 + $2.60 + $1.45 + $0.20 + $5 = $24.25
- Real net: $40 − $24.25 = $15.75 → 39.4% real margin
That 62.5% gross margin became 39.4% once real costs were included. Add $5 of ad spend per sale and it drops to 26.9%.
What margin do you actually need to survive?
There is no universal answer, but these are the thresholds that matter in practice:
Below 20% net
Danger zone. One bad month, return spike, or shipping increase wipes profit.
20–35% net
Viable. Tight. You can survive but have little room to invest in growth.
35%+ net
Healthy. Enough margin to absorb surprises and reinvest in ads or inventory.
How to calculate net margin step by step
Net margin accounts for every cost, not just product cost:
- Start with selling price. This is what the buyer pays.
- Subtract COGS. Product cost + packaging + inbound shipping.
- Subtract outbound shipping. Even if you offer “free shipping”, you pay it.
- Subtract platform transaction fees. Percentage of sale price.
- Subtract payment processing fees. Usually 2.9–3.5% + fixed amount.
- Subtract ad spend per unit. Total monthly ad spend ÷ units sold.
- Subtract returns cost. If 5% of sales are returned, allocate a portion per unit.
- Divide result by selling price × 100. That is your net margin.
Margin vs. markup: which number should you use?
This trips up most new sellers. Markup is calculated from cost. Margin is calculated from price. They are not interchangeable.
Product cost: $20 | Selling price: $50
Markup = ($50 − $20) ÷ $20 × 100 = 150%
Margin = ($50 − $20) ÷ $50 × 100 = 60%
Use markup when calculating how much to add to cost to arrive at a price. Use margin when reporting profitability or comparing products. Never confuse a 50% markup with a 50% margin — a 50% markup gives you only a 33% margin.
Three pricing mistakes that destroy online store margins
1. Pricing based on competitors without knowing your own costs
Matching a competitor’s price makes sense only if your cost structure is similar. A competitor with 1,000 units/month of purchase volume has lower COGS than a seller buying 20 units. Pricing to match can mean selling at a loss.
2. Ignoring return rates in the margin calculation
If 8% of your sales are returned and you’re not accounting for this, your real margin is lower than you think. A returned item typically costs you shipping both ways plus time to re-list or dispose of the item.
3. Not recalculating margin when shipping rates change
Carrier rates increase once or twice a year. A $1 increase in shipping cost on a product with a $5 profit per unit is a 20% margin hit. Review your margin whenever your carrier rates change.
Use the free profit margin calculator
Enter your cost price and selling price into the Profit Margin Calculator to instantly see gross margin, markup percentage, and gross profit in dollars. You can also set a target margin to back-calculate the selling price you need.
For a more complete picture that includes platform fees and shipping, use the Etsy Profit Calculator or Shopify Profit Calculator.
Formula
The math behind the result
How it works
A clean flow from input to answer
- 1Find your total revenue and cost of goods sold (COGS).
- 2Subtract platform fees, payment fees, shipping, and ad spend.
- 3Divide by revenue and multiply by 100 to get margin as a percentage.
FAQ
Common questions
What is a good profit margin for an online store?
For e-commerce, a gross margin of 40–60% is healthy. Net margin (after all costs including ads) of 10–20% is strong. Below 10% net leaves little room for errors or growth.
What is the difference between profit margin and markup?
Markup is profit divided by cost. Margin is profit divided by selling price. A 50% markup produces a 33% margin — they are not the same number.
Do platform fees count in margin calculation?
Yes. Etsy charges 6.5% transaction fee plus listing fees. Shopify charges payment processing (2.9% + 30¢ on basic plan). These must be subtracted before calculating real margin.
Should I use gross margin or net margin to price products?
Use gross margin for quick product-level decisions. Use net margin for overall business health. Always price with the intention of hitting a target net margin.
How do I know if my margin is too thin?
If a 10% drop in sales or a small cost increase would push you into loss, your margin is too thin. Most healthy online stores need at least 30% gross margin to survive unexpected costs.
Does the free calculator store my numbers?
No. All calculations run in your browser. No data is sent to a server.