discount sale
  • Days
  • Hrs
  • Mins
  • Secs
20% Off

Use coupon code 'SDS20' Limited Offer!!

Profit Margin Formula

Profit Margin Formula: How to Calculate It

AI Summary

Profit margin measures the percentage of revenue a business keeps as profit after costs. Most store owners can tell you last month’s revenue and order count, but far fewer know their margin or how the profit margin formula works. That gap matters, because revenue shows what came in, not what you kept.

The formula itself is simple. What makes it accurate is the costs you include: leave out payment fees, shipping, or discounts, and your margin will look higher than it really is.

This guide explains the profit margin formula, the three main types of profit margin, and how to calculate margin per order.

How to Calculate Profit Margin for eCommerce

Every type of profit margin uses the same basic formula:

Profit margin = (Revenue − Costs) ÷ Revenue × 100

Calculating profit margin takes four steps, whichever type of margin you’re measuring:

  1. Choose a time period: Use a month, quarter, or year, and keep every figure within that same period.
  2. Find your total revenue: This is your sales income for the period, after discounts and refunds.
  3. Subtract the costs for your margin type: Gross margin subtracts only the cost of goods sold (COGS). Operating and net margin subtract more, as covered in the next section.
  4. Divide by revenue and multiply by 100: The result is your profit margin as a percentage.

Example

Take an online store with these monthly numbers:

ItemAmount
Revenue$50,000
Cost of goods sold (COGS)$30,000
Operating costs (ads, apps, staff, hosting)$12,000
Interest and taxes$3,000

To find the gross profit margin, plug revenue and COGS into the formula:

($50,000 − $30,000) ÷ $50,000 × 100 = 40%

A 40% margin means the store keeps 40 cents from every dollar of sales after paying for the products it sold. That 40 cents still has to cover ads, apps, staff, and taxes, which is where operating and net margin come in.

Gross, Operating, and Net Profit Margin: Which Formula to Use and When

There are three main types of profit margin: gross, operating, and net. Each uses the same basic formula, but each subtracts a different set of costs, so each answers a different question about the business.

The examples below use the same store from the previous section, with $50,000 in revenue, $30,000 in COGS, $12,000 in operating costs, and $3,000 in interest and taxes.

Gross Profit Margin

Gross profit margin shows how much revenue is left after paying for the products you sold. It only subtracts the cost of goods sold (COGS), which includes the product’s purchase or production cost and costs directly tied to it, such as inbound freight. Operating costs, interest, and taxes are left out.

The formula is: Gross profit margin = (Revenue − COGS) ÷ Revenue × 100.

For the example store, that’s ($50,000 − $30,000) ÷ $50,000 × 100, which gives a gross margin of 40%.

Use gross margin for pricing decisions, comparing products or categories, and spotting when supplier costs rise faster than your prices.

Operating Profit Margin

Operating profit margin subtracts the cost of running the store along with COGS. For an online store, operating costs usually include ad spend, apps and plugins, hosting, staff, and fulfillment. Interest and taxes are still excluded.

The formula is: Operating profit margin = (Revenue − COGS − Operating costs) ÷ Revenue × 100.

For the example store, that’s ($50,000 − $30,000 − $12,000) ÷ $50,000 × 100, which gives an operating margin of 16%.

Use operating margin to judge whether the store runs efficiently day to day and to track whether marketing and tool costs are growing faster than sales.

Net Profit Margin

Net profit margin subtracts every cost, including interest and taxes. It’s the clearest measure of what the business actually earns from its sales.

The formula is: Net profit margin = (Revenue − All costs) ÷ Revenue × 100.

For the example store, that’s ($50,000 − $30,000 − $12,000 − $3,000) ÷ $50,000 × 100, which gives a net margin of 10%.

Use net margin to understand your true bottom line, plan how much to reinvest, and compare performance across months or years.

The same store has a 40% gross margin but only a 10% net margin. That gap is why it matters which margin you’re quoting, especially when you compare your numbers against benchmarks or another store’s results.

Margin Per Order: The Number Online Stores Actually Feel

Every online order carries its own costs: shipping, packaging, payment fees, and discounts. So two orders for the same product can earn very different profits. Measuring margin one order at a time, often called contribution margin, shows where the money goes.

Take a WooCommerce order for an $80 product. The product costs $40, free shipping costs the store $8, packaging adds $1.50, and the payment gateway charges 2.9% plus $0.30. Total costs come to $52.12, leaving $27.88 in profit, a 34.9% margin.

Now add a 10% coupon. The customer pays $72. Product, shipping, and packaging costs stay the same, and the payment fee drops slightly to $2.39. Profit falls to $20.11, and the margin drops to 27.9%.

The coupon cut revenue by 10% but cut profit by 28%. None of the other costs shrink when the price does, so nearly every dollar of discount comes straight out of profit. The higher your per-order costs, the harder a discount hits your margin.

Profit Margin vs Markup: What’s the Difference?

Profit margin and markup both measure profit as a percentage, but they divide by different numbers. Margin divides profit by the selling price. Markup divides profit by the cost. Because cost is always lower than price, markup is always the larger of the two, and mixing them up is one of the most common pricing mistakes.

Take the $80 product from the previous example, which costs the store $40. The profit is $40. As a margin, that’s $40 ÷ $80, or 50%. As a markup, it’s $40 ÷ $40, or 100%. Same product, same profit, two very different percentages.

To convert margin to markup, use this formula: Markup = Margin ÷ (1 − Margin). A 20% margin equals a 25% markup, a 25% margin equals a 33.3% markup, a 30% margin equals a 42.9% markup, and a 40% margin equals a 66.7% markup. To go the other way, use Margin = Markup ÷ (1 + Markup).

The mix-up matters most when setting prices. A store that wants a 40% margin but adds 40% to its cost will only earn about a 28.6% margin, which is the exact problem the next section solves.

How to Set a Price From Your Target Margin

If you know your product cost and the margin you want, you can work backward to the right selling price. The formula is: Price = Cost ÷ (1 − Target margin), with the margin written as a decimal.

Say a product costs $24 and you want a 40% margin. Divide $24 by 0.60 (1 − 0.40), and the selling price is $40. To check it, subtract the cost from the price to get $16 in profit, then divide by $40. The margin is exactly 40%.

Compare that with the common shortcut of adding 40% to the cost. That gives a price of $33.60 and a profit of $9.60, which is a margin of only 28.6%. On a single product, the difference looks small. Across a full catalog, it can quietly wipe out a large share of the profit you planned for.

To apply this across many products in a spreadsheet, put the cost in column C and the target margin in column D, then use this formula in the price column: =C2/(1-D2)

Enter the margin as a percentage (40%) or a decimal (0.4), and the formula returns the selling price for each row. Remember that this price only covers product cost. Shipping, fees, and discounts still need to fit inside the margin you choose.

Five Ways to Raise Your Margin Without a Price Increase

1. Increase Average Order Value

Shipping, packaging, and part of the payment fee cost roughly the same whether an order is $80 or $120. In the earlier example, $9.50 in shipping and packaging is about 12% of an $80 order but under 8% of a $120 order. Product recommendations, upsells, and bundles raise order value, so those fixed costs take a smaller share of each sale.

2. Recover Abandoned Carts

Shoppers who abandon a cart have already been paid for through ads, SEO, or social. Automated reminder emails bring some of them back without new acquisition spend, so recovered orders typically carry a higher margin than orders from new traffic.

3. Set Free Shipping Thresholds Above Your Average Order Value

If your average order is $80, offering free shipping on every order absorbs the full shipping cost each time. Setting the threshold slightly above that, such as $100, encourages customers to add items and spreads the shipping cost over a larger basket.

4. Focus Promotions On High-Margin Products

A 15% discount hurts far less on a product with a 60% margin than on one with 25%. Review margins by product and point your promotions, ads, and featured placements toward the items that can absorb them.

5. Offer Store Credit On Returns

A cash refund removes the revenue entirely. Store credit keeps it in the business and brings the customer back for another purchase, often one that costs more than the credit.

Frequently Asked Questions

What does a 20% profit margin mean?

A 20% profit margin means the business keeps $20 in profit for every $100 in revenue. Which costs have been subtracted depends on the margin type: a 20% gross margin only covers product costs, while a 20% net margin is what’s left after every expense.

What is a good profit margin for an online store?

There’s no single number that works for every store. A good margin depends on your product category, sales channels, and which margin you’re measuring, since gross margins are always much higher than net margins. The most useful comparison is your own margin over time, measured the same way each month.

Is profit margin the same as gross profit?

No. Gross profit is a dollar amount: revenue minus the cost of goods sold. Profit margin is a percentage that shows profit relative to revenue. A store with $20,000 in gross profit on $50,000 in revenue has a 40% gross profit margin.

Should revenue be calculated before or after discounts?

After. Use the amount customers actually paid, which means subtracting discounts, coupons, and refunds. Using the full list price makes your margin look higher than it really is.

Can profit margin be negative?

Yes. If costs are higher than revenue, profit is negative, and so is the margin. A negative gross margin means you’re selling products for less than they cost, while a negative net margin can happen even with healthy product pricing if operating costs are too high.

Conclusion

Understanding your profit margin gives you a much clearer picture of your store’s financial health than revenue alone. Whether you’re looking at gross, operating, net, or per-order margins, the key is to account for the right costs and calculate them consistently.

Once you know your margins, you can make better decisions about pricing, discounts, shipping, promotions, and operating expenses. Even small improvements, such as increasing average order value, setting smarter free shipping thresholds, or focusing promotions on higher-margin products, can make a meaningful difference to your bottom line.

Most importantly, don’t treat profit margin as a one-time calculation. Track it regularly and use it alongside your sales data to understand not just how much your store is selling, but how much profit those sales are actually generating.

Article by

Associate Product Marketer @ WebToffee. I work on WooCommerce plugins and write about eCommerce growth, automation, coupons, subscriptions, and data privacy. Interested in practical marketing strategies that actually move metrics.

Got any query? Please leave a comment or reach out to our support

Your email address will not be published. Required fields are marked *

Google Preferred Source