acalculator

What is my gross margin?

Enter your revenue and your cost of goods sold to see your gross profit and gross margin. Any two of the four values work.

Your numbers

Gross margin
40%

Revenue of $500,000.00 with $300,000.00 cost of goods sold is a gross profit of $200,000.00, a 40% gross margin.

Gross profit
$200,000.00
Markup
66.67%

Gross margin: 40%. Revenue of $500,000.00 with $300,000.00 cost of goods sold is a gross profit of $200,000.00, a 40% gross margin.

The results are estimates for information only. They are not financial, tax, or legal advice. Check the numbers with your lender or a qualified professional before you decide. Terms of use

How to calculate

Computes gross profit and gross margin (gross profit as a percent of revenue) from revenue and cost of goods sold, or any two of the four.

Example with the default inputs (Revenue $500,000.00, Cost of goods sold $300,000.00): Revenue of $500,000.00 with $300,000.00 cost of goods sold is a gross profit of $200,000.00, a 40% gross margin.

Formula: M = P ÷ R × 100, where P = R − C. C is the cost of goods sold, R the revenue, P the gross profit and M the gross margin.

  • The cost of goods sold and the revenue are more than 0.
  • The margin is a percent of the revenue (the selling price); the markup is a percent of the cost.
  • A loss gives a negative profit and a negative margin. Margins run from −1,000% (a cost 11 times the revenue) to just under 100%; numbers outside that range, or that need a cost or revenue of 0 or less, have no answer.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Revenue $1,200,000.00, Cost of goods sold $780,000.00 gives Gross profit $420,000.00, Gross margin 35%, Markup 53.846154%.Source: hand calculation in content.mdx: 1,200,000 − 780,000 = 420,000; 420,000 ÷ 1,200,000 × 100 = 35%; 420,000 ÷ 780,000 × 100 = 53.85%
  2. Revenue $80,000.00, Gross margin 45% gives Gross profit $36,000.00, Cost of goods sold $44,000.00.Source: hand calculation in content.mdx: 80,000 × 0.45 = 36,000; 80,000 − 36,000 = 44,000
  3. Cost of goods sold $26,000.00, Gross margin 35% gives Revenue $40,000.00, Gross profit $14,000.00.Source: hand calculation in content.mdx: 26,000 ÷ (1 − 0.35) = 40,000; 40,000 − 26,000 = 14,000
  4. Gross profit $9,000.00, Gross margin 60% gives Revenue $15,000.00, Cost of goods sold $6,000.00, Markup 150%.Source: hand calculation in content.mdx: 9,000 ÷ 0.60 = 15,000; 15,000 − 9,000 = 6,000; 9,000 ÷ 6,000 × 100 = 150%

How gross margin is worked out

  • gross profit: P = R − C
  • gross margin: M = P ÷ R × 100
  • markup: P ÷ C × 100

R is revenue (net sales), C the cost of goods sold, P the gross profit, and M the gross margin in percent.

Fill in any two of revenue, cost of goods sold, gross profit and gross margin. The calculator finds the other two, and the markup, from these rearrangements:

  • R = C ÷ (1 − M ÷ 100) and C = R × (1 − M ÷ 100)
  • R = P ÷ (M ÷ 100) and P = M ÷ 100 × R
  • C = R − P and R = P + C

Assumptions

  • Revenue and cost of goods sold are more than $0, for the same period (a month, a quarter or a year).
  • A gross loss gives a negative gross profit and margin.
  • The gross margin is from −1,000% to just under 100%. Numbers outside that range, or that need revenue or cost of goods sold of $0 or less, have no answer.
  • Operating expenses, interest and tax are not included (they belong to net margin).

Limits

Revenue and cost of goods sold are more than $0 and at most $1,000,000,000,000; gross profit is from −$1,000,000,000,000 to $1,000,000,000,000; the gross margin from −1,000% to just under 100%. A solved value outside these limits has no answer.

Worked examples by hand

Revenue $1,200,000, COGS $780,000. Gross profit = 1,200,000 − 780,000 = $420,000. Gross margin = 420,000 ÷ 1,200,000 × 100 = 35%. Markup = 420,000 ÷ 780,000 × 100 = 53.85%.

Revenue $80,000 at a 45% gross margin. Gross profit = 80,000 × 0.45 = $36,000. COGS = 80,000 − 36,000 = $44,000.

COGS $26,000 at a 35% target. Revenue = 26,000 ÷ (1 − 0.35) = $40,000. Gross profit = 40,000 − 26,000 = $14,000.

Gross profit $9,000 at a 60% gross margin. Revenue = 9,000 ÷ 0.60 = $15,000. COGS = 15,000 − 9,000 = $6,000. Markup = 9,000 ÷ 6,000 × 100 = 150%.

Other questions people ask

How do I calculate gross margin?

Subtract the cost of goods sold (COGS) from revenue to get gross profit. Divide gross profit by revenue and multiply by 100. Revenue of $1,200,000 with $780,000 COGS gives $420,000 gross profit and a 35% gross margin.

What goes into cost of goods sold?

The direct costs of what you sold: materials, the labor to make it, and goods bought for resale. Rent, marketing, office salaries and other overheads are operating expenses, not COGS, so they do not lower the gross margin.

What is the difference between gross margin and net margin?

Gross margin only takes off the cost of goods sold. Net margin also takes off operating expenses, interest and tax, so it is lower. This calculator works out gross margin.

What is the difference between gross margin and markup?

Gross margin divides gross profit by revenue; markup divides it by the cost. A 35% gross margin is a 53.85% markup, because the same $420,000 profit is compared with $780,000 of cost instead of $1,200,000 of revenue.

How much revenue do I need for a target gross margin?

Divide the cost of goods sold by (1 − margin ÷ 100). With $26,000 of COGS and a 35% target, you need 26,000 ÷ 0.65 = $40,000 of revenue.

Should I use gross or net revenue?

Use net sales: sales minus returns, allowances and discounts. That is the revenue line most income statements show before cost of sales.