Gross profit margin formula: How to calculate and improve it

Learn how the gross profit margin formula helps you price right and boost profit.

Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio

Published Monday 22 December 2025

Table of contents

Key takeaways

  • Calculate gross profit margin by subtracting cost of goods sold from revenue, dividing by revenue, and multiplying by 100 to get the percentage that shows how much money remains from each sales dollar.
  • Include only direct production costs like materials, manufacturing, and direct labor in your cost of goods sold calculation, while excluding indirect expenses like rent, marketing, and administrative costs that belong in operating expenses.
  • Benchmark your gross profit margin against industry standards, aiming for 50-70% for service businesses and 20-40% for product-based businesses, though targets vary significantly by sector and business model.
  • Improve your gross profit margin by adjusting prices based on market conditions, reducing cost of goods sold through better supplier relationships and bulk purchasing, and streamlining operations to eliminate waste and automate processes.

What is gross profit margin?

Gross profit margin measures the percentage of sales revenue that exceeds your cost of goods sold (COGS). It shows how much money you keep from each dollar of sales before paying operating expenses like rent, utilities, and salaries. A higher gross profit margin means your business operates more efficiently and has more funds available for growth.

Your gross profit margin reveals critical business insights:

  • Cash flow visibility: Shows how much money remains to cover operating expenses
  • Performance tracking: Identifies which products or services generate the highest returns
  • Problem detection: Highlights areas where costs may be too high or pricing too low
  • Growth planning: Determines your capacity to invest in expansion or improvements

Higher margins give you more capacity to cover fixed costs and increase your profitability.

Gross profit margin formula

The gross profit margin formula is a simple way to see how much profit you make on the products or services you sell. It shows your profit as a percentage of your revenue.

Here is the gross profit margin formula:

An infographic showing the gross profit margin equation

Gross Profit Margin = (Gross Profit ÷ Revenue) × 100

To use this formula, you first need to find your gross profit. You can calculate gross profit by subtracting the cost of goods sold (COGS) from your total revenue.

Gross profit = revenue – cost of goods sold (COGS)

How to calculate gross profit margin

You can break your gross profit margin calculation into a few simple parts. Start by understanding your direct costs and your sales revenue, then apply the formula.

Understanding cost of goods sold

Cost of goods sold (COGS) includes all the direct costs of producing your products or delivering your services. For a product business, this includes materials, manufacturing costs, and direct labor. For a service business, COGS typically includes the direct labor costs and any materials used to deliver the service.

Understanding what counts as COGS is crucial for accurate gross profit margin calculations. Don't include indirect costs like rent, marketing, or administrative expenses; these are operating expenses that come later in your profit calculations.

What counts as revenue

Revenue is the total amount of money your business brings in from sales before any deductions. This includes all income from your primary business activities: selling products or providing services to customers.

Make sure you use your net revenue figure, which is your gross sales minus any returns, allowances, or discounts. This gives you the most accurate starting point for your gross profit margin calculation.

Gross profit margin calculation

Once you know your revenue and cost of goods sold, you can plug those numbers into the formula.

Gross Profit Margin Formula:

An infographic showing the gross profit margin equation

Gross Profit Margin = (Gross Profit ÷ Revenue) × 100

Step-by-step calculation:

  1. Calculate gross profit: Revenue - Cost of Goods Sold
  2. Divide gross profit by total revenue
  3. Multiply by 100 to get the percentage

Gross profit margin formula explained

Here is what each part of the formula means in practice. Follow these steps to work out your gross profit margin:

  1. Determine your revenue: Total sales for the period
  2. Calculate cost of goods sold: Direct costs to produce your products or services
  3. Find gross profit: Subtract COGS from revenue
  4. Apply the formula: Divide gross profit by revenue, then multiply by 100

Gross profit margin example calculation

Let's say your business makes $20,000 by cleaning offices. It costs you $8,000 to provide those services. Your gross profit is $12,000.

An infographic showing a gross profit margin example

Your gross profit margin is therefore 60%.

An infographic showing a gross profit margin example

Avoid common calculation mistakes

Avoid these common COGS calculation mistakes:

  • Missing direct costs: Include materials, labor, and production expenses directly tied to your products
  • Including operating expenses: Don't add rent, marketing, or administrative costs to COGS
  • Inconsistent tracking: Use the same cost categories across all calculations
  • Timing errors: Match costs with the revenue period they generated

Accurate COGS calculation is essential for reliable margin analysis.

What is a good gross profit margin?

As a guide, a good gross profit margin might range from 50–70% for service businesses and 20–40% for product-based businesses. Exact targets vary by business. However, 'good' depends on several factors:

  • Industry standards: Software companies often achieve 80%+ margins, while grocery stores operate around 20–25%
  • Business model: Service businesses generally have higher margins than manufacturers
  • Market competition: Competitive markets typically compress margins
  • Business maturity: Established businesses often achieve higher margins than startups

Your margin must cover operating expenses, taxes, and provide profit for growth.

Factors affecting your margins

Several key things influence how 'good' a gross profit margin might be.

  • Industry: Different industries have different cost levels and structures that affect margins. Hospitality, for instance, has high overhead costs and relatively low product costs, while financial services have lower overhead costs and higher service fees.
  • Region: Costs, expenses, and market forces vary wildly between regions. For instance, some countries have higher or lower taxes, and a big-city shop gets more footfall than a shop in a small village.
  • Business type: Ecommerce stores typically have lower overhead costs and more scope for sales than traditional retailers, and therefore potentially higher margins.
  • Market competition: The forces of competition drive down prices and squeeze profit margins, as businesses must consider the margins of their direct competitors.

Industry benchmarks for gross profit margin

Gross profit margins vary a lot between sectors. For example, jewelry and cosmetics industries often achieve margins over 55%. On the contrary, industries such as electronics and alcoholic beverages may operate with margins below 45%. These differences reflect the unique environments of each industry.

Your accountant or bookkeeper can help find gross profit margin benchmarks for small to medium-sized businesses (SMBs) in your industry, and clarify what your business should be aiming for.

Benchmarking your gross profit margin

Follow these steps to benchmark your gross profit margin:

  1. Research industry averages: Use industry reports, trade associations, or financial databases
  2. Compare similar businesses: Match by size, business model, and geographic market
  3. Analyze top performers: Identify what high-margin competitors do differently
  4. Set realistic targets: Aim for margins within the top 25% of your industry
  5. Track progress: Monitor quarterly to see if you're closing the gap

Focus on businesses with similar revenue, customer base, and operational complexity to yours.

When to reassess your gross profit margin

Evaluating and monitoring your gross profit margins is especially important in a changing market (when your costs might rise). It's also good to look at them when conducting a financial performance analysis; for example, if you've missed your growth targets.

Your gross profit margin needs to cover the costs of selling your products or services (your COGS) and other costs like operating expenses and taxes. Your accountant can help you pinpoint a gross margin for your business.

Accounting software makes it easy to use financial reports to gauge your business’s performance.

Gross profit margin vs gross profit

Gross profit is the dollar amount left after subtracting cost of goods sold from revenue. Gross profit margin is that same amount expressed as a percentage of total revenue.

For example: If you earn $100,000 in revenue with $60,000 in costs, your gross profit is $40,000 and your gross profit margin is 40%.

Analyzing gross profit margin for business insights

Use gross profit margin analysis to:

  • Identify top performers: Compare margins across products, services, or business units
  • Spot pricing opportunities: Products with low margins may need price increases
  • Control costs: High-margin items show efficient cost management
  • Guide resource allocation: Focus on activities that generate the highest returns
  • Track improvement: Monitor margin changes over time to measure progress

Monitor your gross margin trends over time to reveal patterns in your business's performance, such as where your revenue is strong (and where it isn't), and how your costs change by product and time of year.

Factors affecting gross profit margin

Your gross profit margin can be affected by external factors out of your control:

  • Changes in demand: Affects the prices you can charge and may mean lowering prices when demand falls
  • Rising supplier (input) costs: When costs rise (such as for materials and labor), your profit margins will narrow
  • Reduced customer spending: If customers have less to spend because their own daily costs have gone up, your revenue may fall

Gross profit margin compared with other metrics

Understanding different profit margins helps you analyze your business at multiple levels. Each metric reveals different aspects of your financial performance:

Gross profit margin vs operating profit margin

While gross profit margins only consider the cost of goods sold (COGS), operating profit margins are the next step in analyzing revenue vs profit, as they also account for other operational costs like rent and utilities.

Gross profit margin vs net profit margin

Net profit margin goes a step further than the operating profit margin. Net profit margin shows a business's overall financial health, after taking into account your operating cost, as well as the deduction for interest and taxes. It's the 'bottom line' profit.

How to use each metric

Here's how to use each profit margin:

  • Gross profit margin: Optimize pricing strategies and control direct costs
  • Operating profit margin: Manage overhead expenses and operational efficiency
  • Net profit margin: Plan long-term growth and assess overall business health

Track all three metrics monthly to get a complete picture of your profitability.

How to improve gross profit margin

Small business owners can take basic steps to strengthen their gross profit margins.

1. Adjust your prices

You may need to update your prices as market conditions change. For instance, if a competing product is cut in price, you may need to change your own prices to prevent a dip in sales. Also think about improving your products or services to support higher pricing and improve margins.

2. Reduce your cost of goods sold

Your costs eat into your gross profit margin, so watch them closely. Find affordable suppliers and develop your relationships with them: you might get bulk discounts and better rates, improving your long-term costs.

3. Streamline your operations

Reduce waste and automate your processes to cut costs and boost profit margins. For instance, effective inventory management can minimize excess stock, bringing down storage costs.

Use Xero to track your gross profit margin

Xero helps you stay on top of your financial metrics as a small business owner. It makes it easier to follow your gross profit margin, and all business financial metrics, so you have more time to plan for your success.

Get one month free and see how Xero can help you track your gross profit margin with confidence.

FAQs on gross profit margin

Here are answers to some common questions about gross profit margin.

What is a gross profit margin ratio?

The gross profit margin ratio is just another name for the gross profit margin. It's the same calculation and gives you the same percentage. Both terms are used to describe the portion of revenue left after accounting for the cost of goods sold.

What is the difference between gross margin and markup?

Gross margin and markup both measure profitability, but they use different calculations. Gross margin shows profit as a percentage of revenue. Markup shows profit as a percentage of the cost of goods sold (COGS). A 50% markup is not the same as a 50% gross margin.

Can my gross profit margin be negative?

Yes, your gross profit margin can be negative. This happens when your cost of goods sold is higher than your revenue. A negative margin means you're losing money on every sale before even considering your other operating expenses.

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.