Skip to content

Margin and pricing

Gross profit margin calculator

Gross profit margin is the share of revenue left after the direct cost of producing and delivering what you sold. Subtract cost of goods from revenue, divide by revenue, and multiply by 100.

Calculate your gross margin

$

Net sales, after discounts and refunds

$

Everything to make and deliver, not just the invoice

The formula

RevenueCOGSRevenue× 100
Revenue
Net sales for the period, after discounts and after refunds have been credited back. Gross sales before those deductions will overstate the margin, and on a business with meaningful promotional activity the gap between the two figures is not small.
Cost of goods
Everything it took to produce and deliver what you sold. For a product business that means the supplier invoice plus inbound freight and duty, payment processing, pick and pack, outbound shipping, and the cost of goods that came back damaged or unsellable. For a service business it is the delivery team salaries and any subcontractors. It excludes rent, sales, marketing, and admin, which belong below this line. One caution on returns: if revenue is already net of refunds, count only the physical cost of the return here, not the refunded amount, or the same money gets subtracted twice.

A worked example

The outdoor gear brand books 400,000 in net revenue for the quarter. The supplier invoices for the goods total 240,000, so the margin gets reported as 40 percent and the brand plans against 160,000 of gross profit.

The invoices are not the cost of goods. Inbound freight and duty added 9,000. Payment processing took 11,600. Pick, pack and outbound shipping cost 12,000. Returns that came back unsellable, plus the freight to get them back, cost 7,400. Real cost of goods is 300,000 against 400,000 of revenue, so gross profit is 100,000 and the margin is 25 percent, not 40.

A fifteen point error at this line is not contained to this line. The break-even ROAS is 1 divided by gross margin, so at the believed 40 percent it looks like 2.5:1 and the quarter 4:1 campaign appears strongly profitable. At the real 25 percent it is 4:1 exactly, and that campaign made nothing. The same wrong margin then flows into every pricing rule, every discount approval, and every forecast built on the quarter. Cost of goods is the input worth being pedantic about, because almost everything downstream inherits it.

When to use it

Gross margin is the cleanest read on whether the core transaction works. Before overhead, before advertising, before anything else, it answers whether selling the thing makes money. A business can survive weak overhead discipline for a while. It cannot survive a broken gross margin for any length of time, because every additional sale makes the position worse rather than better.

It is most valuable as a trend. Levels vary enormously by model, so a single figure means little in isolation, but a margin sliding while revenue climbs is one of the most reliable early warnings available. It usually means discounting has crept in, delivery costs have risen without a price change, or the sales mix has shifted toward lower-margin products, and all three are easier to fix early.

It is also the number several other decisions are derived from rather than merely compared against. Your break-even ratio on advertising comes from it. Your pricing floor comes from it, by way of markup and margin. How much discount you can approve without giving away the sale comes from it. Getting it right pays out in several places at once.

Where it misleads

What belongs in cost of goods is more elastic than it looks, and there is no authority that will settle it for you. Payment processing, fulfilment labour, and inbound freight sit differently in different companies, all defensibly. The figure only becomes comparable, either to your own history or to anyone else, once the definition is written down and held steady.

Gross margin says nothing about whether the business is profitable. It sits above rent, salaries, software, and advertising. A strong gross margin and a loss at the bottom of the page is an entirely ordinary situation, and only net profit margin will show it.

A single blended figure conceals the products losing money. A 25 percent overall margin can be one line at 45 and another at 5, and the blend keeps the second one on the shelf. It also means the number moves when nothing about your costs or prices changed at all, purely because the mix of what sold shifted. Break it out by product or category before drawing any conclusion about a trend.

Discounting hits margin harder than it hits price, because the reduction comes entirely out of profit while cost of goods stays exactly where it was. On a 25 percent margin a ten percent discount removes roughly 40 percent of the gross profit on that sale. Check the arithmetic with the discount calculator before approving a promotional price.

Frequently asked

What is a good gross profit margin?

It depends almost entirely on the business model. Software often clears 70 to 80 percent, agencies and professional services land near 50, and retail or ecommerce frequently runs 20 to 40. Comparing against a business with a different cost structure produces no useful information. Compare against your own trend and your direct competitors.

What is included in cost of goods sold?

The direct costs of producing and delivering what was sold: materials or supplier invoices, inbound freight and duty, payment processing, fulfilment and outbound shipping, and delivery labour for a service business. Rent, sales, marketing, and administrative salaries are excluded, because they are not consumed by any particular sale.

What is the difference between gross margin and net margin?

Gross margin subtracts only the direct cost of what was sold and shows whether the transaction itself works. Net margin subtracts every cost including overhead, tax, and interest, and shows whether the business works. Gross is always the higher of the two and often by a wide distance.

Is gross margin the same as markup?

No. Margin is profit as a share of the selling price, markup is profit as a share of cost. The same sale produces two different percentages and margin is always the lower one. A 50 percent markup is a 33 percent margin.

Why is gross margin falling while revenue grows?

Usually one of three things: discounting has increased to drive the growth, the cost of delivering has risen without a matching price change, or the sales mix has moved toward lower-margin products. Splitting the figure by product or channel will normally identify which within a few minutes.

Numbers are the easy part

Getting the calculation right takes two inputs. Getting an organization to agree on what counts as gain, what counts as cost, and what the number should change takes considerably longer.

That translation work is most of what I do. Westphal Solutions builds websites, tools, and reporting for nonprofits and growing teams, including the kind of measurement setup that makes a number like this one worth trusting in the first place.

Start a conversation