How to Calculate Profit Margin for a Product: Formula and Examples
Learn how to calculate profit margin for any product. Includes the margin formula, real examples for retail, SaaS, and service businesses, and a free calculator.
Profit Margin Formula
The profit margin formula is simple but powerful:
Profit Margin = (Revenue - Cost) ÷ Revenue × 100
This tells you what percentage of each sales dollar is profit. If your margin is 40%, you keep $0.40 for every $1.00 in sales.
How to Calculate Margin Step by Step
- Determine your revenue — the selling price per unit × number of units sold
- Calculate your cost — all direct costs (materials, labor, manufacturing)
- Subtract cost from revenue — this is your gross profit
- Divide by revenue — then multiply by 100 for the percentage
Real-World Examples
Example 1: Retail Product
You run an online store selling handmade candles. Each candle sells for $25. The cost of wax, wick, fragrance, and packaging is $8. Labor is $4 per candle. Total cost = $12.
Margin = ($25 - $12) ÷ $25 × 100 = 52%. You keep 52% of each sale as profit.
Example 2: SaaS Subscription
Your software costs $99/month. Hosting and support cost $15/month per user. Total cost = $15.
Margin = ($99 - $15) ÷ $99 × 100 = 84.8%. SaaS businesses typically enjoy high margins once development costs are covered.
Example 3: Service Business
You charge $150/hour for consulting. Your effective cost (time, software, overhead) is $60/hour.
Margin = ($150 - $60) ÷ $150 × 100 = 60%.
Margin vs Markup: Critical Distinction
Many business owners confuse margin and markup, which leads to pricing errors.
- Margin = profit as % of selling price
- Markup = profit as % of cost
A 50% markup does NOT equal a 50% margin. If something costs $100 and you add a 50% markup, your selling price is $150. Your margin is ($150 - $100) ÷ $150 = 33.3%, not 50%. Use our Profit Margin Calculator to see both side by side.
What Is a Healthy Profit Margin?
- Retail: 25-50% gross margin, 2-10% net margin
- SaaS / Software: 70-85% gross margin, 15-25% net margin
- Restaurants: 60-70% gross margin, 3-8% net margin
- Professional Services: 30-50% gross margin, 10-15% net margin
- E-commerce: 30-50% gross margin, 5-15% net margin
Use Our Free Calculator
Skip the manual math — use our Profit Margin Calculator to instantly calculate gross profit, margin percentage, and markup percentage for any product or service. Also check out our ROI Calculator to measure overall investment returns and the Break Even Calculator to find your breakeven point.
Try our related calculator:
Profit Margin Calculator →