Calculating Profit Margin Formula – A 2-Minute Guide That Works

Looking for a calculating profit margin formula? You’re not alone — and getting it right will change the way you see your business performance.
Profit margin measures a business, product, or service’s profitability. It’s expressed as a percentage, not a dollar amount.
The higher the profit margin, the more profit you make relative to your costs. Knowing how to calculate profit margin helps ecom sellers understand their true profitability and make smarter decisions.
Here are three calculating profit margin formula:
- Gross Profit Margin: (Revenue − COGS) ÷ Revenue × 100
- Operating Profit Margin: Operating Income ÷ Revenue × 100
- Net Profit Margin: Net Profit ÷ Revenue × 100
Dive even deeper with us into profit margin—what it means, why it’s key, and how to calculate it.
What is Profit Margin
Profit margin measures how profitable your online store, product, or service is. Instead of a dollar amount, it’s shown as a percentage. The higher the percentage, the more profit you make compared to your costs.
Different Types of Profit Margin
Ecommerce sellers often focus on three types of profit margin:
- Gross profit margin
- Operating profit margin
- Net profit margin
Each gives insight into different parts of your store’s profitability.
Margin Type
Measure
Cost Included
Calculating Profit Margin Formula
Profit after covering the direct costs of making or buying products.
Cost of Goods Sold (COGS): raw materials, production labor, manufacturing expenses.
(Revenue − COGS) ÷ Revenue × 100
Profit after paying for all day-to-day business expenses necessary to operate.
COGS, operating expenses (rent, salaries, marketing), depreciation, amortization.
Operating Income ÷ Revenue × 100
Overall profitability after all expenses, income, taxes, and interest.
All costs: COGS, operating expenses, interest, taxes, one-time costs, other income.
Net Profit ÷ Revenue × 100
Why Calculating Your Profit Margin Is Crucial?
Running an online store is all about making sure sales translate into real profit. That’s where profit margin comes in.
Profit margin is one of the clearest indicators of your store’s financial health — and knowing how to calculate profit margin helps ecom sellers:
- Check your store’s health: A shrinking margin means hidden costs (like shipping or fees) might be eating into your profits — even if sales look good.
- Make smarter decisions: Spot what’s cutting into earnings (ads, apps, discounts) and adjust pricing or strategy based on real numbers.
- Track real growth : Revenue means nothing if margins drop. A growing margin = a more efficient, sustainable business.
How to Calculate Gross Profit Margin
Gross Profit Margin Formula
Gross Profit Margin = (Revenue − Cost of Goods Sold) ÷ Revenue × 100
3 Steps to Calculate Gross Profit Margin
- Step 1: Subtract your total cost of goods sold (COGS) from your revenue.
- Step 2: Divide that number by your revenue.
- Step 3: Multiply the result by 100 to express it as a percentage.
Gross Profit Margin Calculation Example
Revenue
Cost of Goods Sold (COGS)
Calculation
Gross Profit Margin
$10,000
$7,000
Step 1: $10,000 − $7,000 = $3,000
Step 2: $3,000 ÷ $10,000 = 0.3
Step 3: 0.3 × 100 = 30%
30%
A good gross profit margin is typically over 50%. Margins above 70–90% are common in digital or low-COGS businesses. If your margin falls below 30%, it may signal high product costs and lower profitability.
Further Reading
How to Calculate Operating Profit Margin
Operating Profit Margin Formula
Operating Profit Margin = Operating Profit ÷ Revenue × 100
3 Steps to Calculate Operating Profit Margin
- Step 1: Subtract all operating expenses (including overhead, admin, and sales expenses) from your revenue to get operating profit.
- Step 2: Divide your operating profit by your revenue.
- Step 3: Multiply the result by 100 to express it as a percentage.
Operating Profit Margin Calculation Example
Revenue
Operating Expense
Calculation
Operating Profit Margin
$10,000
$2,500
Step 1: $10,000 − $2,500 = $7,500
Step 2: $7,500 ÷ $10,000 = 0.75
Step 3: 0.75 × 100 = 75%
75%
A good operating profit margin is around 20%. A 10% margin is average, while anything above 20% is considered strong. Lower margins may signal high operating costs or inefficiencies.
How to Calculate Net Profit Margin?
You can plug the formulas below into your Excel spreadsheet.
Or, for net profit margin, let TrueProfit’s free Profit Margin Calculator do the math for you!
Net Profit Margin Formula
Net Profit Margin = Net Profit ÷ Revenue × 100
3 Steps to Calculate Net Profit Margin
- Step 1: Subtract all expenses, including COGS, operating expenses, taxes, interest, and one-time costs, from your revenue to get net profit.
- Step 2: Divide your net profit by your revenue.
- Step 3: Multiply the result by 100 to express it as a percentage.
Net Profit Margin Calculation Example
Revenue
All expenses (COGS + Operating + Taxes):
Calculation
Operating Profit Margin
$10,000
$9,500
Step 1: $10,000 − $9,500 = $500
Step 2: $500 ÷ $10,000 = 0.05
Step 3: 0.05 × 100 = 5%
5%
A good net profit margin is generally around 10%. According to a report from NYU, the average net profit margin across industries is about 7.7%. A margin of 5% is considered low, 10% is healthy, and 20% or more is high.
A smart ecommerce business owner doesn’t rely on just one — yet calculating profit margin at every level to pinpoint exactly where profit is gained or lost.
- Calculating gross profit margin → Best for tracking product-level profitability and pricing decisions.
- Calculating operating profit margin → Ideal for evaluating operational efficiency and scaling potential.
- Calculating net profit margin → Best for assessing overall business profitability and investor readiness.
But manually calculating and tracking these figures can get complicated as your store grows. That’s where profit tracker like TrueProfit comes in.

TrueProfit's Dashboard
TrueProfit is a net profit analytics solution for Shopify store owners that automates profit margin tracking by calculating real-time profit margins at both product and order levels.
Beyond just automated calculations, it provides actionable insights into your actual profitability - helping you make smarter pricing decisions and avoid costly mistakes with confidence.
Your real-time profit data is just one step away — try it now.
Calculating Profit Margin Formula FAQs
How do you calculate profit margin?
To calculate profit percentage, use this formula:
Profit Percentage = (Net Profit ÷ Revenue) × 100
Net Profit is your total revenue minus all expenses, including COGS, operating costs, taxes, and interest. Revenue is your total income from sales.
What is the formula for profit%?
Profit is the actual dollar amount a business earns after expenses. Margin, or profit margin, is the percentage of revenue that becomes profit. Profit shows how much you made. Margin shows how efficiently you made it.
What is the formula for calculating profit margin
The formula for calculating profit margin is:
Profit Margin = (Revenue − Cost of Goods Sold) ÷ Revenue × 100
It shows what percentage of your revenue remains as profit after covering the cost of goods sold.
What is the formula for calculating gross profit margin
The formula for calculating gross profit margin is:
Gross Profit Margin = (Gross Profit / Net Sales) × 100.
It shows the percentage of sales revenue remaining after subtracting the cost of goods sold.
What is the formula for calculating net profit margin
Net profit margin is calculated as: Net Profit Margin = (Net Profit ÷ Total Revenue) × 100
It shows the percentage of revenue left after all expenses are deducted. For example, a 10% margin means you earn $0.10 in net profit for every $1 of revenue.
How do you calculate 20% margin?
To calculate a 20% profit margin, divide your cost by 0.8. For example, if your cost is $80, then $80 ÷ 0.8 = $100. This means you should sell the product for $100 to make a 20% margin.
What is a 30% margin on $100?
A 30% margin on $100 means you keep $30 as profit. This means your costs were $70, and your profit was $30. Profit margin shows how much money you keep after covering expenses.
How to calculate profit margin in Excel?
To calculate profit margin in Excel, use the formula:
=(Revenue - Cost) / Revenue * 100.
What is the profit margin ratio?
The profit margin ratio shows how much profit a company makes from its revenue. It is expressed as a percentage. It tells you how much profit is earned for every dollar of sales. This ratio helps measure a company’s financial health and efficiency.
How do I calculate my profit?
To calculate your profit, subtract total expenses from total revenue.
Profit = Revenue - Expenses.
This shows how much money your business keeps after covering all costs.
How to calculate net profit margin calculator?
To calculate net profit margin, divide net income by total revenue and multiply by 100.
Net Profit Margin = (Net Income / Revenue) × 100.
This shows the percentage of revenue your business keeps as profit after all expenses.
How to calculate profit percentage calculator?
To calculate profit percentage, divide net profit by revenue and multiply by 100.
Profit Percentage = (Net Profit / Revenue) × 100.
Net profit is your total revenue minus all expenses. This formula shows how much profit you make from each dollar of revenue.
What is the difference between profit and margin?
Profit is the total amount of money a business earns after expenses.
Margin is the percentage of revenue that becomes profit.
Profit is shown in dollars, while margin is shown as a percentage.

Content Executive at TrueProfit & eCommerce Content Specialist
Leah Tran is a Content Specialist at TrueProfit, where she crafts SEO-driven and data-backed content to help eCommerce merchants understand their true profitability. With a strong background in content writing, research, and editorial content, she focuses on making complex financial and business concepts clear, engaging, and actionable for Shopify merchants.