• The formulas
  • What counts as cost of goods sold

Gross profit is what's left from your sales after you subtract the direct cost of the products or services you sold. It comes before rent, office salaries, marketing and other operating expenses, so it shows whether your prices cover the cost of delivering what you sell.

OpenStax's open textbook Principles of Finance 2e says "the cost of goods sold (COGS) is deducted from net sales in order to arrive at gross profit," and that "Gross profit is a reflection of how profitable the firm's performance was in its core business function" (OpenStax, section 5.1, opened October 29, 2026).

The formulas

Gross profit = Net sales − Cost of goods sold

Gross margin = Gross profit ÷ Net sales

Principles of Finance 2e writes the second as "gross margin = gross profit/sales." OpenStax's Principles of Accounting, Volume 1 describes the gross profit margin ratio as "calculated by subtracting cost of goods sold from total net revenue to arrive at gross profit and then taking gross profit divided by total net revenues" (chapter 6 key terms). Multiply by 100 to show it as a percentage.

To work out both from your own numbers, use the profit margin calculator. Enter only your direct costs to get gross margin.

What counts as cost of goods sold

Principles of Finance 2e says cost of goods sold "includes the costs directly involved in making the product that was sold during the period," such as "direct labor, direct materials, and the overhead assigned to the product in production." It adds: "For a service business, this would include its direct labor and any materials used to deliver its services."

OpenStax notes that a law office "would include primarily the cost of labor in their cost of services." For the related term cost of revenue, see what is cost of revenue. Which costs belong in it for your business is a question for your accountant.

Sample gross profit calculation

This is a sample with invented figures for a fictional business, Juniper Print Shop, for one quarter.

  • Net sales: $80,000.00
  • Paper, ink and other materials used in printed jobs: $18,000.00
  • Wages of the staff who run the presses: $22,000.00
  • Cost of goods sold: $18,000.00 + $22,000.00 = $40,000.00
  • Gross profit: $80,000.00 − $40,000.00 = $40,000.00
  • Gross margin: $40,000.00 ÷ $80,000.00 = 0.50, or 50%

The shop's rent and its front-office wages aren't in cost of goods sold. They're operating expenses, which are subtracted after gross profit to reach operating income.

Gross profit and other profit measures

  • Gross profit: sales minus cost of goods sold.
  • Operating income: gross profit minus operating expenses. OpenStax says "While gross profit reflects only how profitable the firm was in making its core product, operating income reflects how profitable the firm's daily operations were as a whole."
  • Net income: what's left after all expenses, including interest and income tax.

Where Billed fits

Billed's expense tracking page says you can give "every expense a category" and that "Billed's expense report can group your expenses by category." Giving direct costs their own categories can make them easier to find when you or your accountant work out cost of goods sold.

Related Articles

Frequently Asked Questions

How do you calculate gross profit?

Take net sales and subtract cost of goods sold. In the sample on this page, $80,000.00 of sales minus $40,000.00 of cost of goods sold gives $40,000.00 of gross profit.

What is the difference between gross profit and gross margin?

Gross profit is a dollar amount: net sales minus cost of goods sold. Gross margin is gross profit divided by net sales, shown as a ratio or percentage. In the sample, $40,000.00 of gross profit on $80,000.00 of sales is a 50% gross margin.

Do service businesses have gross profit?

Yes. OpenStax says of cost of goods sold: "For a service business, this would include its direct labor and any materials used to deliver its services." Subtract those from sales to get gross profit.

What is a good gross profit margin?

The OpenStax sections cited on this page don't give a benchmark. Compare your gross margin with your own past periods, and ask your accountant how businesses like yours measure it.

Share

Was this article helpful?