Free Gross Margin Calculator
Calculate gross profit, gross margin percentage, and markup for a product or your business. You can also find the selling price needed for a target gross margin.
All monetary amounts are in US dollars. Use net sales after returns and discounts, and include only costs classified as cost of goods sold (COGS).
Your Results
Enter your figures and click Calculate Gross Margin.
Gross profit is before operating expenses, financing costs, and income taxes. Markup is undefined when COGS is zero; gross margin is undefined when revenue is zero.
How to Calculate Gross Margin
Gross margin shows the portion of net sales left after deducting cost of goods sold. Use revenue and COGS from the same period, or use the selling price and COGS of one product.
Gross Profit Formula
Gross Profit = Net Sales Revenue − Cost of Goods Sold
Gross Margin Formula
Gross Margin (%) = (Gross Profit ÷ Net Sales Revenue) × 100
If sales are $10,000 and COGS is $6,000, gross profit is $4,000 and gross margin is 40%.
Gross Margin vs. Markup
Margin divides gross profit by selling price or net sales. Markup divides gross profit by COGS. A product costing $60 and selling for $100 has a 40% gross margin and a 66.67% markup.
Reverse Gross Margin Formula
Required Selling Price = Cost per Unit ÷ (1 − Target Margin as a Decimal)
For a $50 item and a 40% gross-margin target, the minimum price rounded up to cents is $83.34. A 100% target with positive COGS cannot be achieved at a finite selling price.
What Belongs in COGS?
COGS generally includes costs of purchasing or producing goods sold, such as inventory purchases, materials, direct production labor, and applicable production overhead. Classifications depend on your accounting method. Keep operating expenses such as advertising and general administration outside gross profit unless accounting rules require a different classification.
How to Interpret the Results
Gross margin measures how much of sales remains to cover operating costs and potential net profit. A higher percentage does not, by itself, establish that a business is profitable. Review sales volume, operating expenses, pricing, and product mix alongside margin.
Gross Margin Examples
| Example | Net Sales | COGS | Gross Profit | Gross Margin |
|---|---|---|---|---|
| Product A | $100 | $60 | $40 | 40% |
| Product B | $200 | $150 | $50 | 25% |
| Business period | $10,000 | $6,000 | $4,000 | 40% |
| Loss example | $80 | $100 | -$20 | -25% |
Illustrative values only. Calculations exclude operating expenses and taxes.
Frequently Asked Questions
What is a gross margin calculator?
It calculates gross profit as a percentage of net sales after subtracting cost of goods sold.
How do I calculate a 40% gross margin?
Subtract COGS from sales, divide by sales, and multiply by 100. For $100 sales and $60 COGS, gross margin is 40%.
Is gross margin the same as gross profit?
No. Gross profit is a dollar amount. Gross margin expresses gross profit as a percentage of net sales.
What is the difference between gross margin and markup?
Margin uses sales as the denominator, while markup uses COGS. A $60 cost and $100 selling price give 40% margin and approximately 66.67% markup.
Can gross margin be negative?
Yes. When revenue is positive but COGS exceeds revenue, gross profit and gross margin are negative.
What happens when revenue is zero?
Gross margin is undefined because it requires dividing by revenue. The calculator shows Undefined rather than dividing by zero.
Can a 100% gross margin be achieved?
It is mathematically possible with positive sales and zero COGS. With positive COGS, a 100% gross-margin target cannot be reached at any finite selling price.
Should I enter sales before or after discounts?
Use net sales after returns, allowances, and discounts. Use a matching COGS figure for the same period.
Does gross margin include operating expenses?
No. Gross margin deducts COGS but does not subtract all operating expenses, interest, or income taxes.
How is total gross margin different from product margin?
Business gross margin uses total net sales and total COGS for a period. Product margin uses the selling price and COGS of an individual product. Business margin is weighted by actual sales, not a simple average of product margins.
Related Calculator
Margin Calculator: Profit, Markup & Selling Price
For educational use. Verify material pricing decisions with your actual business records.