How to use the profit margin calculator
- Revenue / selling price (₹): the price for one unit, one order or a whole period. Use the price before GST, because the tax you collect is not your income.
- Total cost (₹): every cost you want the margin to cover, for the same unit or period. For product gross margin, that is purchase or manufacturing cost. For a fuller picture, add packaging, shipping, payment-gateway fees, marketplace commission and ad cost per order.
- Read gross profit in rupees, profit margin and markup on cost. If cost is higher than revenue, profit and margin turn negative.
Margin and markup formulas with a worked example
- Gross profit = revenue − cost
- Profit margin = profit ÷ revenue × 100
- Markup = profit ÷ cost × 100
Worked example — a Ludhiana apparel brand. It sells a sweatshirt online for ₹1,200 before GST. Per order it pays ₹380 to manufacture, ₹30 for packaging, ₹70 for shipping and ₹24 in gateway fees (2%, an example rate), a total of ₹504.
- Gross profit = ₹1,200 − ₹504 = ₹696
- Margin = 696 ÷ 1,200 × 100 = 58%
- Markup = 696 ÷ 504 × 100 = 138.1%
Now add the ₹450 the brand spends on Meta ads for each order. Total cost becomes ₹954, profit falls to ₹246 and margin to 20.5%. Run the numbers both ways: the 58% figure before ads is the one to put into the ROAS calculator (break-even ROAS = 1 ÷ 0.58 = 1.72×), while the 20.5% figure tells you what each order really earns.
Which margin are you calculating?
The tool divides by whatever you enter as cost, so the same formula gives three different margins depending on what you include:
- Gross margin: cost of goods only. Useful for comparing products and suppliers.
- Contribution margin: add every cost that varies per order, such as packaging, shipping, gateway fees, commission and returns. This is the right input for break-even ROAS, and the figure our ecommerce and D2C performance marketing team asks for before setting any ad target.
- Net margin: add ad spend, salaries, rent and software for the period. This tells you whether the business as a whole makes money.
Pricing from cost: the markup trap
To hit a target margin, use price = cost ÷ (1 − target margin). For a 60% margin on the ₹504 sweatshirt: 504 ÷ 0.40 = ₹1,260. A common error is adding 60% to cost instead: ₹504 × 1.6 = ₹806.40, which is only a 37.5% margin. Use this table, calculated with markup = margin ÷ (1 − margin), to convert between the two:
| Target margin | Markup needed on cost | Price for ₹1,000 cost |
|---|---|---|
| 20% | 25% | ₹1,250 |
| 25% | 33.33% | ₹1,333.33 |
| 33.33% | 50% | ₹1,500 |
| 40% | 66.67% | ₹1,666.67 |
| 50% | 100% | ₹2,000 |
| 60% | 150% | ₹2,500 |
Common mistakes and how to fix them
- Including GST in revenue. On an 18% item, a ₹1,180 tag is ₹1,000 of revenue. Using ₹1,180 inflates margin. Strip tax first with the percentage calculator.
- Forgetting marketplace and gateway deductions. Commission, fixed fees and shipping deductions are costs per order; leaving them out overstates contribution margin.
- Ignoring returns and RTO. If 15% of COD orders come back, each delivered order must absorb the shipping and handling of the failed ones.
- Comparing margins built on different costs. A supplier's "margin" and your own may include different items. Ask what was in cost before comparing.
- Discounting without recalculating. A 20% discount on a 40% margin product removes half the profit per unit: price ₹1,000 → ₹800, cost ₹600, profit ₹400 → ₹200.
Practical use cases
- D2C founder: calculate contribution margin per SKU before setting ad targets. Our guide on marketing a new D2C brand in India shows where this fits.
- Distributor or wholesaler: quote a price that hits a target margin instead of a habitual markup.
- Service agency or consultant: enter project fee and delivery cost (hours × cost per hour) to see margin per client.
- Restaurant: check dish-level food-cost margin, then again after aggregator commission.
Everything runs in your browser — nothing you type is sent to our servers.
Frequently asked questions
What is the difference between margin and markup?
Both use the same profit, but margin divides it by the selling price and markup divides it by cost. An item costing ₹6,500 and sold for ₹10,000 makes ₹3,500, which is a 35% margin and a 53.85% markup. Margin tells you how much of each sale you keep; markup tells you how far above cost you priced.
How do I calculate the selling price for a target margin?
Divide the cost by one minus the target margin as a decimal. For a 40% margin on a ₹600 cost, the price is 600 ÷ 0.60 = ₹1,000. Do not simply add 40% to cost: ₹600 plus 40% is ₹840, which gives only a 28.6% margin.
Should profit margin be calculated with or without GST?
Without GST. The GST you charge customers is collected on behalf of the government and is not revenue, and input GST you can claim back is not a cost. Enter the pre-tax selling price and pre-tax costs, otherwise the margin will look higher than the money you actually keep.
What costs should I include in total cost?
It depends on the question. For gross margin, include only the cost of the product or service. For contribution margin, add per-order costs such as packaging, shipping, gateway fees, commission and returns. For net margin, include overheads like salaries, rent and ad spend for the period. State which one you report.
Can profit margin be negative?
Yes. If total cost is higher than revenue, gross profit is negative and so is the margin. Selling at ₹900 something that costs ₹1,000 gives a loss of ₹100 and a margin of −11.11%. It often happens after deep discounts or when advertising and shipping are added to cost per order.