PixelSpyer

Profit margin calculator

Margin is the fuel for every ad campaign: it decides how much you can pay to acquire a customer. Enter your price and costs to see gross margin, net margin and markup side by side, and the price you would need to reach a target margin.
Planning and unit economicsFreeNo sign-up. Results update as you type.

Your numbers

Excluding tax

Same unit or period

Ads, fees, shipping, overhead share

Shows the price you would need

Results

Net margin
27.5%
$22.00 profit per $80.00 after all costs. Gross margin is 65%.
Gross profit
$52.00
Gross margin
65%
Profit ÷ price
Markup
185.7%
Profit ÷ cost
Net profit
$22.00
After other costs
Price for 70% margin
$93.33
$13.33 above today
Cost share of price
35%
Cost of goods ÷ price
How the price splits
  • Cost of goods$28.0035%
  • Other costs$30.0038%
  • Net profit$22.0028%

Profitable

You keep 27.5% of every sale, $22.00 per unit, after product and other costs.

How to use the profit margin calculator

  1. Enter the selling price per unit, or total revenue for a period.

  2. Enter the cost of goods sold for the same unit or period.

  3. Add other costs, such as ad spend, fees, shipping and an overhead share for the same unit or period, to see net margin.

  4. Set a target gross margin to see the price that would achieve it.

The profit margin formula

  • Gross profit=price − cost of goods
  • Gross margin=gross profit ÷ price
  • Markup=gross profit ÷ cost of goods
  • Net margin=(gross profit − other costs) ÷ price
  • Price for target margin=cost of goods ÷ (1 − target margin)
Cost of goods
Direct cost of the product: manufacturing or wholesale price, plus inbound freight and duties if you track them per unit.
Other costs
Everything else needed to make the sale: advertising, payment fees, fulfilment, software and a share of overheads.
Target margin
The gross margin you want, as a decimal (70% = 0.70).

Margin is measured against price and markup against cost. A 100% markup is a 50% margin.

Worked example

An 80 product

  1. Price 80, cost of goods 28, other costs per unit 30.
  2. Gross profit = 52, gross margin = 52 ÷ 80 = 65%, markup = 52 ÷ 28 = 185.7%.
  3. Net profit = 52 − 30 = 22, net margin = 22 ÷ 80 = 27.5%.
  4. For a 70% gross margin, price = 28 ÷ 0.30 = 93.33.
The product keeps 27.5% of its price as profit after all costs. A price of about 93 would lift gross margin to 70%.

Margin versus markup

The two are easy to confuse and the confusion is expensive. Adding 50% to your cost does not give you a 50% margin; it gives you 33%. Pricing on markup while budgeting ads on an assumed margin is a common way to overspend.

Markup on costGross margin
25%20%
50%33.3%
100%50%
150%60%
200%66.7%
300%75%

How much margin paid social needs

Brands that grow mainly through paid social need room for acquisition costs. A product with a 70% gross margin can absorb the ad costs of cold traffic far more easily than one at 25%, which needs a 4x ROAS before any other costs are covered.

If your margin is thin, the levers are higher prices, bundles that raise order value, cheaper fulfilment, or relying on repeat purchases to recover acquisition costs over time.

Gross, contribution and net margin

Gross margin covers product cost only. Contribution margin also deducts the variable costs of each order, such as shipping, payment fees and packaging, and is the right basis for break-even ROAS. Net margin deducts everything, including ads and overheads, and tells you whether the business makes money.

  • Use contribution margin to set ad targets.
  • Use net margin to judge the business.
  • Recalculate whenever supplier prices, shipping rates or discounting change.

Questions and answers

How do I calculate profit margin?+

Subtract costs from price to get profit, then divide profit by price. A product that sells for 50 and costs 20 has a gross profit of 30 and a gross margin of 60%.

What is the difference between margin and markup?+

Margin is profit as a share of the selling price; markup is profit as a share of cost. The same 30 profit on a 50 product is a 60% margin and a 150% markup.

What is a good profit margin for an ecommerce store?+

It depends on the model. Gross margins well above 50% leave room for paid acquisition, while resellers with thin margins rely on volume, repeat purchases or cheaper traffic. Net margins vary widely and there is no single standard, so track your own trend over time.

How do I price a product for a target margin?+

Divide cost by (1 − target margin). For a cost of 40 and a 60% target margin: 40 ÷ 0.4 = 100.

Should ad spend be included in gross margin?+

No. Ad spend belongs below gross margin, in contribution or net margin. Keeping it separate shows how much room your product economics give your ads.

Can a margin be over 100%?+

Margin cannot exceed 100% because profit cannot exceed price. Markup can, and often does.

Related free tools

Numbers rarely travel alone. These tools pick up where this one stops.

See all free tools

See the ads behind the numbers

Find competitors' long-running Facebook and Instagram ads, study their offers and landing pages, and plan campaigns with real examples.

Profit margin calculator: gross margin, net margin and markup · PixelSpyer