Profit margin is profit divided by revenue, times 100, with revenue taken without VAT. An online store has three: gross margin after the cost of the goods, contribution margin after shipping, payment fees and ads, and net margin after fixed costs too. On a €59,90 order they are 63,2%, 29,8% and 9,9%.
To calculate profit margin, subtract the costs from the revenue and divide what is left by the revenue: profit margin = (revenue − costs) ÷ revenue × 100. For an online store, revenue means the price without VAT, and the answer depends on which costs you subtract. The goods alone give the gross margin; shipping, payment fees and ads on top give the contribution margin; fixed costs on top of those give the net margin. This post works out all three on one €59,90 order, step by step, and ends with what each one is for.
In short
- The formula never changes: profit divided by revenue. What changes is which costs the profit has paid, so a margin always needs its name.
- On a €59,90 order: 63,2% gross margin, 29,8% contribution margin after shipping, fees and ads, 9,9% net margin after its share of fixed costs.
- Revenue is the price without VAT. The tax was collected for the tax office, and leaving it in makes every margin look better than it is.
- Divide by the price, never by the cost. Profit over cost is markup, a different and always larger number.
The profit margin formula
Profit margin = profit ÷ revenue × 100. Two choices decide whether the result means anything. The first is the revenue: for a store in Europe the price a customer pays contains VAT, which belongs to the tax office, so the revenue in the formula is the price divided by one plus the VAT rate. The second is the profit: it is the revenue minus a set of costs, and a margin is only comparable with another margin that subtracted the same set.
The formula is easy to confuse with markup, which divides the same profit by the cost instead of the price. On the order below the goods leave €31,84 of profit on €18,50 of cost: a 63,2% margin and a 172,1% markup. Both are correct; they answer different questions, and a markup calculator shows the two side by side so a price set for one is never read as the other.
One order, three margins
The order: a customer pays €59,90 at 19% VAT. The goods in it cost €18,50, the parcel €6,40 with picking and packing, the payment goes through Shopify Payments on Basic at 2% + €0,25, Shopify's published rate checked 15 Nov 2026, and the store spends €9,00 of advertising per order. Its fixed costs are €7.000 a month over 700 orders. Here is the order, line by line:
| Step | Amount | Share of net revenue |
|---|---|---|
| Price paid, VAT in | €59,90 | – |
| VAT at 19% | −€9,56 | – |
| Net revenue | €50,34 | 100,0% |
| Goods | −€18,50 | 36,8% |
| Gross profit (gross margin) | €31,84 | 63,2% |
| Parcel, picking and packing | −€6,40 | 12,7% |
| Payment fee, 2% + €0,25 | −€1,45 | 2,9% |
| After shipping and fees | €23,99 | 47,7% |
| Advertising | −€9,00 | 17,9% |
| Contribution (contribution margin) | €14,99 | 29,8% |
| Share of fixed costs | −€10,00 | 19,9% |
| Net profit (net margin) | €4,99 | 9,9% |
Step 1: take the VAT out
Divide the price by one plus the VAT rate: €59,90 ÷ 1,19 is €50,34, and the €9,56 difference is VAT the store passes on. Every margin from here is a share of €50,34. A calculator built for prices without tax skips this step, and on this order it would report a margin after the goods of 69,1% instead of 63,2%, counting the tax office's money as profit.
Step 2: gross margin, after the goods
Subtract what the goods cost you: €50,34 − €18,50 leaves €31,84 of gross profit, and €31,84 ÷ €50,34 is a gross margin of 63,2%. It is the margin most merchants quote and the one Shopify's product page shows beside Cost per item, which hides it for a taxed product on a store whose prices include tax. It is also the least complete, because it stops before anything about the order itself, which is what gross margin leaves out: the parcel, the fee and the customer's acquisition. The Shopify margin calculator takes the VAT out and carries on through those costs for a whole order.
Step 3: contribution margin, after every cost of the order
Now subtract what the order itself cost to fulfil and to win. The parcel takes €6,40 and the payment fee €1,45, charged on the €59,90 the customer paid rather than on the net price, which leaves €23,99, 47,7% of net revenue. The €9,00 of advertising leaves €14,99: a contribution margin of 29,8%. That is what the order contributes towards rent, salaries and profit, and it is the margin to judge an ad budget or a shipping price against. The three rungs have names on a P&L, set out in CM1, CM2 and CM3 explained, and the contribution margin calculator runs them for your own order. What Shopify Payments, PayPal, Stripe or Klarna would take from it, the payment fee calculator prices provider by provider.
Step 4: net margin, after the fixed costs
Fixed costs do not belong to any one order, so spread them: €7.000 a month over 700 orders is €10,00 per order. The €14,99 of contribution minus €10,00 leaves €4,99 of net profit, a net margin of 9,9%. Of the 63,2% the goods left, 53,3 points went to costs that a gross margin never sees. An accountant's net profit margin goes one step further and takes depreciation, interest and tax on profit too; one store's month with every line from gross margin vs gross profit vs net margin shows that last step.
Which margin answers which question
- Gross margin answers whether a product is priced well against what it costs to buy. Use it with suppliers and when setting prices; the profit margin calculator does it for one product, VAT out.
- Contribution margin answers whether an order makes money once it is shipped, paid for and won. Use it for ad budgets, free-shipping thresholds and discounts.
- Net margin answers whether the store makes money at all. Use it for the month, for hiring, for rent, and for whether growth is paying.
- All three, product by product, show where a catalogue earns and where it only sells; the SKU margin sheet has a column for each, and the profit margin formula in Excel sets the same steps up per order.
Four mistakes that inflate a margin
- Leaving VAT in the revenue: the margin is measured on money that was never yours, and it overstates itself more the thinner it really is.
- Dividing by the cost: that is markup, always the bigger number, and a price set for a markup target lands far below the margin it was meant to hit.
- Missing product costs: a product without a recorded cost subtracts nothing, so the products with the worst data look like the best ones.
- Ignoring refunds: a returned order gives back its revenue and its VAT, but the parcel and the payment fee stay spent, so a margin without returns is always the higher one.
From one order to every order
Worked once by hand, the four steps teach more about a store than any dashboard. Worked every day, they become a statement: every order's goods at the cost in force on its day, its parcel and its fee, the ad spend of the day and the fixed costs spread across their days. That is what a Shopify profit tracker keeps, and it is the same arithmetic as this post, done for each order instead of an average one.
On the question everyone asks next, what a good margin is, there is no honest single number for online stores. The nearest public reference is NYU Stern's margins by sector, which covers US listed companies: as of January 2026, read 15 Nov 2026, general retailers show a 33,18% gross margin and a 5,61% net margin. A store that makes its own products, sells only online or spends heavily on ads can sit far from that in either direction, which is why the comparison worth making is with your own last month.