Your Favorite eCom Newsletter  (Once you know it exists) Your Favorite eCom Newsletter (Once you know it exists)
Take a look

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

By Leah TranJune 14, 202511 min read
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.

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.

Large preview

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.

TrueProfit Shopify Profit Tracker

avatar
Leah Tran

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.