Parishrament All tools
Pricing & Profit

How to Calculate Profit Margin: Formula and Examples

On this page
  1. The profit margin formula
  2. Step by step
  3. Gross margin vs net margin
  4. Worked example: an Etsy candle
  5. Worked example: an Amazon FBA product
  6. How to price for a target margin
  7. What is a good profit margin?
  8. Common mistakes
  9. The bottom line
  10. Frequently asked questions

Profit margin tells you how much of every sale you actually keep. It is the single most useful number for pricing, comparing products and deciding whether a sale or a new platform is worth it. This guide shows how to calculate profit margin step by step, with examples for online sellers.

The profit margin formula

Profit margin = (selling price − total costs) ÷ selling price × 100

The result is a percentage of the selling price. If you sell something for $50 and it costs you $30 in total, your profit is $20 and your margin is 20 ÷ 50 = 40%.

Step by step

  1. Start with the selling price the customer pays (excluding any sales tax or VAT you collect and pass on).
  2. Add up every cost of that sale: product or materials, packaging, shipping you pay, platform fees, payment fees and any ad cost per sale.
  3. Subtract the costs from the price to get your profit.
  4. Divide the profit by the price and multiply by 100.

Do it instantly with the calculator:

Profit Margin Calculator

Open full calculator
Selling price–
Cost–
Gross profit–
Profit margin–
Markup–
Fee breakdown

Enter your numbers to see the result.

Gross margin vs net margin

Gross profit margin uses only the direct cost of the product (your cost of goods sold):

Gross margin = (revenue − cost of goods sold) ÷ revenue × 100

Net profit margin uses every cost of running the business, including fees, shipping, advertising, software, rent and your own pay:

Net margin = net profit ÷ revenue × 100

Gross margin tells you whether a product is priced well. Net margin tells you whether the business is profitable. Our guide to how to calculate cost of goods sold explains what belongs in COGS.

Worked example: an Etsy candle

You sell a candle for $30 on Etsy.

  • Materials and jar: $8
  • Packaging: $1.50
  • Etsy fees (listing, transaction and processing): $3.30
  • Profit: $30 − $8 − $1.50 − $3.30 = $17.20
  • Margin: 17.20 ÷ 30 = 57.3%

If you offer free shipping and the postage costs you $5, profit drops to $12.20 and the margin to 40.7%.

Worked example: an Amazon FBA product

You sell a kitchen gadget on Amazon for $25. It costs $6, and Amazon's referral fee, FBA fee, surcharge and plan share come to about $8.50.

  • Profit: $25 − $6 − $8.50 = $10.50
  • Margin: 10.50 ÷ 25 = 42%

Add $3 of advertising per sale and the margin falls to 30%.

How to price for a target margin

Turn the formula around to find the price that gives the margin you want:

Price = total cost ÷ (1 − target margin)

For a product that costs $18 and a target margin of 40%: 18 ÷ 0.6 = $30. Adding 40% to the cost ($25.20) only gives a 28.6% margin. That is the classic margin vs markup mistake; read profit margin vs markup to avoid it.

When fees are a percentage of the price, include them in the divisor: price = fixed costs ÷ (1 − fee % − target margin). The handmade pricing calculator does this automatically.

What is a good profit margin?

There is no single answer, but as a rough guide for online sellers:

  • Below 20% net: little room for discounts, ads or mistakes.
  • 20–40% net: healthy for most small online shops.
  • Gross margins of 50% or more are common targets for handmade and private-label products, because fees, ads and overheads still have to come out.

Compare margins between your own products and platforms rather than chasing an industry average.

Common mistakes

  1. Forgetting fees and shipping. They are often 15–35% of the price.
  2. Using markup instead of margin.
  3. Including VAT or sales tax in revenue. Tax you collect isn't yours.
  4. Ignoring your time. If you don't pay yourself, your margin is overstated.
  5. Not checking margins after discounts. A 20% sale on a 40% margin product halves your profit. See how to run a sale without losing money.

The bottom line

Margin is profit divided by price. Include every cost of the sale, price for a target margin with cost ÷ (1 − margin), and check your numbers regularly with the profit margin calculator.

Fee figures in the examples use US rates checked in October 2026.

Frequently asked questions

What is the formula for profit margin?

Profit margin = (selling price − total costs) ÷ selling price × 100. For example, a $50 item with $30 of costs has a 40% margin.

How do I calculate a 30% profit margin?

Divide your total cost by 0.7. An item costing $14 needs a price of $20 for a 30% margin (14 ÷ 0.7 = 20).

What is the difference between margin and markup?

Margin is profit as a percentage of the selling price; markup is profit as a percentage of the cost. A 50% markup equals a 33.3% margin.

Should I include platform fees in my profit margin?

Yes. Marketplace, payment and advertising fees are real costs of each sale. Leaving them out makes your margin look higher than it is.