Blog / Finance

Gross margin calculator

See how much of every sale you keep. Enter your revenue and cost of goods sold, or work back from the margin you want, and the gross profit, gross margin and markup appear as you type.

Gross margin calculator: three modes. Gross margin: enter revenue and the cost of goods sold, for one sale or a whole period, to see the gross profit, the gross margin percentage, the markup and the cost of goods as a share of revenue. Price for a margin: enter the cost of one item and the gross margin you want to see the selling price that reaches it. Most you can pay: enter a selling price and the margin you want to see the most you can pay for the item. Everything is worked out in the browser.

The Coavon team · · 10 min read

Gross margin is the share of your revenue left after paying the direct cost of what you sold. To calculate it, subtract the cost of goods sold from revenue, divide by revenue and multiply by 100. A business with $100,000 of sales and $60,000 of cost of goods sold has a gross profit of $40,000 and a gross margin of ($100,000 − $60,000) ÷ $100,000 × 100 = 40%.

The calculator above does the sum for one sale or a whole year, and works backwards too: from the margin you want to the price you need, or to the most you can pay a supplier. Below: how to use it, the gross margin formula, what counts as cost of goods sold, gross margin compared with net margin and markup, worked examples for products and services, and how to improve your gross margin.

How to use the gross margin calculator

Pick what you want to work out:

Use revenue after discounts and returns, and make sure revenue and costs cover the same items and the same dates, or the margin will be off.

The gross margin formula

Gross margin (%) = (Revenue − Cost of goods sold) ÷ Revenue × 100

To findFormula
Gross profitRevenue − Cost of goods sold
Gross margin %Gross profit ÷ Revenue × 100
Selling price for a target marginCost ÷ (1 − Gross margin %)
Most you can pay for a target marginSelling price × (1 − Gross margin %)
Cost of goods as a share of revenueCost of goods sold ÷ Revenue × 100, which is 100% minus the gross margin

How to calculate gross margin, step by step

  1. Add up your revenue for the period. Use what customers actually paid, after discounts and refunds. Say $100,000.
  2. Add up the cost of goods sold for the same period. Only the direct costs of what you sold (see the next section). Say $60,000.
  3. Subtract the cost of goods sold from revenue. That is your gross profit: $100,000 − $60,000 = $40,000.
  4. Divide the gross profit by revenue. $40,000 ÷ $100,000 = 0.4.
  5. Multiply by 100. 0.4 × 100 = 40% gross margin.

A 40% gross margin means that for every dollar of sales, 40 cents is left to pay for everything else the business spends money on, and to keep as profit.

What counts as cost of goods sold

Cost of goods sold (COGS, or cost of sales) is what it directly cost to provide the things you sold. A simple test: would the cost go away if you made one fewer sale? If yes, it usually belongs in cost of goods sold.

Usually in cost of goods soldUsually not (operating expenses)
Selling productsWhat you paid for the stock or materials, shipping it to you, packaging, the cost of shipping orders out, payment fees on each saleRent for an office, marketing, admin staff, software the whole business uses
Making productsRaw materials, the wages of the people making them, factory power and equipment wearSales and marketing, head office, management
Selling servicesThe pay of the people doing the client work, freelancers and contractors on the job, tools bought for one clientSales, marketing, leadership, the hours staff spend on internal work

Businesses draw the line in slightly different places, especially for services. What matters most is drawing it the same way every month, so your margins can be compared over time.

Gross margin vs net margin

Gross margin only takes away the direct cost of what you sold. Net margin takes away everything: operating expenses, interest and tax. A business can have a healthy gross margin and still lose money if its other costs are too high, so the two answer different questions.

AmountMargin
Revenue$100,000
− Cost of goods sold$60,000
= Gross profit$40,000Gross margin 40%
− Operating expenses (rent, marketing, admin)$25,000
= Operating profit$15,000Operating margin 15%
− Interest and tax$4,000
= Net profit$11,000Net margin 11%

Gross margin tells you whether each sale is priced well and produced efficiently. Net margin tells you whether the business as a whole makes money. Watch both.

Gross margin vs markup

Markup and gross margin describe the same profit measured against different things. Markup compares the profit with the cost; gross margin compares it with the selling price. An item that costs $30 and sells for $50 has a $20 gross profit: a 66.67% markup but a 40% gross margin. To convert: markup = margin ÷ (1 − margin), using decimals. Our markup calculator works in the other direction.

Gross marginMarkup needed
20%25%
25%33.33%
30%42.86%
40%66.67%
50%100%
60%150%
70%233.33%
75%300%

Gross margin examples

A product for resale

A shop buys mugs for $6 each, delivered, and sells them for $15. Gross profit is $9 a mug, so the gross margin is $9 ÷ $15 = 60% (a 150% markup).

An online store, with every cost counted

An online store sells a $40 product. The product costs $14, shipping it to the customer $6, packaging $0.80 and the card payment fee 3%, or $1.20. Cost of goods sold is $22, gross profit $18 and the gross margin 45%. Counting only the $14 product cost would have shown 65%, which is why shipping and fees belong in the sum.

A service business over a month

An agency bills $50,000 in a month. The people who did the client work cost $22,000 for their share of the month, freelancers $6,000 and software bought for one client $500. Cost of goods sold is $28,500, gross profit $21,500 and the gross margin 43%. Hours staff spend on sales or internal work are left out: they are operating expenses.

Pricing to a target margin

You want a 40% gross margin on an item that costs $30. The price is $30 ÷ (1 − 0.40) = $50. Working the other way, if customers will only pay $50 and you still need 40%, the most you can pay for the item is $50 × 0.60 = $30. The calculator’s second and third modes do these sums.

What is a good gross margin?

There is no single good number, because gross margin depends so much on what you sell. Businesses that sell expertise or software tend to have high gross margins, because one more sale costs them little. Businesses that resell physical goods, or make food, tend to have lower ones, because every sale carries a real cost. Two useful comparisons:

Comparing with businesses like yours helps too, as long as they count cost of goods sold the same way you do.

How to improve your gross margin

How to calculate gross margin in Excel or Google Sheets

With revenue in cell A2 and cost of goods sold in B2:

Know what your work really costs

For a service business, the biggest cost of goods sold is the time spent on client work, and it is also the easiest to guess wrong. Coavon includes time tracking on every plan, so the hours each job really took are logged against its tasks in Flow and the cost of delivering it is something you can look up. Use it with this calculator to see the true gross margin of each client, then set prices with our markup calculator.

How do you calculate gross margin?

Subtract the cost of goods sold from revenue, divide by revenue and multiply by 100. With $100,000 of revenue and $60,000 of cost of goods sold, the gross margin is ($100,000 − $60,000) ÷ $100,000 × 100 = 40%.

What is the gross margin formula?

Gross margin = (Revenue − Cost of goods sold) ÷ Revenue × 100. The top part, revenue minus cost of goods sold, is the gross profit.

What is the difference between gross profit and gross margin?

Gross profit is an amount of money: revenue minus cost of goods sold. Gross margin is that gross profit as a percentage of revenue. $40,000 of gross profit on $100,000 of revenue is a 40% gross margin.

What is the difference between gross margin and net margin?

Gross margin only takes away the direct cost of what you sold. Net margin takes away every cost, including rent, marketing, salaries, interest and tax, so it is always lower.

Is gross margin the same as markup?

No. Gross margin is profit as a share of the selling price; markup is profit as a share of the cost. A $30 item sold for $50 has a 40% gross margin and a 66.67% markup.

How do I price a product for a 40% gross margin?

Divide the cost by 1 minus the margin as a decimal. An item costing $30 needs a price of $30 ÷ 0.6 = $50. The calculator’s Price for a margin mode does this for you.

Can gross margin be negative?

Yes. If the cost of goods sold is more than revenue, you lose money on each sale before paying any other costs, and the gross margin is below zero.

Does the calculator save my numbers?

No. Everything is worked out in your browser. Nothing you enter is saved or sent anywhere.

Coavon · Blog · Templates · Features · Pricing