Gross profit margin: how to calculate and improve it
Learn what gross profit margin is, how to calculate it with a worked example, and how to improve it.
Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio
Published Tuesday 6 October 2026
Table of contents
Key takeaways
- Gross profit margin is gross profit (revenue minus cost of goods sold, or COGS) as a percentage of revenue. It shows how much of each sales dollar is left after direct costs.
- To calculate it, subtract COGS from revenue, divide by revenue, and multiply by 100. A business with $20,000 in revenue and $8,000 in COGS has a 60% margin.
- Track your margin over time to spot pricing issues and rising supplier costs early. Comparing each month with the same month last year also reveals seasonal patterns.
- A good margin depends on your industry, but it should leave enough to cover operating expenses and taxes. You can improve it by reviewing your prices and cutting direct costs.
What is gross profit margin?
Gross profit margin is your gross profit (revenue minus cost of goods sold, or COGS) expressed as a percentage of revenue. It shows how much of each sales dollar you keep after paying the direct costs of making your product or delivering your service.
The formula is (revenue − COGS) ÷ revenue × 100. For example, a 40% margin means you keep 40 cents of every dollar of sales once direct costs are paid.
You’ll also see it called gross margin; both terms mean the same thing. COGS includes costs tied directly to each sale, such as materials, direct labour, and freight-in. It excludes indirect costs like rent, marketing, and admin.
This metric tells you about three areas of your business:
- Operational efficiency: how well you convert resources into sellable products or services
- Pricing effectiveness: whether your prices cover costs and leave room for profit
- Financial health: your capacity to pay operating expenses and invest in growth
A high margin leaves more money for rent, utilities, and other running costs, and gives you a buffer when sales dip. A low margin is a prompt to review your pricing or trim your direct costs.
Once you pay operating expenses and taxes from your gross profit, what’s left is your net profit.
Why gross profit margin matters for your business
Gross profit margin is a health check for your products or services. It shows how much you keep from each sale before paying general business expenses.
Tracking your margin helps you:
- spot which products or services generate the most profit
- make smarter pricing decisions, such as setting your markup, based on real cost data
- catch rising costs or pricing problems early, especially during high inflation, when mentions of price increases in corporate earnings calls tend to peak
A healthy margin means more cash to reinvest and grow your business.
How to calculate gross profit margin
You need two figures from the same period to calculate gross profit margin: your revenue and your COGS. Start with the formula, then work through the example below.
Gross profit margin (calculation)
The formula compares your gross profit with your total revenue for the period:
Gross profit margin = (gross profit ÷ revenue) × 100
Gross profit margin formula explained

Calculate gross profit margin in two steps:
- Find your gross profit: subtract your cost of goods sold (COGS) from your total revenue
- Calculate the percentage: divide gross profit by total revenue, then multiply by 100
If you’d rather skip the manual math, a margin calculator does both steps for you.
Gross profit margin example calculation
Imagine you run an office cleaning service in Canada and want to work out your gross profit margin for one month. Here’s how each step of the formula plays out.
Start with revenue. You billed clients $21,000 for the month but gave one client a $1,000 discount, so your net revenue is $21,000 − $1,000 = $20,000.
Next, add up the direct costs of delivering the cleaning. You paid $6,500 in direct cleaning labour and spent $1,500 on cleaning supplies, so your COGS is $6,500 + $1,500 = $8,000. Rent, marketing, and other indirect costs stay out of this figure.
Now subtract COGS from revenue to get your gross profit: $20,000 − $8,000 = $12,000.
Divide gross profit by revenue: $12,000 ÷ $20,000 = 0.6. Then multiply by 100 to turn the result into a percentage: 0.6 × 100 = 60%.
Your gross profit margin for the month is 60%. That means 60 cents of every revenue dollar is left to cover operating expenses, such as rent and marketing, and to contribute to profit.
Follow these tips for accurate calculations
Small errors in your inputs can skew the result. Check these two areas before you calculate.
Accurate COGS estimation

Your COGS should include only the costs tied directly to what you sell.

- Include all direct costs, such as materials, labour, and shipping
- Count unfinished work in progress (WIP) in your year-end inventory, since the Canada Revenue Agency (CRA) uses inventory to calculate COGS
- Exclude indirect costs, such as rent, marketing, and administrative expenses
- Update COGS whenever supplier prices change
Revenue timing accuracy
Your revenue and costs need to line up so the margin reflects a single period.
- Match revenue with its related COGS in the same period
- Subtract returns and discounts from revenue before you calculate
Your COGS figure drives the whole calculation, so it’s worth learning how to estimate your COGS correctly.
Factors affecting gross profit margin
Many factors influence your gross profit margin. Knowing them helps you see why your margin changes and where you can take action.
External factors
Some forces sit outside your business but still shape your margin. Market demand, supplier costs, and customer spending power are the main ones to watch.
Market demand
Demand affects how much pricing power you have.
- High demand supports premium pricing and higher margins
- Low demand may call for price cuts to maintain sales volume
- Seasonal shifts change both pricing power and sales patterns
Supplier costs
Your direct costs move with what suppliers and staff charge.
- Rising material prices cut your margin without a complete pass-through of costs to prices, as the Bank of Canada noted in retail food
- Labour cost increases affect service-based businesses
- Supply chain disruptions raise procurement expenses
Customer spending power
What your customers can afford shapes both your prices and your sales volume.
- Economic downturns shrink customer budgets
- Inflation changes purchasing decisions, as seen when Canada’s inflation rate hit a peak of 8.1% in 2022 before easing
- Competitive pressure may push you to match prices
Industry and business factors
A margin that works well in one business can fall short in another. These factors explain why:
- Industry: cost structures vary widely, with hospitality facing high overhead and financial services earning higher fees
- Region: taxes, rent, and customer traffic differ between locations
- Business type: ecommerce stores often have lower overhead than brick-and-mortar retailers, so they can stay profitable on a thinner margin
- Market competition: competitive industries like electronics retail face price pressure that squeezes margins
Interpreting gross profit margin trends
Tracking your margin over time reveals patterns in your business performance. It helps you:
- identify which products or services generate the strongest margins
- detect seasonal cost fluctuations
- catch gradual supplier price increases before they erode profitability
- compare performance across different time periods
Regular monitoring helps you act quickly when you spot changes.
Gross profit margin vs gross profit
Gross profit is a dollar amount, while gross profit margin is a percentage. Both measure the same concept but express it differently.
- Gross profit: the money remaining after subtracting cost of goods sold, for example $12,000 in the cleaning example
- Gross profit margin: the percentage of revenue that becomes gross profit, for example 60%
Use gross profit to see how many dollars you have to cover expenses. Use the margin to compare periods, products, or businesses of different sizes.
Gross profit margin compared with other metrics
Here’s a quick comparison of how gross profit margin differs from two other profitability ratios, and how to use each one to understand your business.
Gross profit margin vs operating profit margin
Operating profit margin includes operating costs like rent and utilities in addition to COGS. It shows your profitability after both direct production costs and day-to-day business expenses.
Gross profit margin vs net profit margin
Net profit margin is your bottom-line profit after all expenses, including operating costs, interest, and taxes. It shows your overall financial health.
How to use each metric
Each metric answers a different question about your business. Use them for different decisions:
- Gross profit margin: evaluate pricing and production efficiency
- Operating profit margin: assess overall business efficiency
- Net profit margin: measure total profitability after all costs
Track your gross profit margin with Xero
Knowing your gross profit margin helps you price with confidence and spot rising costs early. Xero brings your sales and costs together in easy-to-read reports, so you can check your margin whenever you need it. Try Xero today and get one month free.
FAQs on gross profit margin
Here are answers to common questions about gross profit margin.
What’s a good gross profit margin?
It depends on your industry: businesses with low direct costs per sale, like software, tend to run higher margins than retailers that buy stock to resell. Aim for a margin that covers your operating expenses and taxes, with room left to pay yourself and grow.
How often should I review my gross profit margin?
Review your gross profit margin monthly to catch trends early. Compare each result with the previous month and the same month last year to separate seasonal patterns from lasting changes.
Can I have a high gross profit margin but still lose money?
Yes. If your operating expenses, such as rent, salaries, and marketing, exceed your gross profit, you’ll still make a net loss despite a strong margin.
What’s the difference between gross margin and markup?
Gross margin is profit as a percentage of revenue, while markup is profit as a percentage of cost. In the cleaning example, the 60% margin equals a 150% markup ($12,000 ÷ $8,000 × 100), as this breakdown of margin vs markup explains.
How can I improve my gross profit margin quickly?
Start with pricing: a markup calculator helps you test prices that reflect your current costs. Then lower your direct costs by negotiating better supplier rates and reducing waste in delivery.
Disclaimer
Xero does not provide accounting, tax, business or legal advice. This guide has been provided for information purposes only. You should consult your own professional advisors for advice directly relating to your business or before taking action in relation to any of the content provided.