The formula behind it
margin = (revenue − cost)/revenue × 100%- revenue
- selling price (or total sales)
Gross margin is profit's share of revenue — the portion of every sales dollar that survives after paying for the goods. It is the standard language of retail and SaaS pricing.
How to use this calculator
- 1
Enter the selling price and the cost.
- 2
Press Calculate.
- 3
The markup row gives the cost-based equivalent.
Worked examples
Grocery
Sell $3.20, cost $2.10 → 34.4% margin, 52.4% markup.
Target pricing
Want 40% margin on a $6 cost? Price = 6/(1−0.4) = $10.