Gross Margin Calculator

Gross profit—
Gross margin—
Markup on cost—
Cost of goods sold Gross profit

How Gross Margin Calculator is calculated: Gross profit = revenue − cost of goods sold — gross margin = gross profit ÷ revenue × 100

What is gross margin?

Gross margin is the share of your sales that is left after paying for the goods you sold. If your shop sells ₹1,00,000 of goods in a month and those goods cost you ₹60,000 to buy, your gross profit is ₹40,000 and your gross margin is 40%. It is the first and most important health check on any business that sells things.

The reason it matters is that everything else in the business is paid out of that margin. Rent, salaries, electricity, delivery, advertising, and your own drawings all come from the gross profit. A business with a 40% gross margin can afford a shop and staff; a business with a 10% gross margin has almost nothing left after running costs, however big its sales are.

This calculator takes two numbers — revenue and the cost of the goods sold — and gives you the gross profit in rupees, the gross margin as a percentage, and the markup on cost. It also shows the split in a donut chart, so you can see at a glance how much of each rupee of sales is cost and how much is profit.

Gross margin is different from net profit margin. Gross margin only subtracts the direct cost of the goods; net margin subtracts everything, including rent and salaries. A business can have a healthy gross margin and still lose money if its running costs are too high. Gross margin tells you whether the products are priced right; net margin tells you whether the business is run right.

How a gross margin calculator works

The maths has three steps. Gross profit is revenue minus the cost of goods sold. Gross margin is gross profit divided by revenue, times 100. Markup on cost is gross profit divided by the cost of goods sold, times 100. The same two inputs give all three answers, and each one is useful in a different conversation.

Here is the default example on this page. Revenue ₹1,00,000, cost of goods sold ₹60,000. Gross profit is 1,00,000 − 60,000 = ₹40,000. Gross margin is 40,000 ÷ 1,00,000 = 40%. Markup on cost is 40,000 ÷ 60,000 = 66.67%. So the same sale is a 40% margin and a 66.67% markup — two different numbers for the same ₹40,000 of profit, because the base is different.

The donut chart splits the revenue into its two parts: ₹60,000 of cost and ₹40,000 of profit. When the cost slice is bigger than the profit slice, the margin is below 50%; when the profit slice is bigger, the margin is above 50%. It is a quick visual check that is easier to read than a percentage when you are comparing months.

Try a second example to see how the numbers move. Revenue ₹2,00,000, cost ₹1,50,000. Gross profit is ₹50,000, margin is 25%, and markup on cost is 33.33%. Sales doubled from the default example, but the profit only rose from ₹40,000 to ₹50,000, because the margin fell. Bigger sales with a thinner margin is the most common way a growing business ends up poorer.

Cost of goods sold, explained

The cost of goods sold — COGS — is the direct cost of the products you sold, and it is the input people get most wrong. It includes the purchase price of the goods, the freight to bring them to your shop, and any direct cost of making them, like raw material and factory wages. It does not include rent, office salaries, advertising, or your own drawings: those are operating costs, and they come later.

For a shop, COGS is mostly the supplier invoice. For a manufacturer, it is raw material plus direct labour plus factory overhead. For a restaurant, it is the food cost — typically 25% to 35% of the menu price. For a service business like a consultancy, COGS is often small or zero, which is why service businesses show very high gross margins: the cost is mostly people's time, which sits in operating costs instead.

The common error is putting operating costs into COGS, or leaving real product costs out. A seller who forgets delivery charges understates COGS and overstates the margin, and then wonders why the bank balance does not match the margin. A seller who puts rent into COGS understates the margin and may raise prices that did not need raising. Keep the line clean: if the cost only exists because you sold that item, it is COGS.

Inventory complicates it slightly. If you bought goods you have not sold yet, they are not in COGS — they sit in stock. COGS is the cost of the goods actually sold in the period, not the goods bought. For a monthly check, take opening stock plus purchases minus closing stock, and that is your COGS for the month.

A worked example: a clothing shop month

Let us run a real month for a small clothing shop. Revenue for the month is ₹5,00,000. The cost of the clothes sold is ₹3,20,000. Gross profit is 5,00,000 − 3,20,000 = ₹1,80,000. Gross margin is 1,80,000 ÷ 5,00,000 = 36%. Markup on cost is 1,80,000 ÷ 3,20,000 = 56.25%.

Now the running costs. Rent ₹45,000, staff salaries ₹70,000, electricity and other costs ₹25,000 — ₹1,40,000 in all. Subtract that from the ₹1,80,000 gross profit and the net profit before tax is ₹40,000, a net margin of 8%. The 36% gross margin looked comfortable; the 8% net margin is the number the owner actually takes home.

Suppose the owner negotiates the supplier down by 5%, so COGS falls to ₹3,04,000. Gross profit becomes ₹1,96,000, margin 39.2%, and net profit ₹56,000 — a 40% jump in take-home profit from a 5% saving on purchases. That is why experienced owners spend more time on supplier prices than on advertising: a point of gross margin is worth far more than a point of sales.

Or suppose a festival discount cuts the average selling price by 10% while costs stay the same. Revenue falls to ₹4,50,000, COGS stays ₹3,20,000, gross profit is ₹1,30,000 and the margin drops to 28.9%. The discount would need to lift sales volume by more than 38% just to keep the gross profit the same. Run that check with this calculator before any sale, not after.

Who uses a gross margin calculator, and why

Shop owners use it every month, because it is the fastest way to spot a problem. If the margin slips from 40% to 35% while sales are steady, something changed: the supplier raised prices, the mix shifted to low-margin items, or stock is being lost. A monthly margin check catches that in weeks instead of at the year-end accounts.

Manufacturers use it to price new products. The margin on each product line tells them which lines to push and which to drop. A factory making two products — one at 45% margin, one at 12% — should put its sales effort and its machine time into the first, even if the second sells more units.

Investors and lenders ask for gross margin before anything else, because it shows whether the business model works at all. A lender deciding on a business loan wants to see a margin that can carry the interest. A business with a 15% gross margin and a loan at 12% has almost no room for error; a business at 45% has room to breathe.

Freelancers and agencies use the same idea on projects. Revenue from a project minus the direct cost of delivering it — subcontractors, stock photos, travel — is the gross profit of that project. A percentage calculator can do the same division, but this tool keeps revenue, cost, profit, margin, and markup together, which is how a business owner actually reviews a month.

Gross margin vs net margin vs markup

Gross margin, net margin, and markup are three views of the same sale, and each answers a different question. Markup asks how much you added to cost. Gross margin asks how much of the price you kept after paying for the goods. Net margin asks how much of the price you kept after paying for everything. On the default example, the markup is 66.67%, the gross margin is 40%, and the net margin depends on the running costs.

The order matters. You set the markup to fix the price. You watch the gross margin to check the pricing and the product mix. You watch the net margin to check the whole business. A shop can have a fine gross margin and a bad net margin if the rent is too high; it can have a bad gross margin and still survive if it is a high-volume, low-cost operation like a wholesale market.

Typical gross margins vary widely by trade. Grocery is often 10% to 20%, electronics 15% to 25%, clothing 40% to 60%, restaurants 60% to 70% on food, and software close to 90% because there is almost no cost of goods. Judging your margin against another trade is pointless; judge it against your own past months and against direct competitors selling the same things.

An ROI calculator takes the next step: it compares the profit with the money invested in the business, not with sales. A shop with a 40% gross margin but ₹50 lakh of stock tied up may earn less on its money than a shop with a 20% margin and ₹5 lakh of stock. Margin measures the sale; ROI measures the business.

Common gross margin mistakes (and how to dodge them)

The first mistake is mixing up margin and markup when talking to suppliers or staff. A supplier who offers you a 40% margin is offering more than a supplier who offers a 40% markup — a 40% margin needs a 66.67% markup. Get the word right in the negotiation, or you will agree to less than you think.

The second mistake is forgetting stock. A shop that buys ₹10 lakh of goods, sells ₹6 lakh worth, and counts the full ₹10 lakh as cost will understate its margin badly. COGS is the cost of goods sold, not goods bought. Count the closing stock every month, even roughly, or the margin figure is fiction.

The third mistake is averaging across products that behave differently. A shop with a 50% margin on clothes and a 10% margin on accessories has a blended margin that hides both truths. Track margin by category, not just in total, and you will see which shelves earn their rent and which do not.

The fourth mistake is treating a falling margin as a pricing problem when it is a cost problem. If the supplier raised prices 8% and you did nothing, the margin fell through no fault of your selling. Check the purchase cost first, then the selling price, then the mix. Fixing the wrong one wastes a season.

How to use this gross margin calculator

Enter the revenue for the period you are checking — a month is the usual choice. Then enter the cost of the goods sold in that same period, using opening stock plus purchases minus closing stock if you keep stock. The gross profit, gross margin, and markup on cost update instantly.

Use it monthly and write the margin down each time. Three months of margins tell you more than one month ever will: a steady 40% is a healthy business; a slide from 40% to 35% to 30% is a warning that needs an answer before it reaches 25%. Compare the margin with the same month last year, not just with last month, because festivals and seasons move sales around.

Everything runs in your browser, with no account and nothing uploaded. Your sales figures stay on your device. For the full picture, follow up with the running costs — rent, salaries, delivery — and work out the net margin from the gross profit this calculator gives you.

Frequently Asked Questions

It depends on the trade: grocery is often 10–20%, electronics 15–25%, clothing 40–60%, restaurants 60–70% on food, and software close to 90%. The right comparison is your own past months and direct competitors, not another industry. What matters is whether the margin covers your running costs and leaves a profit.

Subtract the cost of goods sold from revenue to get gross profit, then divide by revenue and multiply by 100. For revenue of ₹1,00,000 and cost of ₹60,000, the gross profit is ₹40,000 and the margin is 40%. The markup on cost is 40,000 ÷ 60,000 = 66.67%.

Gross margin subtracts only the cost of the goods sold; net margin subtracts everything, including rent, salaries, and advertising. On revenue of ₹5,00,000 with COGS of ₹3,20,000, the gross margin is 36%, but after ₹1,40,000 of running costs the net margin is only 8%. Gross margin checks pricing; net margin checks the whole business.

No. COGS is the cost of the goods actually sold in the period: opening stock plus purchases minus closing stock. Goods you bought but have not sold yet sit in stock and are not in COGS. Counting all purchases as cost understates your margin in any month you build up stock.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.