acalculator

What is my gross profit?

Type your sales, returns, discounts and cost of goods sold, or let the gross profit calculator work out the cost of goods sold from your inventory and purchases. It shows gross profit, gross margin and markup.

Your numbers

Cost of goods sold
Gross profit
$100,000.00

Net sales of $245,000.00 less $145,000.00 cost of goods sold is a gross profit of $100,000.00, a 40.82% gross margin.

Net sales
$245,000.00
Cost of goods sold
$145,000.00
Gross margin
40.82%
Markup
68.97%

Gross profit: $100,000.00. Net sales of $245,000.00 less $145,000.00 cost of goods sold is a gross profit of $100,000.00, a 40.82% 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 from sales, returns, discounts and the cost of goods sold (typed, or from beginning inventory, purchases and ending inventory), with the gross margin and markup.

Example with the default inputs (Sales $250,000.00, Returns and allowances $5,000.00, Sales discounts $0.00, Cost of goods sold I know it, Cost of goods sold $145,000.00): Net sales of $245,000.00 less $145,000.00 cost of goods sold is a gross profit of $100,000.00, a 40.82% gross margin.

Method: Net sales = sales − returns and allowances − discounts; COGS = typed, or inventory at start + purchases − inventory at end; gross profit = net sales − COGS; gross margin = gross profit ÷ net sales × 100; markup = gross profit ÷ COGS × 100.

  • All amounts cover the same period (a month, quarter or year).
  • Cost of goods sold holds only direct costs; rent, marketing and office salaries are operating expenses and are not taken off.
  • Purchases are net of any items you took out for personal use (IRS Publication 334).

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Sales $1,200,000.00, Returns and allowances $0.00, Sales discounts $0.00, Cost of goods sold I know it, Cost of goods sold $780,000.00 gives Gross profit $420,000.00, Gross margin 35%, Markup 53.846154%.Source: U.S. Securities and Exchange Commission, Beginners' Guide to Financial Statements (gross profit is net revenues minus cost of sales). https://www.sec.gov/about/reports-publications/beginners-guide-financial-statements
  2. Sales $250,000.00, Returns and allowances $5,000.00, Sales discounts $0.00, Cost of goods sold From inventory, Inventory at start $40,000.00, Purchases $150,000.00, Inventory at end $45,000.00 gives Net sales $245,000.00, Cost of goods sold $145,000.00, Gross profit $100,000.00, Gross margin 40.816327%.Source: IRS Publication 334 (2025), Tax Guide for Small Business, chapter 6, Cost of Goods Sold (inventory at beginning of year + purchases − inventory at end of year). https://www.irs.gov/publications/p334
  3. Sales $100.10, Returns and allowances $0.05, Sales discounts $0.00, Cost of goods sold I know it, Cost of goods sold $50.05 gives Gross profit $50.00, Net sales $100.05.Source: U.S. Securities and Exchange Commission, Beginners' Guide to Financial Statements (net revenues are sales minus returns and allowances). https://www.sec.gov/about/reports-publications/beginners-guide-financial-statements
  4. Sales $10,000.00, Returns and allowances $0.00, Sales discounts $500.00, Cost of goods sold I know it, Cost of goods sold $11,000.00 gives Gross profit -$1,500.00, Gross margin -15.789474%.Source: U.S. Securities and Exchange Commission, Beginners' Guide to Financial Statements. https://www.sec.gov/about/reports-publications/beginners-guide-financial-statements

How it works

  • Net sales = sales − returns and allowances − sales discounts
  • Cost of goods sold (COGS) = the amount you type, or inventory at start + purchases − inventory at end
  • Gross profit = net sales − COGS
  • Gross margin = gross profit ÷ net sales × 100
  • Markup = gross profit ÷ COGS × 100 (not shown when COGS is $0)

Put any direct labor and materials you count in the cost of goods sold into "Purchases" (the IRS adds them in the same step).

Exact arithmetic. Every amount is read as the exact decimal you typed, and every step is an exact fraction, so cents never drift: $100.10 − $0.05 − $50.05 is exactly $50.00.

Output format. Money shows in dollars and cents; percents show at most 2 decimals with trailing zeros left off; each is rounded half up from its exact value.

When there is no answer.

  • Net sales of $0 or less (returns and discounts use up the sales).
  • Inventory at end more than inventory at start plus purchases (a cost of goods sold below $0).
  • Amounts so far apart in size that the margin or markup is beyond the largest number the page can hold.

Assumptions

  • All amounts are for the same period. Sales are more than $0; every amount is at most $1 trillion.
  • Operating expenses (rent, marketing, office salaries), interest and taxes are not part of gross profit.

Worked examples by hand

$1,200,000 of sales, $780,000 COGS. Gross profit = 1,200,000 − 780,000 = $420,000; margin = 420,000 ÷ 1,200,000 = 35%; markup = 420,000 ÷ 780,000 = 53.85%.

COGS from inventory. Net sales = 250,000 − 5,000 = $245,000; COGS = 40,000 + 150,000 − 45,000 = $145,000; gross profit = $100,000; margin = 100,000 ÷ 245,000 = 40.82%.

Cents. 100.10 − 0.05 = $100.05 net sales; − 50.05 = $50.00 gross profit.

A gross loss. Net sales = 10,000 − 500 = 9,500; gross profit = 9,500 − 11,000 = −$1,500; margin = −1,500 ÷ 9,500 = −15.79%.

Other questions people ask

How do I calculate gross profit?

Gross profit = net sales − cost of goods sold. Net sales are your sales minus returns, allowances and discounts. With $1,200,000 of net sales and $780,000 cost of goods sold, gross profit is $420,000.

How do I work out cost of goods sold from inventory?

Cost of goods sold = inventory at the start + purchases − inventory at the end, as on IRS Schedule C. Starting with $40,000 of stock, buying $150,000 and ending with $45,000 gives $145,000.

What is the difference between gross profit and gross margin?

Gross profit is a dollar amount. Gross margin is that amount as a percent of net sales: $420,000 ÷ $1,200,000 = 35%. Use the gross margin calculator to work backwards from a target margin.

What is the difference between gross profit and net profit?

Gross profit takes off only the cost of goods sold. Net profit also takes off operating expenses (rent, marketing, office salaries), interest and taxes, so it is lower.

Can gross profit be negative?

Yes. If the cost of goods sold is more than net sales, you have a gross loss and a negative gross margin. $9,500 of net sales with $11,000 of cost is a $1,500 gross loss, a −15.79% margin.

Why subtract returns and discounts?

Money you refund or never collect is not revenue. The SEC’s guide to financial statements subtracts returns and allowances from gross revenues to get net revenues before it subtracts the cost of sales.