Gross margin is the percentage of sales revenue left after you subtract the cost of goods sold (COGS). It tells you how much money is available to cover other business costs and contribute to profit.
Profitability is a major goal for merchants. In Shopify’s Q4 2025 Business Strategy and Planning Survey, 42% of merchants cite ensuring profitability as their top business goal.* Gross margin can help explain why profit is higher or lower than expected.
This article covers how to calculate gross margin, compare it with other profit metrics, and improve your store's profitability.
What is gross margin?
Gross margin is a profitability metric, expressed as a percentage, that measures the portion of net sales revenue that your company retains after accounting for the cost of goods sold (COGS). Also known as gross profit margin, this measurement allows you to monitor profitability by comparing revenue generated with ongoing production costs.
How do you calculate gross margin?
To calculate gross margin, find your net sales and cost of goods sold. Net sales equals gross sales after deducting returns, allowances, and discounts. COGS covers the direct cost of producing or purchasing the goods sold during the reporting period.
You can find both figures on a company’s profit and loss statement, also called an income statement.
COGS includes:
- Wholesale product costs
- Raw materials
- Direct production labor
- Inbound freight and import duties
- Packaging required to prepare products for sale
COGS excludes:
- Marketing costs
- Administrative salaries
- Office rent and utilities
- Interest payments
- Income taxes
Exact classifications vary by business and accounting method. Use the following formula once you have your net sales and COGS:
Gross margin = [(net sales − COGS) / net sales] x 100
Say a dishware company generated $27,000 in net sales during the second quarter. Its COGS totaled $10,000:
- Find gross profit: Subtract $10,000 in COGS from $27,000 in net sales. The company’s gross profit is $17,000.
- Divide gross profit by net sales: $17,000 / $27,000 = 0.6296.
- Convert the decimal to a percentage: 0.6296 x 100 = 62.96%.
Rounding to the nearest whole number, the company’s gross margin is about 63%. Meaning, after paying the direct costs of its products, 63¢ from every dollar of net sales remains for other business expenses and profit. You can also estimate margin for an individual product with Shopify’s free profit margin calculator.
Gross margin vs. other profit metrics
Related business metrics look at profit from different angles. The right one depends on whether the goal is to review product costs, overall profitability, day-to-day expenses, or pricing strategies.
Gross margin vs. gross profit
Gross profit and gross margin use the same figures. The difference is how they present the result:
- Gross profit is expressed as a dollar amount.
- Gross margin is expressed as a percentage of net sales.
A business with $27,000 in net sales and $10,000 in COGS has $17,000 in gross profit and a gross margin of about 63%.
Gross profit shows how much money is left after COGS. Gross margin makes it easier to compare products or reporting periods with different sales totals.
Gross margin vs. net margin
Gross margin only accounts for COGS. Net margin accounts for all business expenses, including day-to-day costs, interest, and taxes.
A retailer could have a 63% gross margin but a 10% net margin after deducting its remaining expenses. Gross margin helps assess product pricing and sourcing costs, and net margin shows what percentage of a company’s revenue becomes profit.
Gross margin vs. operating margin
Gross margin subtracts COGS from net sales, but operating margin goes further by accounting for the expenses involved in running the business. The calculation uses operating income before interest and taxes.
Use gross margin to assess product costs and pricing. Review operating margin to see how much revenue remains after expenses such as store rent or employee wages.
Gross margin vs. contribution margin
Contribution margin focuses on costs that change with sales volume. It subtracts all variable costs from sales, including costs that may fall outside COGS.
Say a product sells for $100 and has a COGS of $40. Its gross margin is 60%. If the sale also creates a $10 variable payment fee, its contribution margin falls to 50%.
Contribution margin helps a business evaluate the profitability of a product, order, or promotion after accounting for each sale’s variable costs.
Gross margin vs. markup
Gross margin measures profit as a percentage of the selling price. Markup is the profit expressed as a percentage of the product’s cost.
For a product that costs $60 and sells for $100:
- Gross margin: $40 / $100 = 40%
- Markup: $40 / $60 = 66.7%
The percentages differ even though the product earns the same $40 in gross profit. Knowing which metric a pricing target uses can help prevent revenue leakage, like pricing errors.
Advantages of gross margin
Stores can use gross margin to review prices, compare performance, and estimate how added sales could affect gross profit.
Less than half of shop owners track profit margin, traffic, average order value (AOV), or conversion rate, according to Shopify’s Q4 2025 Business Strategy and Planning Survey.*
Shopify’s profit reports help shop owners review costs, gross profit, and gross margin by product or variant. Shopify reports profit for items that had a cost per item recorded at the time of sale. Keeping those costs current improves the accuracy of the reports.
Review prices as costs change
Higher product costs reduce gross margin when selling prices stay the same. Tracking the change helps businesses decide when to review their prices.
Cost and price changes can be substantial. Modeling by The Budget Lab at Yale estimated that 2025 US tariffs raise short-run consumer prices for apparel by 34%. The estimated increases were 36% for leather products and 21% for textiles.
Businesses in affected categories can compare gross margin over time to see how changing costs affect product profitability.
Compare performance at different sales levels
Gross profit can increase because a business sells more products. Gross margin adds context by showing how much profit the business kept from each dollar of net sales after COGS.
For example, quarterly gross profit could rise from $100,000 to $120,000 while gross margin falls from 40% to 32%. Higher sales produced more gross profit, but each sales dollar became less profitable.
Comparing both figures can reveal the effects of rising product costs or heavier discounting.
Estimate the value of sales growth
Gross margin can help estimate how added sales may affect gross profit. At a 40% gross margin, an extra $10,000 in net sales would generate about $4,000 in gross profit if product costs and the sales mix remain similar.
A business can compare $4,000 with the spending needed to generate the additional sales. The comparison can determine marketing budgets and growth targets.
What is a good gross margin?
What counts as a good gross margin varies by business. The percentage should leave enough revenue after COGS to pay other expenses and earn a profit.
NYU Stern’s January 2026 data reports the following average gross margins for US public companies:
- Retail grocery and food: 26.31%
- Retail distributors: 30.57%
- General retail: 33.18%
- Specialty retail: 35.3%
- Apparel: 56.88%
The figures show why a single benchmark has limited value. A grocery retailer may earn a lower margin because inventory accounts for a large share of each sale. An apparel company may have more room between its product costs and selling prices.
Company size also influences the comparison. Public companies often have different purchasing power and cost structures than small ecommerce businesses. Compare a store with businesses that sell similar products through similar channels.
Set a proper target by calculating your business costs. Say operating expenses equal 25% of sales, and the company wants a 10% operating margin. The business would need a gross margin of at least 35% to reach that goal.
How to improve gross margin
One percentage point can add up quickly. At $1 million in net sales, raising gross margin from 40% to 41% adds $10,000 in gross profit.
That extra money can fund the next stage of growth. Shopify’s Q4 2025 Business Strategy and Planning Survey* found that 79% of merchants use profits to self-fund growth.
Most gross margin improvements come from two changes: raising selling prices and lowering COGS. Use the following tips to increase your gross margins.
Adjust your prices
Raising prices can protect margins when product costs increase. Review products that have fallen below the target profit margin. Then calculate the price needed to bring them back in line.
In Deloitte’s 2026 retail industry outlook survey, 73% of global retail executives said they intend to gradually raise retail prices to offset higher costs.
Test increases on a limited group of products first. Compare conversion rates and gross profit before applying the change across the product catalog.
Reduce your cost of goods sold
When COGS falls and the selling price stays the same, gross profit per sale rises. Start by negotiating better supplier rates and ask about volume pricing or better payment terms.
Companies also respond to higher costs by changing where they source products. A 2025 US-China Business Council survey found that 49% of US companies operating in China sourced from alternative countries or moved production closer to their end market. Another 34% negotiated prices with suppliers or customers.
Base sourcing decisions on the total landed cost after freight and duties. Review product quality and lead times before switching suppliers.
Rebalance your product mix
The companywide gross margin ratio reflects the margin on each item and the share of sales each product contributes. Increasing sales of higher-margin products can raise the overall percentage.
Deloitte found that 72% of retail executives plan to shift their product mix toward higher-margin or value-added items. Give those products more visibility in collections and campaigns. Use sales and inventory data to choose which items to feature.
Tighten your discounting
Discounts reduce net sales while COGS stays the same. Set a minimum acceptable margin before choosing a percentage-off or fixed-amount promotion.
Businesses can manage list prices and compare-at pricing from each product’s pricing settings. They can create automatic discounts from the Discounts section of the Shopify admin.
Shipping offers deserve the same review. In Deloitte’s survey, 67% of retail executives expected to raise their free shipping threshold to offset higher costs.
*Based on a 2025 survey of 500 Shopify merchants conducted in English across Australia, Canada, the United Kingdom, Ireland, New Zealand, and the United States. Respondents were established merchants with more than two years on the platform. Results reflect the experiences of this specific sample and may not be representative of all merchants.
Read more
- How to Use Ecommerce Analytics to Gain Business Insights
- Retargeting Customers- How Can You Reach Someone Who’s Not on Your Email List?
- Guide to Cash Flow Forecasting for Small Business Owners
- Contactless Payments- What They Are & How They Work
- Online Payments for Small Business Owners- An Overview
- How Does Credit Card Processing Work?
- Packaging Inserts Ideas- 7 Ways to Increase Customer Loyalty
- How To Get Business Insurance in 6 Simple Steps
- 7 Common Shipping Questions and How to Prepare Before They're Asked
- Unboxing Experiences- How To Create Something Memorable and Shareable
Gross margin FAQ
What does gross margin tell you?
Gross margin tells you what percentage of net sales remains after paying the direct costs of the goods sold. It helps you assess product pricing, production or purchasing costs, and how much revenue is available to cover other expenses and contribute to profit.
Are margin and profit margin the same?
No, margin and profit margin are not the same. Margin is the difference between the cost of goods sold and the selling price of a product, while profit margin is the ratio of profits to total sales.
What does a 20% gross profit margin mean?
Gross profit margin is a measure of profitability that expresses the amount of money made from sales after subtracting the cost of goods sold. A 20% gross profit margin means that for every $1 of sales, the company keeps 20¢ in profit after deducting the cost of goods sold.
What is the difference between gross profit and net profit?
Gross profit is the amount of money a business earns after subtracting the cost of goods sold from the sales revenue. Net profit is the amount of money a business earns after subtracting all other expenses, such as taxes, operating, and overhead costs, from the gross profit.












