Profit & margins
Gross profit margin explained
Gross profit margin is the percentage of revenue left after subtracting the cost of the goods you sold. It shows how much each dollar of sales has left to cover marketing, overheads and profit. The formula is (revenue − COGS) ÷ revenue × 100.
The gross profit margin formula
Gross profit = Revenue − COGS Gross margin % = (Revenue − COGS) ÷ Revenue × 100
- Revenue
- sales for the period, after discounts and returns
- COGS
- cost of goods sold: what you paid for the products you sold in the period
You can work it out for a single product, using price and unit cost, or for the whole store over a month or year.
What counts as COGS for a Shopify store
For most online stores, COGS is the landed cost of the products you sold:
| Usually in COGS | Usually not in COGS |
|---|---|
| Supplier price per unit | Ad spend and marketing |
| Inbound freight to your warehouse | Payment processing fees |
| Import duties and customs fees | Shopify plan and app subscriptions |
| Packaging that ships with the product | Staff, rent and software |
| Manufacturing or assembly costs | Outbound shipping (varies by store) |
Shopify can show gross profit in its reports when you enter a cost per item on each product. If costs are missing or out of date, the reported margin will be too high.
Worked example
Worked example: one month for a Shopify storeExample numbers
| Input | Value |
|---|---|
| Revenue (after discounts and returns) | $50,000 |
| COGS (landed cost of products sold) | $21,000 |
- Gross profit = $50,000 − $21,000 = $29,000
- Gross margin = $29,000 ÷ $50,000 × 100 = 58%
So 58 cents of every sales dollar is left to pay for everything else: ads, shipping, fees, apps, staff and profit.
Gross margin vs net margin
Gross margin stops after product costs. Net margin keeps going until every cost is paid.
| Gross margin | Net margin | |
|---|---|---|
| Subtracts | COGS only | COGS, operating expenses, interest and taxes |
| Shows | How profitable your products are | How profitable the whole business is |
| Typically | Much higher | Much lower |
A store can have a healthy gross margin and still lose money if ad spend, shipping and overheads eat the rest. The guide to gross profit vs net profit walks through the full waterfall from revenue to net profit.
Finding gross margin in Shopify
Shopify's profit reports include a Gross profit by product report. It shows net sales, cost, gross profit and gross margin for each product over the date range you choose, with gross margin calculated as (net sales − cost) ÷ net sales × 100.
Two things to know before relying on it:
- It only counts variants with a cost per item. Products without a cost entered at the time of sale are left out of the cost calculation.
- The cost is whatever you entered. Shopify's own example for resold products is the price you paid the manufacturer, excluding shipping. If you leave out freight and duties, the report's margin will be higher than your true landed-cost margin.
For an accurate figure, enter landed cost as the cost per item and update it when a new batch costs more or less.
Why gross margin matters for online stores
- It sets your ad budget. Your break-even ROAS is 1 ÷ gross margin. At 58%, you need at least $1.72 of revenue per $1 of ad spend just to break even. See the guide to ROAS.
- It shows which products to push. High-margin products can carry more marketing cost. Compare them with the contribution margin calculator.
- It's an early warning. A falling gross margin usually means rising supplier costs, more discounting or a shift toward lower-margin products.
Common gross margin mistakes
- Out-of-date costs. Supplier prices and freight change. A cost per item entered two years ago can make margins look healthier than they are.
- Leaving out landed costs. Inbound freight, duties and packaging are part of what the product cost you.
- Putting ad spend in COGS. Ads are a selling cost. Mixing them in makes gross margin useless for setting ad targets.
- Ignoring returns and discounts. Calculate on revenue after discounts and refunds, or margin is overstated.
- Comparing gross margin with someone else's net margin. They measure different things; compare like with like.
How to improve gross margin
- Raise prices on products where you're underpriced compared with competitors.
- Lower landed costs by negotiating with suppliers, consolidating freight or ordering in more economical quantities.
- Discount less, or more selectively. Every discount comes straight off gross profit. The discount code profit calculator shows the impact.
- Shift your mix toward higher-margin products in your ads, emails and merchandising.
For what's typical in different categories, see what a good profit margin is for an online store.
FAQ
What's the difference between gross profit and gross margin?
Gross profit is a dollar amount: revenue minus COGS. Gross margin is the same thing as a percentage of revenue. A store with $50,000 revenue and $21,000 COGS has $29,000 gross profit and a 58% gross margin.
Is shipping part of COGS?
Inbound shipping, the cost of getting stock to you, is part of landed cost and belongs in COGS. Outbound shipping to customers is treated differently by different stores; many keep it as a separate fulfillment cost. Pick one approach and use it consistently.
Are payment processing fees part of COGS?
Usually not. Payment fees are normally treated as an operating or selling expense, alongside ad spend and apps, rather than a cost of the goods themselves.
Can gross margin be negative?
Yes, if products cost more than you sell them for, for example after deep discounts or when landed costs rise faster than prices. A negative gross margin means every sale loses money before any other cost is counted.