Gross Profit Calculator

Revenue minus cost of goods sold, with margin and markup.

total sales before discounts

direct costs to produce or buy the goods

Enter revenue and cost of goods sold to see your gross profit.

How this gross profit calculator works

A gross profit calculator turns two income-statement lines — revenue and cost of goods sold — into the profit left after making or buying what you sold. This free gross profit calculator also shows gross margin (profit as a share of revenue) and markup (profit as a share of COGS), then lets you fold in discounts, returns, units sold, and operating expenses when you need a deeper look.

The basic surface is just revenue and COGS. That is enough for a product, a month, or a whole shop. Open Advanced to subtract discounts and returns from revenue, split the totals per unit, or subtract operating expenses to see operating profit and net margin. Closing Advanced opts those extras out of the result even if the fields stay filled. This page is an estimate from the figures you type, not an accounting close or tax advice.

How to use the gross profit calculator

  1. Choose a currency and enter total revenue (sales before discounts) and cost of goods sold (the direct cost to produce or buy the goods).
  2. Read the headline gross profit, then gross margin, markup, and net revenue underneath.
  3. Open Advanced only if you need units sold, discounts or returns, or operating expenses. Quantity greater than 1 adds per-unit revenue, COGS, and gross profit.
  4. Closing Advanced ignores quantity, discounts, and operating expenses even if values stay typed. Revenue and COGS still drive the result.

What each line means

Revenue and net revenue

Revenue is the sales figure before discounts and returns. If you enter discounts or returns in Advanced, they come off that total to give net revenue. Returns larger than this period’s sales make net revenue negative, and COGS is still subtracted from that negative amount. Empty revenue means no result, not a zero-sales year.

Cost of goods sold

COGS is the direct cost of the goods you sold: materials, factory labour, or the wholesale cost of inventory. It is not rent, marketing, or salaries sitting below the gross line. If COGS is zero, markup is hidden because you cannot divide by zero; gross profit can still be shown.

Operating expenses sit below gross profit

Rent, payroll, software, and similar overhead are operating expenses. They are subtracted from gross profit to give operating profit, and net margin is operating profit as a share of net revenue. They do not change gross profit, gross margin, or markup. Closing Advanced treats operating expenses as unused.

Gross margin vs markup — they are not the same

Gross margin is gross profit divided by net revenue. Markup is the same profit divided by COGS. On $10,000 of net revenue and $6,000 of COGS, profit is $4,000: the margin is 40% and the markup is 66.67%. Quoting a “40% markup” when you mean a 40% margin understates how much you marked the goods up. This calculator always shows both so the two cannot be mixed up. For the price you must charge to hit a target margin, use the profit margin calculator.

Gross profit formulas

These are the same formulas the calculator uses. Gross margin is hidden when net revenue is not greater than zero, so a negative denominator cannot turn a loss into a positive margin. Markup is hidden when cost of goods sold is zero.

Net revenue
net revenue=revenue−discounts and returns
Gross profit
gross profit=net revenue−cost of goods sold
Gross margin
gross margin=(gross profitnet revenue)×100
Markup on cost of goods sold
markup=(gross profitcost of goods sold)×100
Operating profit
operating profit=gross profit−operating expenses

Worked examples

Example: $10,000 revenue, $6,000 COGS

Gross profit is 10,000 − 6,000 = $4,000. Gross margin is 4,000 ÷ 10,000 = 40%. Markup is 4,000 ÷ 6,000 ≈ 66.67%. Net revenue equals revenue because no discounts were entered.

Example: $500 discounts and $1,200 operating expenses

Net revenue becomes 10,000 − 500 = $9,500. Gross profit is 9,500 − 6,000 = $3,500, so gross margin is 3,500 ÷ 9,500 ≈ 36.84% and markup is 3,500 ÷ 6,000 ≈ 58.33%. Operating profit is 3,500 − 1,200 = $2,300. Net margin is 2,300 ÷ 9,500 ≈ 24.21%.

Example: $10,000 revenue, $12,000 returns, $6,000 COGS

Open Advanced and enter the returns. Net revenue is 10,000 − 12,000 = −$2,000. Gross profit is −2,000 − 6,000 = −$8,000. Markup is −8,000 ÷ 6,000 ≈ −133.33%. Gross margin stays blank because net revenue is not greater than zero.

Example: the same totals across 100 units

With quantity 100 and no discounts, revenue per unit is $100, COGS per unit is $60, and gross profit per unit is $40. The headline gross profit, margin, and markup stay the same — quantity only splits the totals. Closing Advanced hides the per-unit rows.

Things to keep in mind

Gross profit can be negative when COGS is larger than net revenue, including when returns make net revenue itself negative. The calculator shows that loss rather than flooring net revenue at zero. Gross margin is hidden if net revenue is not greater than zero, and markup is hidden if COGS is zero. Closing Advanced does not clear quantity, discounts, or operating expenses — it only stops them affecting the result. This is not a tax calculator and it does not apply inventory methods such as FIFO or LIFO. For the selling price that hits a target margin, use the profit margin calculator.

Gross profit calculator FAQ

What is the difference between gross profit and net profit?

Gross profit is net revenue minus cost of goods sold. Operating profit (the closest figure this calculator shows to net profit) subtracts operating expenses as well. Tax, interest, and one-off items are not modelled here.

What is the difference between gross margin and markup?

Gross margin is gross profit divided by net revenue. Markup is gross profit divided by COGS. On $10,000 revenue and $6,000 COGS, margin is 40% and markup is 66.67%. They are not interchangeable.

What counts as cost of goods sold?

Direct costs of the goods you sold: materials, production labour, or wholesale inventory cost. Rent, marketing, salaries, and software are operating expenses — enter those in Advanced if you want operating profit, not as COGS.

How do discounts and returns change gross profit?

They reduce revenue to net revenue before COGS is subtracted, and net revenue is not floored at zero. A $500 return on $10,000 of sales leaves $9,500 of net revenue. Returns of $12,000 on $10,000 of sales and $6,000 of COGS leave net revenue of −$2,000 and gross profit of −$8,000, with markup ≈ −133.33%. Closing Advanced ignores discounts even if the amount stays typed.

What happens when I close Advanced?

Quantity, discounts/returns, and operating expenses drop out of the result even if values stay typed — the same contract as other calculators on this site. Revenue and COGS remain. Per-unit rows and operating profit disappear.

Does this gross profit calculator store my figures?

Completed results can be saved in this browser’s local history so you can reopen them later. They stay on your device and are not sent to our servers or to analytics.