Profit margin calculator: margin, markup and profit per unit

Enter a selling price and what one unit costs you to get the gross margin, markup and profit per unit, free with no sign-up.

Your product

Selected: USD $

Gross margin

33.3%

Profit per unit

$10.00

Markup

50%

Formula

Gross margin = profit ÷ price. Markup = profit ÷ cost.

Cost per unit, all in
$20.00
Profit per unit
$10.00
Gross margin
33.3%

Price for a 40% margin

$33.33

Price for a 50% margin

$40.00

Price for a 60% margin

$50.00

See how others sell this product

In Spytrend, search it among ads that have run 60 days or more: the offers their advertisers kept paying for.

Search in Spytrend

To calculate profit margin, subtract the unit cost from the selling price and divide the result by the price. Markup divides the same profit by the cost, so on a profitable unit markup is the bigger number. A $30 item that costs you $20 has a 33.3% margin and a 50% markup.

You get three numbers from one price: the gross margin, the markup and the profit you keep on each unit.

[ What you get ]

Gross margin, markup and profit per unit from one price

Margin and markup measure the same profit against two different things. A supplier’s "40% markup" and a marketplace’s "40% margin" are deals eleven points apart, so the calculator shows both.

What comes out:

  • Gross margin. Profit divided by the selling price: the share of each sale you keep. It is the first card.
  • Markup. The same profit divided by the cost. Suppliers quote this one, and on a profitable unit it is the larger number.
  • Profit per unit. The price minus the unit cost, shipping and fees: what one sale leaves you.

This is gross margin, before ad spend, overheads and tax. Net margin takes those out as well, so it is always the smaller number.

[ How to use it ]

Profit margin calculator: three steps

  1. Enter the selling price

    What the buyer pays. A dollar sign or a thousands comma is fine. The currency select changes the symbol only; nothing is converted.

  2. Add your costs

    Unit cost is the only required cost. Add shipping per unit and fees per sale if you pay them; empty fields count as zero.

  3. Read margin and markup

    The first card is the gross margin; the profit per unit and the markup sit next to it. If someone quoted you a percentage, check which of the two they meant.

There is no Calculate button. Raise the price by a dollar or add a cost you left out, and the margin follows as you type.

[ Definitions ]

Margin and markup: two numbers for the same profit

Margin divides profit by the selling price; markup divides the same profit by the cost. Buy for $20, sell for $30, and the $10 profit is a 33.3% gross margin and a 50% markup.

Gross margin % = (price − cost) ÷ price × 100

Markup % = (price − cost) ÷ cost × 100

To convert one into the other:

Markup from margin: markup = margin ÷ (100 − margin) × 100

Margin from markup: margin = markup ÷ (100 + markup) × 100

So a 50% markup is a 33.3% margin, and a 50% margin is a 100% markup.

The gap matters whenever a deal is quoted in percent. A supplier promising "you can work on 40% markup" is offering you a 28.6% margin. A marketplace asking for a 40% margin is asking for a 66.7% markup on your cost.

Markup to margin, on a $10 unit cost

MarkupGross marginSelling price
20%16.7%$12.00
25%20%$12.50
33%24.8%$13.30
50%33.3%$15.00
100%50%$20.00
150%60%$25.00
200%66.7%$30.00

[ Worked example ]

One product at 50% markup and 33% margin

A phone case costs $16.00 from the supplier, $2.50 to ship and $1.50 in marketplace fees: $20.00 per unit. Listed at $30.00, it leaves $10.00, a 50% markup on the cost and a 33.3% gross margin on the price.

Advertising is not in that $10.00 yet. Whatever you pay to win the buyer comes out of it.

The same phone case, line by line

LineAmount
Selling price$30.00
Unit cost$16.00
Shipping per unit$2.50
Fees per sale$1.50
Total cost per unit$20.00
Profit per unit$10.00
Markup50%
Gross margin33.3%

[ Pricing backwards ]

Set the price from the margin you need

Divide the cost by one minus the margin you need:

Price = cost ÷ (1 − margin ÷ 100)

For the phone case, $20.00 of cost at a 40% margin gives $20.00 ÷ 0.6 = $33.33, and $13.33 of each sale stays with you. Adding 40% to the cost instead gives $28.00: a 40% markup and only a 28.6% margin.

The price climbs faster than the target. Going from a 50% to a 60% margin on that unit means going from $40.00 to $50.00. The margin card lists the price for a 40%, 50% and 60% margin on the cost you enter.

[ Unit cost ]

What belongs in unit cost for an ecommerce seller

Anything you pay because one more unit sold belongs in unit cost. Anything you would pay anyway does not.

In: the supplier price at your real order size, inbound freight and duty, packaging, the shipping you pay, payment processing and the marketplace fee. Add a share for returns you cannot resell.

Out: advertising, rent, salaries, software and your own time; they come out of the gross profit. The calculator does not know your return rate or the discount codes you run, so fold them into the cost.

[ Limits ]

Free version limits

The calculator runs in your browser; there is no limit and no account. One calculation covers one product at one price, and we don’t store your numbers.

[ Why marketers use it ]

Know the most one order can cost — before you buy traffic

Your profit per unit caps what you can pay in ads to win a sale. The phone case leaves $10.00, so $12.00 in ad spend per order loses $2.00 on every sale, however good the dashboard looks.

It also makes a ROAS target readable. Three dollars back per ad dollar is comfortable on a 60% margin and a slow loss on a 25% one.

A store owner prices the unit before launch and checks whether the product can carry paid traffic at all. A media buyer turns the same profit per unit into a bid cap and a CPA target.

The arithmetic stops at your own costs. Whether the product sells at that price shows in the ads already running for it.

[ Go further with Spytrend ]

Check your price against the ads running for the product

Your costs set the margin; the market sets the price that sells.

Spytrend is an ad intelligence platform for Facebook and TikTok advertising: a full five-year archive of ads, AI-classified into 33 business categories, with every advertiser assembled into a single card — all ads, pages, domains and countries in one place. Search the product you just priced to read the offers in ads that mention it and how long each ad has run.

Two jobs where a margin needs the market

  • Checking a price against live offers. Read how ads for the same product pitch it: the bundle, the discount, the guarantee. A price that needs a story nobody else tells is one your creative must defend alone.
  • Judging whether a thin margin can pay for ads. A few dollars a unit leaves little room to buy an order. Keep the ads for your product that have run 60 days or more: those are the offers advertisers kept paying for.

How to start

Create a free account and search the product you just priced. A free account opens the ad library; paid plans add fresh ads and every filter.

FAQ

Priced the unit? Search it in Spytrend.

You know what one sale leaves you. Spytrend puts the ads for the same product beside that number, with how long each has run and who pays for it.

Open Spytrend

Embed this tool on your site

Put this calculator on your own page: paste the code below into your HTML. It works on any site, needs no account and runs in your visitor’s browser.

<iframe src="https://spytrend.com/profit-margin-calculator/embed" title="Spytrend profit margin calculator" loading="lazy" style="width:100%;max-width:720px;height:780px;border:0"></iframe>

Gross margin, before ad spend, overheads and tax. The calculation runs in your browser; we don’t store your numbers.