Profit Margin Calculator

Find your gross profit, profit margin and markup from your selling price and costs.

Your numbers

Your results

Profit margin
50.00%
You keep $25.00 of every $50.00 sale.
Gross profit
$25.00
Per unit
Markup
100.00%
Profit over cost

Thin margins make every ad dollar count. Loore learns what's already working in your account and generates winning ad variations on autopilot.

Start free

What is profit margin?

Profit margin is the share of the selling price you keep as profit. A 40% margin means that out of every $100 of sales, $40 is left after the costs you counted.

It is the most important number behind your advertising, because it decides how much you can spend to make a sale. A brand with a 70% margin can profitably pay far more per customer than one with a 20% margin.

The profit margin formula

Profit = selling price − total cost
Profit margin = profit ÷ selling price × 100

How to calculate profit margin, step by step

Price $50, product $20, other costs $5
Profit = $50 − $25 = $25
Margin = $25 ÷ $50 × 100 = 50%
  • Start with your selling price: what the customer pays, excluding sales tax.
  • Add up the cost of one sale: product cost (COGS), shipping, payment fees, packaging and anything else you pay per order.
  • Subtract total cost from the price to get profit.
  • Divide profit by the selling price and multiply by 100.

Gross margin vs net margin

Gross margin counts only the direct cost of the product: (revenue − COGS) ÷ revenue. Net margin counts everything: product, shipping, fees, ad spend, salaries, software and rent. A store can have a healthy gross margin and still lose money once ads and overheads are in.

For advertising decisions, use a contribution margin in between: price minus every cost that comes with each order (product, shipping, fees, packaging), before ad spend. That is the margin this calculator gives when you fill in "Other costs per sale", and the one your break-even ROAS depends on.

Margin vs markup

Margin is profit as a share of the selling price. Markup is profit as a share of the cost. The same $20 profit on a $50 product that costs $30 is a 40% margin but a 67% markup. Mixing them up is a common pricing mistake.

Markup = profit ÷ cost × 100
Margin = markup ÷ (1 + markup)
  • 25% markup = 20% margin
  • 50% markup = 33.3% margin
  • 100% markup = 50% margin
  • 200% markup = 66.7% margin
  • 300% markup = 75% margin

How to price for a target margin

If you know your cost and the margin you want, work the price out directly:

Price = total cost ÷ (1 − target margin)
Example: $30 cost, 40% target margin
$30 ÷ 0.6 = $50 price

Note that you divide, not multiply. Adding 40% to a $30 cost gives $42, which is only a 28.6% margin.

Why your margin decides your ad budget

Your margin sets the return your ads must make to break even. Break-even ROAS is 1 ÷ margin: a 50% margin needs a 2x ROAS, a 25% margin needs 4x. Your margin in dollars is also your max cost per sale. Check both with the ROAS calculator, compare with your real cost per sale in the CPA calculator, and see your full per-order profit after ad spend with the ecommerce profit calculator.

What is a good profit margin?

It varies widely by category, so there is no single good number. What matters is whether the margin leaves room to acquire customers profitably. If your break-even ROAS is higher than the ROAS your ads actually achieve, raise prices, cut per-order costs or increase order value before raising ad spend.

Related free tools

Frequently asked questions

How do you calculate profit margin?
Profit margin = (selling price − total cost) ÷ selling price × 100. A $50 product that costs you $30 has a $20 profit and a 40% profit margin.
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 cost. A $20 profit on a $50 price is a 40% margin, but on a $30 cost it is a 67% markup. Same profit, two different percentages.
What is the difference between gross and net margin?
Gross margin subtracts only the product cost (COGS). Net margin subtracts every cost, including shipping, fees, ad spend and overheads, so it is always lower.
Should I include shipping and fees in the cost?
Yes. For a margin you can use for ad decisions, include every per-sale cost: product cost (COGS), shipping, payment processing fees and packaging. Use the "Other costs per sale" field for everything beyond the base product cost.
How do I set a price for a target margin?
Divide your total cost by (1 − target margin). For a 40% margin on a $30 cost: $30 ÷ 0.6 = $50.