Gross Margin Calculator (Gross Profit Margin)
Use this gross margin calculator: enter revenue and cost of goods sold (COGS) to get your gross margin as a percentage.
Gross Margin
60.00%
Enter your numbers and press Calculate.
(Revenue - Cost of goods sold) ÷ Revenue
How to calculate gross margin
Gross margin = (Revenue − COGS) ÷ Revenue × 100
- Take revenue for the period after returns and discounts, without sales tax or VAT.
- Take the cost of goods sold for the same period. It covers the products sold in that period, and stock still on the shelf stays out.
- Subtract COGS from revenue to get gross profit, divide that by revenue and multiply by 100.
($100,000 − $40,000) ÷ $100,000 × 100 = 60.00%
What is gross margin
Gross margin, also called gross profit margin, is the share of revenue left after subtracting the cost of goods sold (COGS). If a product sells for $100 and cost $40 to buy or make, $60 is gross profit and the gross margin is 60%. It answers one question: is what you sell priced well against what it costs you to make or buy.
COGS is the direct cost of the goods that were actually sold. The international inventory standard IAS 2 says the cost of inventories has three parts. They are all costs of purchase, costs of conversion (direct labor and production overhead) and other costs incurred in bringing the inventories to their present location and condition. When the inventories are sold, that cost is recognized as an expense in the same period as the related revenue (IFRS: IAS 2 Inventories). Rent, salaries, marketing and other operating costs sit below gross profit in the income statement. Gross margin is therefore a product-level result that stops before the cost of running the business.
Because it is a percentage, gross margin compares businesses and product lines of very different size. A $60,000 gross profit is the same amount whether it came from $100,000 or $600,000 of revenue, but the margins, 60% and 10%, describe two very different businesses. That is also why the gross margin percentage feeds other calculations: the CAC payback period and customer lifetime value are only as reliable as the margin used in them.
Gross margin vs markup, gross profit and contribution margin
The gross margin formula is one division, but several other numbers are built from the same revenue and cost figures. They are easy to mix up in a pricing meeting. The table shows what each one divides and what it gives for the same example: $100,000 of revenue and $40,000 of COGS. Use it to check which number a report or a supplier is actually quoting.
| Metric | Formula | Result for the example | What it answers |
|---|---|---|---|
| Gross profit | Revenue − COGS | $60,000 | How much money is left after product cost |
| Gross margin | (Revenue − COGS) ÷ Revenue | 60% | What share of each sale is left after product cost |
| Markup | (Revenue − COGS) ÷ COGS | 150% | How much was added on top of cost |
| Contribution margin | (Revenue − Variable costs) ÷ Revenue | Depends on variable costs | What each sale leaves to cover fixed costs |
| Net profit margin | Net profit ÷ Revenue | Depends on all costs | What the business keeps after every expense |
Gross margin vs markup matters for pricing, because both are percentages of the same gross profit and one is easily read as the other. A 50% markup on a $40 cost gives a $60 price and a gross margin of 33.3%. Reading that 50% markup as a 50% margin overstates the margin by almost 17 points. To price for a target margin, divide cost by (1 − target margin): a $40 cost at a 60% target margin needs a $100 price, which is the example above.
Gross margin vs gross profit is simpler. Gross profit is the amount and gross margin is that amount as a share of revenue. Contribution margin goes one step further and also subtracts variable costs that may sit outside COGS, such as payment fees, packaging or outbound shipping in an online store. Where those costs land depends on the accounting policy, so check the definition before you compare the two figures.
Why gross margin changes between periods
Suppose gross margin drops from 60% to 54% between two quarters. The cause can sit on the price side, the cost side or in the mix of what was sold. Check these before you change prices or blame a supplier:
Price: discounts and promotions lower revenue per unit while COGS per unit stays the same, so margin falls even when volume rises.
Cost: a supplier price increase, a weaker exchange rate on imported goods or higher inbound freight raises COGS per unit.
Product mix: selling more low-margin items lowers the overall gross margin even when every product's own margin is unchanged.
Definition: moving a cost such as inbound shipping or packaging into or out of COGS shifts the margin while the business stays the same.
Stock adjustments: write-downs of damaged or obsolete stock are recognized as an expense and can pull one period's margin down.
A negative gross margin is a valid result. It means COGS exceeded revenue, which happens with clearance sales or when a product is priced below its cost. The calculator shows it as a negative percentage instead of stopping at zero, because hiding the loss would hide the decision you need to make.
For an online store, gross margin also sets the floor for paid acquisition. With a 60% gross margin, a campaign needs a return on ad spend of at least 1 ÷ 0.60 ≈ 1.67 just to cover product cost and ad spend. Shipping, fees and other costs come on top of that. The lower the margin, the higher that break-even ROAS climbs.
When to use gross margin
Use it when you set or review a price, compare suppliers, decide which product lines to push or check whether a discount campaign still pays. Calculate gross margin per product or category as well as for the whole store, because a healthy overall figure can hide a line that loses money. When you plan acquisition, feed the result into the CAC payback period calculator together with your average order value.
Where gross margin misleads
Changing which costs count as COGS moves gross margin while the business stays the same, so state the cost definition next to the number. Reading markup as margin overstates profit. A high gross margin also says nothing about whether operating costs leave any profit at the bottom line.
Guides on this topic
Frequently Asked Questions
What is gross margin?
Gross margin is the percentage of revenue left after the cost of goods sold (COGS) is subtracted: (Revenue − COGS) ÷ Revenue × 100. It is also called gross profit margin. COGS covers the direct cost of what was sold, such as purchase price, production cost and inbound freight, according to the accounting policy in use. Gross margin shows how well your products are priced against their cost. It does not include rent, salaries, marketing or other operating costs, so it says how healthy the product economics are before the cost of running the business.
How do you calculate gross margin?
Subtract COGS from revenue, divide the result by revenue and multiply by 100. With $100,000 of revenue and $40,000 of COGS in the same period, gross profit is $60,000 and gross margin is 60,000 ÷ 100,000 × 100 = 60%. Use revenue after returns and discounts, without sales tax, and COGS for the goods sold in that period. Keep the cost definition the same between periods. If COGS is higher than revenue, the result is a negative gross margin, which shows products are selling below cost.
What is the difference between gross margin and gross profit?
Gross profit is an amount: revenue minus COGS. Gross margin is the same figure divided by revenue and shown as a percentage. A $60,000 gross profit means a 60% gross margin on $100,000 of revenue and only 6% on $1,000,000 of revenue. Gross profit tells you how much money is available to pay operating costs. Gross margin tells you how much of every sale is left after product cost, which lets you compare products, periods and businesses of different size on the same scale.
What is the difference between gross margin and markup?
Both start from gross profit, but they divide it by different bases. Gross margin divides gross profit by revenue, markup divides it by cost. A product that costs $40 and sells for $100 has a 60% gross margin and a 150% markup. Gross margin can never reach 100% unless cost is zero, while markup has no upper limit. To price for a target margin, use Price = Cost ÷ (1 − target margin).
What is a good gross margin?
There is no single good gross margin. It depends on the industry and business model, because cost structures differ widely between software, manufactured goods and resold products. A margin that would be worrying for a digital product can be normal for a grocery retailer that relies on volume. Compare your gross margin with your own history and with companies that sell similar products through similar channels. What matters most is whether the margin covers operating costs and acquisition spend with something left over.
Related calculators


