What is Gross Margin?
Gross margin is net sales minus cost of goods sold, divided by net sales, as a percentage. It is the first profitability check for any store, and it varies by product, so the store-wide figure can hide products that lose money.
Also known as: Gross profit margin
Key takeaways
- Formula: gross margin = (net sales − cost of goods sold) ÷ net sales × 100.
- Calculate it per product and category, not just for the store.
- Discounts lower gross margin directly - a 20% discount removes far more than 20% of the profit on a low-margin item.
- Common mistake: leaving cost prices blank in the store, so margin reports overstate profit or skip those products.
- Formula
- Gross Margin = (Net sales − COGS) ÷ Net sales × 100
- Benchmark
- Ranges widely by category - resellers of branded goods often run much thinner margins than brands selling their own products. Track it per product.
Gross margin is the share of each sale your store keeps after paying for the goods it sold. Revenue tells you how busy you are; gross margin tells you how much of that activity can pay for marketing, shipping, staff, software and, eventually, profit.
It is the first profitability check for any online store, and easy to get wrong: a healthy store-wide margin can hide products that lose money on every order.
What Is Gross Margin?
Gross margin (also called gross profit margin) is net sales minus the cost of goods sold, expressed as a percentage of net sales. Cost of goods sold (COGS) is what you paid for the products themselves - the supplier price or cost to make them, and usually inbound freight.
The amount left over is gross profit. Divide it by net sales and you get gross margin. It sits before shipping to customers, payment fees and marketing; once you take those off too, you reach contribution margin.
🧒 Explained simply You sell a cup of lemonade for $1. The lemons, sugar and cup cost you 40 cents. You keep 60 cents from every cup, so your gross margin is 60%. That 60 cents is what pays for the sign, the table and your time.
How to Calculate Gross Margin
Gross Margin = (Net sales − COGS) ÷ Net sales × 100
Say a store had $50,000 in net sales last month, and the products it sold cost $30,000.
($50,000 − $30,000) ÷ $50,000 × 100 = 40% gross margin
So for every $100 sold, $40 is left to cover everything else.
Details that matter:
- Start from net sales. Use sales after discounts and refunds, without shipping or tax. Using gross sales makes margin look better than it is.
- Match costs to what sold. COGS is the cost of the units sold in the period, not everything you bought in the period.
- Keep cost prices up to date. If supplier prices rise and the store still holds the old cost, margin reports will be too optimistic.
- Watch for blank cost prices. A product with no cost recorded can appear to have a 100% margin. Before trusting any margin report, check that every product you sell has a cost price.
- Margin is not markup. Buying at $60 and selling at $100 is a 40% margin but a 67% markup. Mixing the two leads to underpricing.
Why Gross Margin Matters
It sets your marketing budget. Every acquisition and ad decision is paid for out of gross profit. A store with thin margins can afford far less per customer than one with healthy margins, and its break-even return on ad spend is much higher.
It shows which products earn their place. Some products sell well but leave almost nothing behind. Margin by product and category reveals them, along with the quieter products that make most of the profit.
It exposes the real cost of discounts. Discounts come straight out of margin. Say a product sells for $100 and costs $70 - a 30% margin and $30 profit. A 20% discount drops the price to $80 and the profit to $10, wiping out two-thirds of the profit, not a fifth.
What Is a Good Gross Margin?
It ranges widely by category and business model. Resellers of branded goods often run much thinner margins than brands selling their own products, and handmade or premium products differ again. A single "good" figure does not fit every store.
Track it per product and per category against your own history instead. Look for products whose margin is shrinking, categories that sell well but contribute little profit, and months where promotions pulled the store-wide figure down.
How to Improve Gross Margin
1. Fill in and maintain cost prices
You cannot manage what you cannot see. Record a cost price for every product and variant in your store, and update it when supplier prices change.
2. Review pricing product by product
Raise prices on products with strong demand and thin margin first. Small, targeted increases often protect margin with little effect on order volume.
3. Make discounts narrower
Swap sitewide percentage-off sales for targeted offers - specific products, bundles or free gifts with a low cost to you. Avoid deep discounts on items whose margin is already low.
4. Shift the mix toward higher-margin products
Feature high-margin products in navigation, emails and recommendations, and bundle a high-margin accessory with popular low-margin items.
5. Reduce refunds on problem products
Refunds take away revenue, and returned items can arrive damaged or unsellable. Fixing product descriptions and sizing for the few products behind most refunds protects margin directly.
How to Track Gross Margin
Chartsy for Ecommerce connects to your BigCommerce store with read-only access and syncs orders, products and customers every hour. It reports net sales, discounts and refunds from your order history, and gross profit by month, product and category when cost prices are recorded in your store.
Where cost prices are missing, Chartsy can't fill them in, so adding them to your products is the first step to reliable margin reports. You can also ask ChartsyAI for a chart or report:
- "Show gross profit by category for the last six months"
- "Which products had the lowest gross margin last quarter?"
- "How did gross profit change in the month of our spring sale?"
Try Chartsy for Ecommerce free for 14 days →
Gross Margin in Chartsy
Chartsy reports gross profit by month, product and category when cost prices are recorded in your store. Where cost prices are missing, it can’t fill them in.
Frequently asked questions
What is the difference between gross margin and markup?
Gross margin is profit as a share of the selling price, while markup is profit as a share of the cost. A product bought for $60 and sold for $100 has a 40% margin and a 67% markup. Pricing with markup while thinking in margin is a common way to underprice.
What should be included in cost of goods sold?
At minimum, the price you paid for the product or the cost to make it. Many stores also include inbound freight and import duties. Outbound shipping to customers, payment fees and marketing usually sit below gross margin, in contribution margin.
Why does my margin report show 100% for some products?
Almost always because those products have no cost price recorded in your store. With a cost of zero, every sale looks like pure profit. Adding the missing costs fixes the report.
How is gross margin different from contribution margin?
Gross margin only subtracts the cost of the goods. Contribution margin also subtracts the other costs that come with each order - shipping, packaging, payment fees and often marketing. Gross margin is the first check; contribution margin shows what each order truly earns.
Related metrics
About the author

Written by
Chartsy TeamAnalytics team at Chartsy
The Chartsy Team writes guides, product updates, and resources to help SaaS and eCommerce founders make sense of their metrics, without SQL or spreadsheets.
ChartsySee your store's numbers without spreadsheets
Connect your BigCommerce store and Chartsy calculates your order metrics - net sales, AOV, refunds, repeat customers and monthly customer segments - from your real orders, updated every hour.