Margin calculator

Find your profit margin and markup from cost and selling price, or the price you need to charge to reach a target margin. Handy for pricing products and services.

By OpenBookMoney Editors · Free, no sign-up · Updated Oct 18, 2026

Margin & markup calculator

Find your profit margin and markup from cost and price, or the price you need for a target margin.

Use the target margin to find the price you’d need to charge.
Gross margin 38.46% Profit of $25.00 on each sale
Gross profit $25.00
Markup on cost 62.5%
Price for a 45% margin $72.73
Markup for a 45% margin 81.82%
Cost, profit and price
Cost$40.00
Profit$25.00
Selling price$65.00

Margin and markup describe the same profit two ways: a 62.5% markup on cost is a 38.46% margin on price.

How it’s calculated

Gross profit = price − cost. Margin = profit ÷ price. Markup = profit ÷ cost. Price for a target margin = cost ÷ (1 − target margin).

Results are rounded for display. Estimates only.

How to use the margin calculator

  1. Enter your cost per item: what you pay to make or buy it.
  2. Enter your selling price to see your gross profit, margin and markup.
  3. Enter a target margin to find the price you’d need to charge.

Margin and markup formulas

Gross profit = price − cost
Margin = profit ÷ price
Markup = profit ÷ cost
Price for a target margin = cost ÷ (1 − target margin)

Margin and markup describe the same profit in two ways. Margin compares the profit with the selling price; markup compares it with the cost. That’s why a 50% markup is only a 33.3% margin.

Example: an item that costs $40

Selling it for $65 leaves a $25 profit: a 38.46% margin and a 62.5% markup. To reach a 45% margin, you’d need to charge $72.73, an 81.82% markup.

Margin and markup for the same $40 cost.
MarginMarkupPrice on a $40 cost
20%25%$50.00
25%33.3%$53.33
33.3%50%$60.00
40%66.7%$66.67
50%100%$80.00
60%150%$100.00

Gross margin vs. net margin

This calculator finds gross margin: the profit on each sale after the cost of the item itself. Net margin also subtracts overhead, such as rent, software, marketing, payment fees and your own time. Your gross margin has to cover all of those before the business makes money.

Pricing tips

  • Count every direct cost per sale: materials, packaging, shipping and platform or payment fees.
  • Start from the margin you need, not from a habitual markup.
  • Check what a discount does to your margin: 20% off a price with a 40% margin leaves a 25% margin.
  • Compare your margin with the cost of running the business. Our small business ideas list typical startup costs and earnings.

Frequently asked questions

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 the cost. An item that costs $40 and sells for $65 has a 38.5% margin and a 62.5% markup.

How do I set a price from a target margin?

Divide the cost by 1 minus the margin. For a 45% margin on a $40 cost: $40 ÷ 0.55 = $72.73.

How do I convert markup to margin?

Margin = markup ÷ (1 + markup), so a 50% markup is a 33.3% margin. To go the other way, markup = margin ÷ (1 − margin).

What is a good profit margin?

It depends on your industry, your overhead and how many units you sell. A business with high fixed costs needs a higher gross margin to stay profitable, so check your margin against your full costs rather than a single rule.

Can a margin be more than 100%?

No. Margin is profit divided by price, so it stays below 100% unless the cost is zero. Markup has no upper limit.

Results are for planning only and don’t include taxes or overhead.