Margin Calculator

TL;DR. Margin = (Revenue − Cost) / Revenue. A $100 sale with $60 cost = 40% gross margin. Don't confuse with markup (profit / cost), which on the same sale would be 67%. Margin and markup are different ratios for the same dollar profit.

Determine the selling price (revenue) you need to achieve your desired profit margin. Simply enter your cost and target margin to instantly see the required price and profit.

Inputs Explained

  • Cost: The amount you pay to acquire or produce the product.
  • Margin (%): The percentage of the selling price that you want to be profit.
  • Revenue (Selling Price): The final price you charge the customer.

How it Works

The calculator uses the Gross Margin formula to reverse-engineer the selling price. Note that Margin is based on Revenue, while Markup is based on Cost.

Formulas:
Margin % = [(Price - Cost) / Price] × 100
Price = Cost / (1 - Margin%)
💲

Margin Calculator

Calculate selling price from desired margin

$
%
Selling Price

📐 Formula

Price = Cost / (1 - Margin%)

Example: $100 Cost / (1 - 20%) = $125 Price.

Frequently Asked Questions

Margin = (Selling Price − Cost) / Selling Price × 100. Example: cost ₹400, selling price ₹500. Margin = (100 / 500) × 100 = 20%. That means 20 paise of every rupee sold is profit before other expenses. Margin is the right metric for measuring profitability per sale. Don't confuse it with markup, which uses cost as denominator and gives a different percentage. A 20% margin equals a 25% markup. Margin tells you how much of each rupee you keep. The calculator handles cost, selling price, and either margin or markup interchangeably.

Gross Margin = (Revenue − COGS) / Revenue × 100. COGS = Cost of Goods Sold (direct costs only — raw materials, direct labour, manufacturing). Example: revenue ₹10 lakh, COGS ₹6 lakh. Gross margin = (4 / 10) × 100 = 40%. This shows how efficiently you produce and price your products before any operating expenses (rent, salaries, marketing). Healthy gross margins vary: SaaS 70-85%, retail 25-40%, manufacturing 15-30%. Gross margin is what's left to cover overheads and profit. Track it monthly — it's an early warning when input costs creep up.

It depends on your industry. Retail typically targets 25-40% gross margin; restaurants 60-70% on food (lower on beverages); SaaS 70-85%; manufacturing 15-30%. After overheads, net margins shrink to 5-15% for most businesses. Aim for gross margin high enough to cover all fixed costs plus a healthy net margin (typically 10%+). If your gross margin is below 25%, scaling becomes hard — you don't have enough cushion. Benchmark against industry peers using public data or industry reports. The calculator helps you reverse-engineer the price needed to hit a target margin.

If you know the desired margin and cost, calculate: Selling Price = Cost / (1 − Margin %). Example: cost ₹250, target margin 30%. Selling price = 250 / (1 − 0.30) = 250 / 0.70 = ₹357.14. Alternatively, if you have a target revenue: Revenue = COGS / (1 − target margin %). For ₹6 lakh COGS at 40% target margin, required revenue = 6 / 0.60 = ₹10 lakh. This formula is essential for pricing decisions. Don't use markup for this — you'll undershoot. The calculator works in both directions: forward (price to margin) and reverse.

Markup uses cost as the base; margin uses selling price as the base. Same rupee profit, different percentages. Example: cost ₹100, selling price ₹150. Markup = (50/100) × 100 = 50%. Margin = (50/150) × 100 = 33.3%. Markup is always higher than margin for the same product. Confusing them is one of the most common pricing mistakes — a 50% "margin" mistakenly applied as 50% markup gives you a 33% margin instead, which can wreck profitability. Always confirm which metric a vendor or partner is quoting. The calculator can convert between them instantly.

Discounts cut directly into your margin. Selling at ₹500 with cost ₹400 gives you 20% margin. Offer a 10% discount — selling price drops to ₹450, margin becomes (50/450) = 11.1%. So a 10% discount nearly halved your margin. To preserve margin during a discount, you'd need to negotiate cost down or raise base price. Never run promotions without checking the margin impact — many businesses lose money during sales because the math wasn't done. The calculator can show the margin at any discount level instantly, helping you set thresholds.

Gross margin = (Revenue − COGS) / Revenue × 100 — measures production/sourcing efficiency. Net margin = (Net Profit / Revenue) × 100 — measures bottom-line profitability after all expenses (operating, interest, tax). Example: revenue ₹10 lakh, COGS ₹6 lakh, operating expenses ₹2 lakh, interest ₹50k, tax ₹40k. Gross margin = 40%, net margin = 11%. Both matter. Gross margin shows pricing power; net margin shows overall health. A high gross margin with low net margin signals bloated overheads. Track both monthly. The calculator computes them separately when you input full P&L data.

Understanding the Margin Calculator

Worked Example

A boutique sells a sweater for $120. Wholesale cost is $45. Operating cost (rent, staff, packaging) per unit is $25.

Comparison Table

CostSell at 30% marginSell at 50% marginSell at 70% margin
$10$14.29$20.00$33.33
$25$35.71$50.00$83.33
$50$71.43$100.00$166.67
$100$142.86$200.00$333.33
$500$714.29$1,000.00$1,666.67

Selling price = Cost / (1 − margin%).

Use Cases

Glossary

Gross Margin
Profit after COGS, as % of revenue.
Operating Margin
Profit after COGS + operating expenses, as % of revenue.
Net Margin
Profit after all costs (COGS, OpEx, interest, tax), as % of revenue.
COGS
Cost of Goods Sold — direct costs to produce/deliver.
Markup
Profit ÷ Cost — different ratio from margin.

Sources & References

Disclaimer. This calculator provides estimates for educational purposes only. Tax laws, contribution limits, and rates change frequently. Consult a licensed financial advisor or tax professional for advice specific to your situation.

Last reviewed: May 2026