Get 80% off your plan for your first 3 months*

How to calculate margin

Learn what margin is and how to calculate gross, net and operating profit margins for your business.

October 2023 | Published by Xero

Published Monday 17 August 2026

Table of contents

Key takeaways

  • Margin is profit expressed as a percentage of revenue, calculated by dividing profit by revenue and multiplying by 100.
  • Gross profit margin measures profitability after direct costs, while net profit margin accounts for all expenses including taxes and interest.
  • Markup and margin are different calculations, as markup is profit as a percentage of cost rather than revenue.
  • Tracking your margins regularly helps you spot pricing issues, control costs, and make confident business decisions.

What is margin?

Gross profit margin formula shows gross profit divided by sales revenue, times 100, equals gross profit margin.

How to calculate gross profit margin

Margin is the percentage of revenue that remains as profit after costs are deducted. You calculate it by dividing profit by revenue and multiplying by 100.

The two main types are gross profit margin (which focuses on direct production costs) and net profit margin (which accounts for all business expenses).

How to calculate margin

Formula for net profit margin shows that net profit divided by revenue, times 100, equals net profit margin.

How to calculate net profit margin

Calculating margin involves a straightforward formula. Follow these steps to work out your profit margin.

  1. Find your total revenue for the period.
  2. Determine your profit figure (gross profit or net profit, depending on which margin you need).
  3. Divide profit by revenue.
  4. Multiply by 100 to express the result as a percentage.

For example, if your revenue is ₱1,000 and your cost of goods sold is ₱600, your gross profit is ₱400. Your gross profit margin is ₱400 ÷ ₱1,000 × 100 = 40%.

You can also use our margin calculator to work out the percentage automatically.

Gross profit margin

Gross profit margin measures how much of your revenue remains after covering direct production costs. The formula is gross profit ÷ revenue × 100, where gross profit equals revenue minus cost of goods sold.

This margin shows how efficiently you produce or source your products and services.

Net profit margin

Net profit margin shows the percentage of revenue left after all expenses, including operating costs, interest, and taxes. The formula is net profit ÷ revenue × 100.

This margin gives you a complete picture of your overall profitability.

Operating profit margin

Operating profit margin sits between gross and net profit margin. It measures profit after deducting both cost of goods sold and operating expenses, but before interest and taxes.

The formula is operating profit ÷ revenue × 100. This margin reflects how well your core business operations perform.

Margin vs markup

Margin and markup both measure profitability, but they use different bases. Margin calculates profit as a percentage of revenue, while markup calculates profit as a percentage of cost.

Because of this difference, markup is always a larger number than margin for the same amount of profit. You can convert between them using the formula: markup = margin ÷ (1 − margin).

What is a good profit margin?

A good profit margin varies by industry and business model. Service businesses often run higher margins than retail or hospitality because they have lower direct costs.

Rather than targeting a specific number, compare your margins to industry benchmarks and track how they change over time. Consistent improvement matters more than hitting an arbitrary target.

Tips to improve your margin

Several practical strategies can help you boost your profit margins over time.

  • Review your pricing to ensure it reflects your true costs and market value.
  • Negotiate better rates with suppliers to reduce your cost of goods sold.
  • Improve operational efficiency to lower overhead expenses.
  • Focus on higher-margin products or services in your sales mix.
  • Track your profit margin regularly to catch issues early.

Track your margins with Xero

Xero's financial reports give you real-time visibility into your gross and net profit margins. With up-to-date numbers at your fingertips, you can spot trends, compare periods, and make pricing decisions with confidence. To see how Xero can help you stay on top of your margins, get one month free.

FAQs on calculating margin

Here are answers to common questions about calculating and using profit margins.

What is the difference between margin and markup?

Margin uses revenue as the base (profit ÷ revenue), while markup uses cost (profit ÷ cost). This means a 50% markup equals approximately a 33% margin on the same transaction.

What is a good profit margin?

It depends on your industry. A 10% net profit margin might be strong for a retailer but low for a consulting firm. Focus on improving your own margins over time rather than chasing a universal benchmark.

What is the difference between gross profit and gross profit margin?

Gross profit is an absolute peso amount (revenue minus cost of goods sold), while gross profit margin is that figure expressed as a percentage of revenue. The percentage makes it easier to compare performance across periods or against competitors of different sizes.

Should I use gross profit margin or net profit margin?

Use gross profit margin to evaluate pricing and production efficiency. Use net profit margin to assess overall business health, since it includes all your operating costs, taxes, and interest.

How do I work out a selling price from a target margin?

Divide your cost by (1 − target margin). For example, if an item costs ₱600 and you want a 40% margin, the selling price is ₱600 ÷ (1 − 0.40) = ₱1,000.

Learn more about calculating margin

Handy resources

Advisor directory

You can search for experts in our advisor directory

Find an advisor

Explore our guides

Find guides with expert advice and tools to help manage and grow your business

Browse all guides

Financial reporting

Keep track of your performance with accounting reports

Find out more

Disclaimer

This glossary is for small business owners. The definitions are written with their requirements in mind. More detailed definitions can be found in accounting textbooks or from an accounting professional. Xero does not provide accounting, tax, business or legal advice.