HomeCalculatorsMathMargin Calculator

Margin Calculator

Math

Calculate gross profit margin, markup percentage, and profit amount from cost and selling price. Free margin calculator for business, retail, and e-commerce.

01,00,00,000
01,00,00,000

Gross Margin

0.00%
Markup
0.00%
Profit Amount
₹0
Revenue
₹0

What is a Margin?

A Margin Calculator computes gross profit margin — the percentage of revenue retained as profit after accounting for the direct cost of goods or services. Enter a cost price and selling price, and the calculator instantly shows the gross margin percentage, markup percentage, profit amount, and total revenue.

Margin and markup are two ways to express the same profit relationship, but they use different reference points. Margin expresses profit as a fraction of revenue (the selling price). Markup expresses profit as a fraction of cost. This distinction matters because a 40% markup does not produce a 40% margin — it produces a 28.6% margin. Confusing the two leads to systematic underpricing, which is one of the most common pricing errors in small business.

Gross margin is the starting point for pricing decisions, profitability analysis, and business benchmarking. It does not include operating expenses (rent, salaries, software), taxes, or depreciation — those are accounted for in the net margin calculation. Use the Profit & Loss Calculator for a more complete income statement view.


How to use this Margin calculator

  1. Enter the Cost Price — the total direct cost to acquire or produce one unit (product cost, shipping, packaging, marketplace fees).
  2. Enter the Selling Price — the price you charge the customer.
  3. The Gross Margin, Markup, Profit Amount, and Revenue appear instantly.
  4. Adjust the sliders to explore different pricing scenarios.
  5. Use the results to set minimum prices that meet your margin target.

Formula & Methodology

Gross Margin:
Gross Margin (%) = (Selling Price − Cost) ÷ Selling Price × 100

Markup:
Markup (%) = (Selling Price − Cost) ÷ Cost × 100

Profit Amount:
Profit = Selling Price − Cost

Converting between margin and markup:
Markup = Margin ÷ (1 − Margin) Margin = Markup ÷ (1 + Markup)

Example:
- Cost Price: ₹500
- Selling Price: ₹800
- Profit: ₹300
- Gross Margin: 300 ÷ 800 × 100 = 37.5%
- Markup: 300 ÷ 500 × 100 = 60%
Frequently Asked Questions
What is gross profit margin?
Gross profit margin is the percentage of revenue remaining after subtracting the cost of goods sold (COGS). It is calculated as: (Selling Price − Cost) ÷ Selling Price × 100. A gross margin of 40% means that 40% of every rupee of revenue is profit, and 60% goes to cover the cost of the product or service.
What is the difference between margin and markup?
Margin is calculated as a percentage of the selling price: (Profit ÷ Selling Price) × 100. Markup is calculated as a percentage of the cost price: (Profit ÷ Cost) × 100. For the same transaction, markup is always higher than margin. For example, if cost is ₹500 and selling price is ₹800, the margin is 37.5% but the markup is 60%.
Why are margin and markup different numbers?
They use different denominators. Margin divides profit by the selling price (revenue-based). Markup divides profit by the cost price (cost-based). A common mistake is to apply a percentage markup to a cost price and expect it to produce the same percentage margin — it never does. To achieve a 40% margin, you need a 66.7% markup, not a 40% markup.
What is a good profit margin?
It depends heavily on the industry. Software and SaaS businesses often operate at 60–80% gross margins. Retail typically runs at 20–50%. Supermarkets and grocery operate at 2–5%. A 'good' margin is one that covers all operating expenses and leaves a net profit after fixed costs. Compare your gross margin to industry benchmarks, not absolute numbers.
How do I calculate selling price from cost and desired margin?
Rearrange the margin formula: Selling Price = Cost ÷ (1 − Margin%). For a desired 40% margin on a ₹500 cost: Selling Price = 500 ÷ (1 − 0.4) = ₹833.33. Do not add the margin percentage directly to the cost — that gives you the markup, not the margin.
What is the difference between gross margin and net margin?
Gross margin subtracts only the direct cost of goods sold (COGS) from revenue. Net margin subtracts all costs — COGS, operating expenses, taxes, interest, and depreciation. This calculator computes gross margin. Net margin requires your full income statement.
Can margin be negative?
Yes — if the selling price is lower than the cost, the profit is negative, giving a negative margin. This happens when products are sold below cost during clearance sales, or when a business misprices a product. A persistent negative margin indicates the business is losing money on every unit sold.
How does this calculator handle e-commerce fees?
Enter your total landed cost in the Cost Price field — including product cost, shipping, packaging, marketplace fees, and any other per-unit costs. This gives you the true gross margin after all variable costs are accounted for.
What is the margin formula?
Gross Margin (%) = (Selling Price − Cost Price) ÷ Selling Price × 100. For example: Cost = ₹500, Selling Price = ₹800 → Profit = ₹300 → Gross Margin = (300 ÷ 800) × 100 = 37.5%.
Is markup the same as margin in everyday language?
In everyday conversation the terms are often used interchangeably, but in accounting and finance they are distinct. Margin is always referenced to revenue; markup is always referenced to cost. This calculator shows both so you can communicate the right number in the right context.
How do I use margin to set prices competitively?
Start by setting a minimum acceptable margin (e.g. 30%) based on your overhead. Calculate the minimum selling price as Cost ÷ (1 − 0.30). Then check whether the market supports that price. If competitors sell lower, you need to reduce costs, not the margin target. If the market supports a higher price, you gain additional margin.