Free tool

Gross and Net Profit Margin Calculator

Gross margin = (revenue − cost of goods sold) ÷ revenue × 100. Net margin also subtracts operating expenses: (revenue − COGS − operating expenses) ÷ revenue × 100.

Gross margin

40%

Net margin

15%

Net profit

$15,000

Gross margin = ((revenue-cost of goods sold) ÷ revenue × 100) = 40%
Net margin = ((revenue-cost of goods sold-operating expenses) ÷ revenue × 100) = 15%
Net profit = revenue-cost of goods sold-operating expenses = $15,000

Share this calculator

LinkedIn X WhatsApp Email

Profit margin formula in Excel or Google Sheets

Put the inputs in column B from row 2, then paste the formulas below. They work the same in Excel and Google Sheets.

CellWhatValue or formulaExample
B2Revenue ($)100000100000
B3Cost of goods sold ($)6000060000
B4Operating expenses ($)2500025000
B6Gross margin (%)=ROUND((B2-B3)/B2*100,1)40
B7Net margin (%)=ROUND((B2-B3-B4)/B2*100,1)15
B8Net profit ($)=B2-B3-B415000

Get the ready-made spreadsheet

The same calculator as an .xlsx file, with the formulas set up. Free: enter your email and the download starts here right away. Your email also joins Clarivoxx Insights (a weekly article and a monthly newsletter; unsubscribe in one click).

Frequently asked questions

How do you calculate profit margin?
Subtract costs from revenue and divide by revenue. $100,000 revenue with $60,000 cost of goods is a 40% gross margin; after $25,000 of operating costs the net margin is 15%.
What is the difference between margin and markup?
Margin divides profit by the selling price; markup divides it by the cost. A product bought at $60 and sold at $100 has a 40% margin and a 66.7% markup.
What is a good profit margin?
It varies widely: software often has 70–80% gross margin, retail 25–50%. Compare with your own sector and watch the trend.
How do you calculate profit margin in Excel?
Put revenue in B2, cost of goods sold in B3 and operating expenses in B4. Gross margin % is =ROUND((B2-B3)/B2*100,1) and net margin % is =ROUND((B2-B3-B4)/B2*100,1). The free Excel template below has both set up.
How much more do I need to sell after a discount?
Extra volume needed = discount ÷ (gross margin − discount) × 100. At a 40% margin, a 10% discount needs 10 ÷ 30 = 33% more sales just to keep the same gross profit. If the discount is as large as the margin, no extra volume makes up for it.
Abdessamad Ghanem

About the author

Abdessamad Ghanem

Customer Experience & Customer Success Consultant · Founder of Clarivoxx

Abdessamad Ghanem works across Customer Support, Sales, Customer Success, Account Management and Partner Management. He writes Clarivoxx Insights for B2B SaaS professionals who own retention, adoption and customer outcomes.