Calculate gross margin and gross profit from revenue and COGS or from unit price and cost, or find the revenue or maximum COGS for a target margin.

Optional settings


Related Calculators

Gross Margin Formula

The calculator uses a different formula for each mode.

Margin mode (from totals):

Gross Margin % = (Revenue - COGS) / Revenue ร— 100

Target price mode (price needed to hit a margin):

Price = Cost / (1 - Target Margin % / 100)

Unit sales mode:

Gross Margin % = ((Price - Unit Cost) ร— Units) / (Price ร— Units) ร— 100
  • Revenue: net sales after sales returns, allowances and discounts, matched to the same-period COGS
  • COGS: cost of goods sold, the direct costs tied to producing or buying what you sold
  • Cost: the direct cost for one unit or job
  • Target Margin %: the gross margin you want to earn, entered as a percent
  • Price: selling price per unit
  • Units: number of units sold

Gross margin only counts direct costs. Rent, salaries outside production, marketing, and interest belong in operating or net margin, not here. For a positive COGS, a revenue/price target must be below 100%. Zero COGS and positive revenue gives 100% margin but does not uniquely determine revenue. With known positive revenue, the maximum-COGS mode supports a 100% target and returns zero COGS.

Reference Tables

The first table contains illustrative margin ranges only, not measured industry benchmarks or recommendations. The second table converts between markup and margin. Compare real businesses using dated, comparable financial statements with consistent cost classifications.

Illustrative case Assumed margin range
Hypothetical case A20% - 30%
Hypothetical case B60% - 70%
Hypothetical case C25% - 50%
Hypothetical case D45% - 55%
Hypothetical case E25% - 35%
Hypothetical case F15% - 25%
Hypothetical case G70% - 85%
Hypothetical case H40% - 60%
Markup on Cost Equivalent Gross Margin
25%20.00%
50%33.33%
75%42.86%
100%50.00%
150%60.00%
200%66.67%
300%75.00%

Example and FAQ

Example. A shop sells $80,000 of product in a month and the items cost $52,000 to acquire. Gross profit is $28,000. Gross margin is 28,000 / 80,000 = 35%. To hit a 50% margin instead, the same $52,000 in cost would need to sell for 52,000 / (1 - 0.50) = $104,000.

Is gross margin the same as markup? No. Margin is profit divided by price. Markup is profit divided by cost. A 50% markup is only a 33.33% margin.

What is a good gross margin? There is no universal good margin. Compare relevant, dated peer statements and their COGS definitions, and distinguish gross profit from operating or net profit. The ranges above are hypothetical examples.

Why is my margin lower than my markup? For positive gross profit and positive COGS, margin divides by the larger revenue amount and is lower than markup. Both are zero at break-even. Losses can make both negative; markup is undefined at zero COGS.

Should I include shipping or labor in COGS? Include direct costs needed to make or deliver the product, such as inbound freight, raw materials, and production labor. Leave out office rent, marketing, and admin salaries.