# What is my gross profit?

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.

- Page: https://www.acalculator.org/finance/gross-profit-calculator
- JSON spec: https://www.acalculator.org/finance/gross-profit-calculator.json
- Version: fbe4f93cec2d

## Default answer

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.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| sales | Sales | Everything you sold in the period, before returns and discounts. |
| returns | Returns and allowances | Refunds and credits you gave customers for returned or faulty goods. |
| disc | Sales discounts | Discounts you gave off the sales price, such as early-payment discounts. |
| from | Cost of goods sold | Whether you type the cost of goods sold or work it out from your inventory. |
| cogs | Cost of goods sold | The direct cost of what you sold: goods bought for resale, materials and production labor. |
| begin | Inventory at start | The value of your stock at the start of the period. |
| buy | Purchases | What you bought for resale or production during the period, including freight in. |
| end | Inventory at end | The value of your stock left at the end of the period. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| profit | Gross profit | Net sales minus the cost of goods sold. |
| netSales | Net sales | Sales minus returns and allowances and sales discounts. |
| cost | Cost of goods sold | Typed, or inventory at start + purchases − inventory at end. |
| margin | Gross margin | Gross profit as a percent of net sales. |
| markup | Markup | Gross profit as a percent of the cost of goods sold. |

## 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.

## Assumptions

- 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).

## Worked examples

1. sales = $1,200,000.00, returns = $0.00, disc = $0.00, from = typed, cogs = $780,000.00 gives profit = $420,000.00, 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 = $5,000.00, disc = $0.00, from = inventory, begin = $40,000.00, buy = $150,000.00, end = $45,000.00 gives netSales = $245,000.00, cost = $145,000.00, profit = $100,000.00, 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 = $0.05, disc = $0.00, from = typed, cogs = $50.05 gives profit = $50.00, netSales = $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 = $0.00, disc = $500.00, from = typed, cogs = $11,000.00 gives profit = -$1,500.00, 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.

## FAQ

### 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.

## Sources

- U.S. Securities and Exchange Commission, Beginners' Guide to Financial Statements (net revenues = gross revenues − returns and allowances; gross profit = net revenues − cost of sales). https://www.sec.gov/about/reports-publications/beginners-guide-financial-statements (retrieved 2026-10-01)
- IRS Publication 334 (2025), Tax Guide for Small Business, chapter 6, Figuring Gross Profit: Cost of Goods Sold (inventory at beginning of year + purchases less items withdrawn for personal use + labor, materials and other costs − inventory at end of year). https://www.irs.gov/publications/p334 (retrieved 2026-10-01)
