Money and Legal Basics

Understanding Margins and Costs

How gross and net profit margin differ, how to calculate them, and which costs quietly erode profit in an online store, with hypothetical figures.

On this page
  1. Margin in one sentence
  2. Gross margin
  3. Net margin
  4. Margin versus markup
  5. Costs that quietly erode profit
  6. Using margins well
  7. What counts as a good margin

Margin in one sentence

A profit margin is profit expressed as a percentage of sales. It lets you compare products, months and stores of different sizes, because a $10 profit means something quite different on a $20 sale than on a $200 one. The tricky part is that “profit” can mean different things depending on which costs you subtract, which is why margins come in more than one kind.

All figures below are hypothetical, chosen to keep the arithmetic easy to check. They are not benchmarks for any real product or industry.

Gross margin

Gross profit is revenue minus the direct cost of the goods sold: the purchase price of the item, or the materials and direct production cost if you make it, and often inbound freight.

Gross margin is gross profit divided by revenue.

Example: an item sells for $50 and costs $20 to buy.

  • Gross profit: $50 - $20 = $30
  • Gross margin: $30 / $50 = 0.60, or 60 percent

This figure answers a narrow question: how much is left from each sale to pay for everything else?

Net margin

Net profit is what remains after all costs, not only the product. Net margin is net profit divided by revenue.

Continue the example, for one order, with these further hypothetical costs:

Cost per order Amount
Payment processing fee $2.00
Shipping paid by the store beyond what the customer paid $4.00
Packaging $1.50
Allowance for returns and refunds $1.50
Advertising cost to win the order $8.00
Total $17.00

The costs add as 2.00 + 4.00 + 1.50 + 1.50 + 8.00 = 17.00.

  • Net profit per order: $30 - $17 = $13
  • Net margin: $13 / $50 = 0.26, or 26 percent

The same sale looks like a 60 percent margin or a 26 percent margin depending on which costs are counted. Neither is wrong, but only the second tells you what you keep. Fixed costs such as software and subscriptions would reduce it further once spread across all orders.

Margin versus markup

These are easily confused. Markup is profit as a percentage of cost; margin is profit as a percentage of price.

In the example, gross profit of $30 on a cost of $20 is a 150 percent markup (30 / 20 = 1.5), while the margin on the $50 price is 60 percent. If you wanted a 60 percent margin and applied a 60 percent markup to a $20 cost, you would price at $32, and the margin would only be 12 / 32 = 37.5 percent. Mixing the two is a common reason for underpricing. Decide which measure you are using and stay consistent.

Working backward from a target margin: price = cost / (1 - target margin). For a $20 cost and a 60 percent target, price = 20 / 0.4 = $50, which matches the example.

Costs that quietly erode profit

Many owners calculate margin using only the product cost. The following often get missed:

  • Payment fees. Usually a percentage plus a fixed amount per transaction, and they apply to the whole order amount including shipping in many cases. Check your provider’s current terms and compare payment gateways if volume grows.
  • Shipping subsidies. Offering free shipping or flat rates means absorbing the difference when parcels cost more than expected. Weigh these offers carefully, and read free shipping in terms of your actual cost.
  • Packaging. Boxes, padding, tape, labels and inserts. Choices here can protect orders and budgets, but small amounts add up.
  • Returns and refunds. A refund loses the sale, and the product may come back unsellable or cost money to inspect and restock. Some payment fees are not returned when you refund.
  • Damaged or lost parcels. If claims are not paid or are only partial, the loss is yours.
  • Discounts and coupons. A percentage off a price reduces margin by more than that percentage in relative terms. Using the example above, a 20 percent discount lowers the price to $40, so gross profit falls from $30 to $20, a one-third cut in gross profit, and the gross margin drops from 60 to 50 percent. Discount codes deserve a check against your real costs.
  • Advertising and marketing. Often the largest variable cost after the product itself, and it can be recorded per order, as in the example.
  • Software and subscriptions. Per-month fees apply whether or not you make a sale.
  • Chargebacks. The disputed amount may be taken back and a fee applied, even if you ship correctly.
  • Currency and international costs. Conversion margins, customs duties and import taxes when you sell abroad.
  • Inventory losses. Shrinkage, expiry, and dead stock tied up in unsold products.
  • Your time. If you pay yourself nothing, your margin is flattering. Even a rough hourly value helps judge whether a product is worth the effort.
  • Taxes. Income tax on profit is not in most margin figures, and sales tax collected is not revenue.

Using margins well

  • Calculate per product. A store-wide figure can hide losers behind winners.
  • Use real costs. Pull actual fees, shipping and ad spend from your bookkeeping records and update them regularly.
  • Check margin after promotions. A discounted item with a thin margin may lose money once shipping and fees are included.
  • Know your minimum price. Find the price below which the order loses money after variable costs.
  • Compare with break-even. A strong margin does not guarantee success if the fixed costs are high and volume is low; the break-even point shows how many orders you need.
  • Review periodically. Supplier prices, carrier rates and fees change.

What counts as a good margin

There is no universal answer. Typical margins vary a lot by product type, sourcing method and business model, and a thin margin may work with high volume while a wide margin may fail with too few sales. Instead of chasing a number you read somewhere, aim to understand your own figures and make sure each product earns enough after all costs to be worth selling. As always, results are uncertain, and these examples are for illustration only.

The complete guide to money and legal basics

Money Basics for Online Store Owners
Read the guide

Keep exploring

Guides from other topics

All topics →

Ecommerce Fraud Explained

A plain map of the main fraud types that hit online sellers, including stolen cards, account takeover, refund abuse and scams, with warning signs for each.

Fraud and Risk 4 min read