What Is Profit Margin? Formula, Examples and How Discounts Change It

What is profit margin?

Profit margin is the share of each sale you keep as profit, written as a percentage. The formula is profit margin = (revenue - costs) / revenue x 100. If you sell a product for $50 and it costs you $30, your profit is $20 and your margin is 40 percent. Which costs you subtract decides which margin you are looking at: gross, operating or net.

Margin is the number that tells you whether a sale was worth making. Revenue can grow while profit shrinks, and a promotion can fill the order book while losing money on every order. For a store owner, knowing your margin per product is what makes it safe to run discounts, free shipping and buy one get one deals.

The three kinds of profit margin

MarginFormulaWhat it tells you
Gross margin(Revenue - cost of goods sold) / revenueHow much each sale earns after the product itself
Operating margin(Revenue - cost of goods - operating costs) / revenueHow much is left after running the business: staff, software, rent, ads
Net marginNet profit / revenueWhat you keep after everything, including tax and interest

For pricing and promotions, gross margin is the one to watch day to day, because it is the money each order brings in to pay for everything else. Our guide to gross margin goes deeper into that one.

How to calculate profit margin: worked examples

Example 1: one product. A T-shirt sells for $30. Making and printing it costs $12, and packaging costs $1. Gross profit is $30 - $13 = $17, so the gross margin is $17 / $30 = 56.7 percent.

Example 2: a month of sales. Your store had $20,000 in revenue. The products cost $9,000, so gross profit is $11,000 and gross margin is 55 percent. Software, ads, payment fees and shipping you paid for came to $6,000, leaving $5,000. That is an operating margin of 25 percent.

Example 3: margin is not markup. If a product costs $40 and you sell it for $60, the markup is 50 percent (the $20 profit divided by the $40 cost), but the margin is 33.3 percent (the $20 divided by the $60 price). Mixing the two up is one of the most common pricing mistakes, because it makes margins look higher than they are.

What is a good profit margin for an online store?

There is no single good number, because it depends on what you sell. Products you make yourself, digital products and private-label goods often carry gross margins well above 50 percent. Resold branded goods and electronics often run much thinner. Instead of comparing yourself with an average, compare each product with what it has to pay for: shipping, payment fees, advertising and returns. A product whose margin cannot cover those is losing money even when it sells.

How discounts change your profit margin

Discounts come straight out of profit, not out of revenue in general. That is why a small discount can take a large share of your margin.

PriceCostDiscountProfit per saleMargin
$50$30None$2040%
$50$3010% off$1533.3%
$50$3020% off$1025%
$50$3030% off$514.3%
$50$3040% off$00%

On a product with a 40 percent margin, a 20 percent discount halves the profit on each sale. You would need to sell twice as many units just to earn the same profit as before. Before any promotion, work out how many extra sales it needs to break even, and ask whether that is realistic.

Buy one get one and margin

Buy one get one deals behave differently from a flat discount, because the customer buys two units. With a $50 product that costs $30, a buy one get one at 50 percent off brings in $75 for two units that cost $60, so the order makes $15 profit, a 20 percent margin. A buy one get one free brings in $50 for $60 of product, so it loses $10 unless the order includes other items. That is why many stores prefer the 50 percent version, or a buy 2 get 1 free, which keeps more of the margin. Our article What does BOGO mean shows the effective discount of each version.

Free shipping and margin

Free shipping is a discount too: the shipping you pay comes out of the same profit. On a low-price item, free shipping can take the whole margin. A free shipping threshold, where the order has to reach an amount first, protects margin by making sure the order is big enough to pay for it. See our guide to free shipping thresholds.

How to protect your margin when you run promotions

GT BOGO Engine, which we make, is a WooCommerce promotions plugin with a margin floor built in: you enter product costs, and a deal that would take an order below the margin you set is held back automatically. It runs buy one get one, quantity, bundle and spend threshold deals without coupon codes.

Frequently asked questions

How do you calculate profit margin?

Subtract your costs from your revenue, divide the result by the revenue and multiply by 100. A $50 sale with $30 of costs has a profit of $20 and a margin of 40 percent.

What is the difference between margin and markup?

Margin divides profit by the selling price; markup divides profit by the cost. A product that costs $40 and sells for $60 has a 50 percent markup but a 33.3 percent margin.

What is the difference between gross and net profit margin?

Gross margin only subtracts the cost of the products sold. Net margin subtracts every cost of the business, including staff, software, advertising, interest and tax.

How much does a 20 percent discount reduce profit?

It depends on your margin. On a product with a 40 percent margin, a 20 percent discount halves the profit per sale, so you need twice as many sales to earn the same profit.

Is buy one get one free profitable?

Only when the margin is high enough or the order includes other items. With a product that costs 60 percent of its price, buy one get one free loses money on the pair, while buy one get one at 50 percent off still makes a profit.