Calculate your profit margin: formula, rate and examples
How to calculate gross margin and margin rate? Formula, difference with markup and sector examples.
Published on January 12, 2026Profit margin is the most fundamental financial indicator for any entrepreneur, retailer or e-commerce seller. Knowing your margin on each product allows you to set prices correctly, identify profitable products and avoid unknowingly selling at a loss.
Understanding the conversion
Gross margin is the difference between selling price and cost of goods sold. The margin rate expresses this margin as a percentage of the selling price. The markup rate, often confused with margin, expresses the margin as a percentage of the purchase price. These two rates are very different: a 50% margin on selling price equals a 100% markup on purchase price.
π Formula
π Conversion table
| Sector | Average margin rate | Example cost β price |
|---|---|---|
| Grocery retail | 20β30 % | $1.00 β $1.30 |
| General e-commerce | 30β50 % | $20 β $33 |
| Restaurant | 65β75 % | $3 β $10 |
| Fashion / apparel | 50β70 % | $15 β $40 |
| Software / SaaS | 70β90 % | near-zero marginal cost |
| Jewelry / luxury | 50β65 % | $200 β $500 |
π‘ Practical examples
Margin = 45 - 20 = $25. Margin rate = (25/45) Γ 100 = 55.6%. Markup rate = (25/20) Γ 100 = 125%.
If Cost = $12 and target = 60% margin rate: Price = Cost / (1 - 0.60) = 12 / 0.40 = $30.
Cost = $25, shipping = $5, Price = $55. Total cost = $30. Net margin = $25. Real margin rate = 45.5%.