Calculate Gross Profit and Gross Margin
You have what each product cost to make or buy, and what it sold for. You need the profit in dollars per line — and the margin percentage next to it so lines are comparable.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
With cost of goods in column A and revenue in column B, revenue minus cost is the gross profit — the dollars left after paying for the product itself, before rent, salaries, and marketing. Selling $10,000 of goods that cost $6,000 leaves $4,000. Dollars answer "how much did we make?", but they can't compare a $10,000 line against a $2,500 one — for that, add gross margin in the next column: =(B2-A2)/B2 divides the profit by revenue, giving 0.4 (40%) here. Together the pair shows which products earn the money and which earn it efficiently.
When to use it
Use it on any product, SKU, or service-line table to spot loss-makers, rank products by profitability, or feed a pricing review with real per-line numbers.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveDownload the proof sheet (.xlsx)Last reviewed 2026-07-09