Gross Profit Calculator

Find gross profit, gross margin and markup from revenue and the direct cost of goods sold.

Finance and MoneyUpdated 2026-11-183 min read
Gross Profit Calculator
Use sales after returns and allowances have been deducted.
Include direct materials, direct labour and production overhead.
Gross profit
...
Gross margin...
Markup on cost...

What it does

Gross profit is the first measure of profit on an income statement. OpenStax's Principles of Finance explains that cost of goods sold is deducted from net sales to arrive at gross profit, and that sales minus cost of goods sold is called gross profit because gross margin equals gross profit divided by sales. The same text notes that the costs in this section are the direct costs of making or buying what was sold.

That distinction matters. Direct materials, direct labour and production overhead belong in cost of goods sold. Rent for the office, advertising, administrative salaries and interest do not, because they sit below the gross profit line. OpenStax's accounting chapter defines gross margin as the amount left after deducting cost of goods sold from net sales, available to cover operating expenses and profit.

Gross margin and markup describe the same profit but use different denominators. OpenStax's marketing text gives markup percentage as the selling price minus the initial purchase price, divided by the initial purchase price, times one hundred. Gross margin divides by the selling price instead. A 40% margin and a 66.67% markup can therefore describe the exact same transaction.

This page takes two numbers, revenue and cost of goods sold, and returns three results: the dollar gross profit, the gross margin as a percentage of revenue, and the markup as a percentage of cost. With the defaults of $50,000 in sales and $30,000 in costs, it shows $20,000 of gross profit, a 40.00% margin and a 66.67% markup.

Because the tool uses net sales, enter revenue after returns, allowances and discounts. It also assumes a single period and a single product mix, which is enough for a quick check or a quote comparison but not for a full set of financial statements.

How to use

  1. Enter net sales for the period, after returns and allowances.
  2. Enter the direct cost of goods sold for those same sales.
  3. Check the gross profit in dollars.
  4. Read the gross margin, which uses revenue as the denominator.
  5. Read the markup, which uses cost as the denominator.
  6. Compare the result with other periods using the same definition of cost.

Formula

G = R - C. Gross margin M = G / R x 100. Markup K = G / C x 100. All dollar figures are in the currency of the inputs.
R
Net revenue or net sales for the period, in dollars.
C
Cost of goods sold, the direct cost of the items sold, in dollars.
G
Gross profit in dollars.
M
Gross margin as a percentage of revenue.
K
Markup as a percentage of cost.

When cost is zero, markup has no denominator and the tool reports 0.00% rather than an undefined value. A negative gross profit is possible if costs exceed revenue and is shown with a minus sign before the dollar amount. The two percentage figures answer different questions: margin tells you what share of each sales dollar is profit, while markup tells you how much was added to the cost to set the price.

Worked example

Example: $50,000 of sales and $30,000 of goods cost

Net revenue $50,000 and cost of goods sold $30,000. These are the page defaults.

  1. Gross profit: $50,000 - $30,000 = $20,000.00.
  2. Gross margin: $20,000 / $50,000 = 0.40, or 40.00%.
  3. Markup on cost: $20,000 / $30,000 = 0.66667, or 66.67%.
  4. Check the margin another way: 40.00% of $50,000 is $20,000, which matches the profit.
  5. Check the markup another way: $30,000 plus 66.67% of $30,000 returns about $50,000 in sales.
  6. The tool shows $20,000.00, 40.00 % and 66.67 %.

Reference table

Gross profit, margin and markup at $50,000 of revenue under different cost levels
Cost of goods soldGross profitGross marginMarkup on cost
$20,000.00$30,000.0060.00 %150.00 %
$25,000.00$25,000.0050.00 %100.00 %
$30,000.00$20,000.0040.00 %66.67 %
$35,000.00$15,000.0030.00 %42.86 %
$40,000.00$10,000.0020.00 %25.00 %

Limits

  • Uses only direct cost of goods sold, so it says nothing about operating expenses or net income.
  • Assumes one period and one blended product mix, which can hide differences between lines.
  • Does not adjust for inventory changes, so the cost figure must already reflect the units actually sold.
  • Ignores taxes, discounts granted after the sale and currency differences.

Common mistakes

  • Using gross sales instead of net sales when returns and allowances were recorded.
  • Including selling or administrative costs in cost of goods sold, which understates gross margin.
  • Confusing margin with markup and quoting 66.67% as the margin when the margin is 40.00%.
  • Comparing a margin from one business with a markup from another as if they were the same measure.
  • Entering revenue and cost from different periods, which makes the percentage meaningless.

Try it yourself

Quick checks. Answers sit tucked under each question.

Revenue is $80,000 and cost of goods sold is $50,000. What does the tool show?

Gross profit is $30,000.00. Gross margin is 30,000 / 80,000 = 37.50 % and markup is 30,000 / 50,000 = 60.00 %.

A business reports $120,000 of sales and a 25% gross margin. What is its gross profit and cost of goods sold?

A 25% margin on $120,000 gives $30,000.00 of gross profit. Cost of goods sold is $120,000 - $30,000 = $90,000.00, and the markup on that cost is 33.33 %.

Compare $200,000 of sales with $150,000 of cost to the example. What is different?

Gross profit is $50,000.00. The margin is 50,000 / 200,000 = 25.00 %, below the example's 40.00 %, and the markup is 50,000 / 150,000 = 33.33 %, below 66.67 %.

Questions

What is gross profit?

Revenue from sales minus the direct cost of the goods or services sold. OpenStax defines it as the amount left after deducting cost of goods sold from net sales.

What is the difference between gross margin and markup?

Margin divides profit by revenue, while markup divides profit by cost. A $20,000 profit on $50,000 of sales over $30,000 of cost is a 40% margin but a 66.67% markup.

Which percentage do investors usually quote?

Gross margin, because it relates profit directly to sales and is easy to compare across companies of different sizes.

What belongs in cost of goods sold?

Direct materials, direct labour and the production overhead needed to make the goods sold. For a retailer it is mainly the purchase cost of goods resold.

Can gross profit be negative?

Yes. If direct costs exceed revenue, the tool shows a negative dollar profit and a negative margin. That usually signals pricing or cost control problems.

Is gross profit the same as net profit?

No. Net profit also deducts operating expenses, interest and tax. Gross profit stops before those items and only reflects the core sale.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.