Skip to content
SacaCuenta

Margin Calculator

See how much you make on each sale in seconds: enter your cost and price to get profit, gross margin and markup, or enter the margin you want and get the exact selling price.

FreeNo sign-upInstant resultsUpdated:

Calculator

Calculation mode
$

What it costs you to buy or make one unit.

$

The price you sell it for (ideally before sales tax).

units

Projects revenue, total cost and gross profit.

Profit margin

37.5%

Based on the selling price

Profit

$15.00

Per unit

Markup

60%

Based on cost

Margin = profit ÷ selling price. Markup = profit ÷ cost. They are two ways to measure the same profit: markup is always higher than margin.

The calculation does not include sales tax, fees or fixed costs. Use it as a pricing reference and check it against your break-even point.

What is gross margin?

Gross margin (or profit margin per unit) is the share of the selling price you keep as profit after covering the cost of the product. If you sell something for $40 that cost you $25, you make $15. That $15 is 37.5% of the price, so your margin is 37.5%.

It answers the question "of every dollar I charge, how much is profit?" That's why it's used to compare products, set prices and check whether a discount still leaves you money.

How the calculator works

  1. I have cost and price: enter what the product costs you and what you sell it for. You get profit per unit, margin (based on price) and markup (based on cost).
  2. I want a margin %: enter your cost and the margin you want. The calculator tells you the selling price and the equivalent markup.
  3. If I sell X units: add a quantity to project revenue, total cost and gross profit for that volume.

Use prices before sales tax. If your price includes tax, the margin will look higher than it really is.

Margin, markup and selling price formulas

Profit = Selling price − Cost
Margin (%) = Profit ÷ Selling price × 100
Markup (%) = Profit ÷ Cost × 100
Price for a target margin M = Cost ÷ (1 − M)
M as a decimal: 40% = 0.40.

The price formula prevents the most common pricing mistake. To get a 40% margin on a $25 cost, adding 40% to the cost ($35) is not enough: you divide $25 by 0.60, which gives $41.67.

Gross margin vs. markup

Both measure the same profit, but against a different base. Margin divides profit by the selling price; markup divides it by the cost. Since cost is lower than price whenever you make money, markup is always a bigger percentage than margin.

Markup on costEquivalent margin
25%20%
50%33.3%
60%37.5%
100%50%
200%66.7%

Mixing them up is expensive: a business that wants to make 30% and applies a 30% markup actually ends up with a 23.1% margin. To convert: margin = markup ÷ (1 + markup) and markup = margin ÷ (1 − margin).

How to read the results

  • Negative margin: you're selling below cost and losing money on every unit.
  • Thin margin: common for high-volume or highly competitive products. You need volume and tight control of expenses.
  • Healthy margin: leaves room for occasional discounts, returns and promotions.
  • High margin: common for software, your own branded or handmade products and specialized services.

Unit margin doesn't tell you whether the business is profitable: you still have to cover rent, salaries and other fixed costs. To find out how many units you need to sell, use the break-even calculator.

What margin do I need?

It depends on your fixed costs and how much you want to earn. A practical method: add your monthly fixed costs and the profit you want, then divide by your expected monthly sales. If you sell $10,000 a month, have $2,000 in fixed costs and want to earn $1,500, you need an average margin of at least 35%.

Leave room for payment processing fees, returns, shipping and promotions, since they all reduce your real margin.

Example

A product costs $25 and sells for $40. Profit is $40 − $25 = $15. The margin is 15 ÷ 40 = 37.5% and the markup is 15 ÷ 25 = 60%. If you want a 40% margin on the same cost instead, the price must be 25 ÷ (1 − 0.40) = $41.67.

  1. Profit: $40 − $25 = $15
  2. Margin: 15 ÷ 40 × 100 = 37.5%
  3. Markup: 15 ÷ 25 × 100 = 60%
  4. Price for a 40% margin: $25 ÷ 0.60 = $41.67

Common mistakes

  • Adding the percentage to the cost to get the price. 40% on top of cost is a markup, not a 40% margin.
  • Calculating margin from a price that includes sales tax. Remove the tax first.
  • Forgetting hidden costs such as shipping, packaging, payment processing or marketplace fees. They're all part of your real cost.
  • Asking for a margin of 100% or more. It's mathematically impossible; margin only approaches 100% as cost approaches zero.
  • Confusing unit margin with business profitability. You still need to subtract fixed costs.

Frequently asked questions

How do you calculate profit margin?

Subtract the cost from the selling price to get profit, then divide by the selling price and multiply by 100. Example: ($40 − $25) ÷ $40 × 100 = 37.5%.

How do I calculate the selling price for a target margin?

Divide the cost by (1 − margin). For a 40% margin: cost ÷ 0.60. With a $25 cost the price is $41.67. Don't just add the percentage to the cost, or you'll get a markup instead of a margin.

What's 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 product that costs $25 and sells for $40 has a 37.5% margin and a 60% markup.

Does a 50% margin mean I double my cost?

Yes. A 50% margin equals a 100% markup: the price is twice the cost. A 33.3% margin equals a 50% markup.

Is gross margin the same as net margin?

No. This calculator gives gross margin per unit (price minus the product's cost). Net margin also subtracts fixed costs, taxes and other business expenses, so it's always lower.