Profit margin formula: how to calculate profit margins
Learn the profit margin formula and how to calculate gross, operating, and net margins for your business.
Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio
Published Tuesday 26 May 2026
Table of contents
Key takeaways
- There are three profit margin formulas: gross, operating, and net. Each divides a profit figure by revenue and multiplies by 100.
- Track your margin trends over time to spot improving or declining financial health. Compare your results against industry benchmarks to gauge performance.
- Increase your profit margins by reducing costs, improving efficiency, and adjusting your pricing. Focus on your highest-margin products and services.
- Profit margin and markup are different calculations. Margin divides profit by revenue; markup divides profit by cost.
What is a profit margin?

Profit margin is the percentage of revenue remaining after you subtract business expenses. This metric shows how much profit your business earns for every dollar of sales.
A healthy profit margin signals that your business can cover its costs and generate returns. Tracking your margins helps you understand where your business stands financially.
Profit margins let you:
- See whether your revenue covers all expenses
- Identify which products, services, or areas generate the most profit
- Pinpoint where cutting costs will have the greatest impact
To put these benefits in context, it helps to understand how profit margin relates to net profit.
Profit margins vs. net profit
Net profit and profit margin are related but measure different things. Net profit is the dollar amount left after paying all expenses. Profit margin converts that dollar amount into a percentage of total revenue.
Say your business earns $100,000 in revenue and has $20,000 left after expenses. Your net profit is $20,000, and your profit margin is 20%. The percentage makes it easier to compare performance across time periods or against competitors.
Profit margin formula
The profit margin formula is a straightforward way to measure your business's profitability. It shows how much profit you keep for every dollar of revenue.
The basic formula is:
Profit margin = (net income / revenue) x 100
Divide your net income by your total revenue, then multiply by 100. The result is a percentage. It tells you how many cents of profit you earn per dollar of sales. A 25% profit margin means you keep $0.25 from every dollar after covering all costs.
Types of profit margins
The three main profit margin types measure different layers of your business's profitability. Each one strips away a different set of costs so you can see exactly where money is going.
Gross profit margin
Gross profit margin measures profitability after direct costs only. It tells you how much revenue remains after paying for the goods or services you sell.
- Calculate it using: (revenue - cost of goods sold) / revenue x 100
- Use it to set prices and identify production inefficiencies
- Watch for a declining trend, which may signal rising supplier costs or underpricing
Operating profit margin goes a level deeper by factoring in your day-to-day running costs.
Operating profit margin
Operating profit margin measures your core business profitability. It accounts for operating expenses like rent, salaries, and utilities on top of direct costs.
- Calculate it using: operating income / revenue x 100
- Use it to evaluate how efficiently you run day-to-day operations
- Share it with banks and investors, who often review this margin before approving funding
Net profit margin captures everything, giving you the most complete view of profitability.
Net profit margin
Net profit margin measures overall profitability after every expense, including taxes, interest, and one-time costs. It gives you the complete picture of your financial performance.
- Calculate it using: net income / revenue x 100
- Use it to assess total financial health and long-term sustainability
- Think of it as the "bottom line" number that shows your true earnings
Learn more about net profit margin and how it applies to your business.
How to calculate profit margins
Calculating profit margins follows the same core steps regardless of margin type. You divide a profit figure by revenue, then multiply by 100 to get a percentage.
Here is how to calculate each type, using a cleaning business as an example.
1. Calculate gross profit margin
Start with your revenue and subtract the direct cost of providing your service. If your business earns $20,000 cleaning offices and it costs $8,000 to deliver those services, your gross profit is $12,000.
$12,000 / $20,000 x 100 = 60% gross profit margin
Try the gross profit margin calculator to run your own numbers.
2. Calculate operating profit margin
Next, subtract your operating expenses from gross profit. If you spend $3,000 on rent, utilities, and administrative costs, your operating profit is $9,000.
$9,000 / $20,000 x 100 = 45% operating profit margin
This tells you how efficiently your business runs before taxes and interest.
3. Calculate net profit margin
Finally, subtract taxes and any remaining costs. If you pay $4,000 in taxes and interest, your net profit is $5,000.
$5,000 / $20,000 x 100 = 25% net profit margin
Try the net profit margin calculator to check your bottom line.
Accounting software like Xero can calculate these margins automatically from your financial data. You can pull real-time reports that show your gross, operating, and net margins at a glance.
Profit margin vs. markup
Profit margin and markup both measure profitability, but they use different base numbers. Confusing the two is one of the most common pricing mistakes small business owners make.
Profit margin divides profit by revenue (the selling price). Markup divides profit by cost (what you paid for the item). The same dollar profit produces a different percentage depending on which base you use.
Looking at the formulas side by side makes this clearer.
Formula comparison
Both formulas start with the same profit amount but produce different percentages.
Profit margin = (selling price - cost) / selling price x 100
Markup = (selling price - cost) / cost x 100
Notice that margin uses the selling price as the denominator, while markup uses the cost.
A real-numbers example shows just how different the results can be.
Worked example
Say you buy a product for $60 and sell it for $100. Your profit is $40.
The profit margin is $40 / $100 x 100 = 40%.
The markup is $40 / $60 x 100 = 66.7%.
The same $40 profit gives you a 40% margin but a 66.7% markup. Markup is always a higher number than margin for the same transaction.
Getting this distinction right is critical when setting your prices.
Why it matters for pricing
Confusing the two affects your earnings. Apply a 50% markup when you meant a 50% margin, and you will fall short. A 50% markup on a $60 item sets the price at $90. But to achieve a 50% margin, you need to price at $120. That gap adds up quickly across hundreds of sales.
When setting prices, be clear about whether you are working with margin or markup. Use margin when you want to know what portion of revenue becomes profit. Use markup when you want to know how much to add on top of your costs.
Why do profit margins matter?
Profit margins reveal your business's financial health by comparing income to expenses. They help you make better decisions about pricing, cost control, and budgeting. When you need funding, banks and investors review your margins before approving loans or investments.
What is a good profit margin?
A good profit margin depends on your industry and business model. Margins vary widely across sectors, so comparing your numbers to the right benchmark is essential.
Typical net profit margin ranges by industry:
- Retail: 2-6%
- Restaurants and food service: 3-9%
- Software and technology: 15-25%
- Professional services: 10-20%
Typical ranges by margin type:
- Gross margin: 20-80%, depending on industry
- Operating margin: 5-20% for financially healthy businesses
- Net margin: 5-15% generally indicates solid performance
As a general rule, a 10% net margin is healthy, 20% is strong, and 5% is on the low side. Compare your margins to businesses in your specific industry for the most useful picture.
What profit margin trends reveal
Tracking your margins over time shows whether your financial health is improving or slipping. A steady increase signals growing efficiency and stronger pricing. A declining trend may point to rising costs, pricing pressure, or operational issues that need attention.
For example, a bakery might see its gross margin drop from 65% to 55% over 6 months. That trend could reveal rising ingredient costs that need renegotiating with suppliers. Without tracking the trend, the owner might not notice until cash flow becomes tight.
Compare your margin trends against competitors and industry averages. This context helps you tell whether a dip is an industry-wide shift or something specific to your business.
Using profit margins to guide business decisions
Profit margin data helps you allocate resources and plan for growth. You can also use it alongside your financial statements for a fuller picture of business performance. When you know which products and services deliver the highest margins, you can focus your energy and investment there.
Here are practical ways to use your margin data:
- Direct investment toward your highest-margin products and services
- Adjust pricing on low-margin items or consider dropping them
- Identify which business areas deserve expansion
- Decide when your finances support hiring or new equipment, and assess your margin of safety
Understanding what drives your margins up or down is just as important as knowing the numbers.
Factors that affect profit margins
Several external and internal factors can shift your margins. Understanding these helps you respond quickly when numbers change.
Market conditions play a significant role. Inflation, higher interest rates, and shifting trade policy can all increase your costs.
In 2025, nominal US GDP grew 5.1%. Yet small business sales grew only 2.4%, according to Xero Small Business Insights. Higher interest rates increase the cost of business loans, squeezing your net margin even if sales hold steady.
Your business location also matters. Rent, state taxes, and local labor costs vary widely. Include these costs when you assess your margins and set your pricing strategy.
How to increase your profit margins
Increasing your profit margins requires a mix of reducing costs, improving efficiency, and getting smarter about pricing. These strategies can help you increase profits over time. Here are practical strategies you can start using today.
1. Control your costs
Review your expenses regularly and cut what you do not need. Cancel unused subscriptions, renegotiate supplier contracts, and look for cost saving opportunities. Small savings across many line items add up to meaningful margin improvements.
Manage labor costs by matching staffing levels to demand. Cross-train employees so your team can handle busy periods without overtime.
2. Improve operational efficiency
Streamline your processes to get more output from the same resources. Automate repetitive tasks like invoicing and bank reconciliation with accounting software. Invest in staff training so your team works faster and makes fewer costly mistakes.
Great customer service also drives efficiency. Happy customers return, refer others, and cost less to serve than new ones. Retention is one of the simplest ways to protect your margins.
3. Adjust your pricing strategy
A strong pricing strategy can lift your margins without cutting a single cost. Consider these approaches:
- Use dynamic pricing to adjust for demand and seasonal changes
- Create premium packages or bundles to increase revenue per customer
- Raise prices on products where you deliver clear, differentiated value
Pricing adjustments alone may not be enough if your product mix is working against you.
4. Focus on high-margin products and services
Not every product or service contributes equally to your bottom line. Review your margins by product line and shift your focus toward the items that generate the highest returns.
Consider reducing your investment in consistently low-margin offerings. If a product barely breaks even after all costs, your time and resources may be better spent elsewhere.
5. Build customer loyalty
Loyal customers spend more, buy more often, and cost less to serve. Communicate your value clearly so customers understand what sets you apart. Deliver consistent quality and excellent service to keep them coming back.
Loyalty programs and referral incentives can strengthen these relationships while driving repeat revenue.
Track your profit margins with confidence
Understanding your profit margins gives you the clarity to price your products, control costs, and invest in the right areas. When you track your margins consistently, you catch problems early and spot opportunities before your competitors do.
Xero gives you real-time visibility into your financial performance. With customizable reports and automated data, you can monitor your gross, operating, and net margins without manual spreadsheet work. Get one month free.
FAQs on profit margin formulas
Here are frequently asked questions about profit margin formulas and how to use them in your business.
How do you calculate profit margin?
Divide your net income (revenue minus all expenses) by your total revenue. Then multiply the result by 100 to get a percentage. For example, $20,000 net income divided by $100,000 revenue equals a 20% profit margin.
What does a 30% profit margin mean?
A 30% profit margin means you keep $0.30 as profit for every dollar of revenue after paying all expenses. The remaining $0.70 covers your business costs, including materials, labor, rent, and taxes.
How do I calculate a 20% profit margin?
To achieve a 20% profit margin, your net profit must equal 20% of your total revenue. If your business generates $100,000 in revenue, you need $20,000 in net profit. Divide $20,000 by $100,000 and multiply by 100 to confirm the 20% result.
What is an ideal profit margin for small businesses?
Ideal profit margins vary by industry. As a general benchmark, a 10% net margin is healthy, 20% is strong, and 5% is on the low side. Compare your margin to other businesses in your specific industry for the most accurate assessment.
What is the difference between profit margin and markup?
Profit margin divides profit by the selling price, while markup divides profit by the cost. A $40 profit on a $100 sale gives you a 40% margin but a 66.7% markup. Margin tells you what share of revenue is profit. Markup tells you how much you added on top of cost.
Why is my profit margin decreasing?
Declining profit margins usually result from rising costs, pricing pressure, or both. Check whether your material costs, labor expenses, or overhead have increased. Also review whether competitive pressure has forced you to lower prices or offer more discounts than usual.
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.