# Gross margin

> Revenue minus cost of goods sold as a share of revenue, and the two things that inflate it without you noticing.

## Gross margin

Gross margin is revenue minus the cost of goods sold, expressed as a share of
revenue: (price minus cost) divided by price. A product costing 60 and selling
for 100 carries a 40% gross margin.

### Measure it on the right revenue

Two things routinely inflate the number.

**Tax.** Where prices display tax inclusive, part of the price on your website
is not your money. Calculating margin against a tax-inclusive price flatters you
by the tax rate. Strip the contained tax out first, line by line, at each line's
own rate.

**Delivery.** A delivery fee is a reimbursement for a drive, not revenue from a
cake. Leave it out of the calculation entirely, and a fee that fails to cover
the trip shows up as a loss on the trip instead of a better-looking margin on
the product.

### What a discount actually costs

The share of your profit a discount consumes is the discount percentage divided
by the margin percentage. At a 40% margin, a 10% discount gives away a quarter
of the profit on that sale. At a 20% margin, the same 10% gives away half.

Gross margin is not net. It carries no rent, no insurance and no unbilled hours,
so a healthy gross margin and an unprofitable year are entirely compatible.

The related trap is calling a multiple of cost a margin. See
[markup vs margin](/glossary/markup-vs-margin).

### How ibakepro calculates it

ibakepro works out the margin on every order and product before tax and
delivery, from what you actually paid for the ingredients, and keeps each
confirmed order's costs as they were on the day. See
[Financials](/features/analytics-and-reporting).

[The cake pricing calculator](/blog/cake-pricing-calculator) works gross margin through on a real cake.
