Skip to content
AgileLogics

Profit Margin Calculator

Calculates profit, profit margin (profit as a % of revenue), and markup (profit as a % of cost) — the two most commonly confused business percentages, reported together.

How it works

Enter your revenue and cost.

What is profit margin?

Profit margin is profit expressed as a percentage of revenue: (revenue − cost) ÷ revenue × 100. It tells you how much of each sale you keep. If you sell something for 150 that cost you 100, your profit is 50 and your margin is 33.33%. This calculator also shows markup, which measures the same profit against cost instead.

The formulas

The calculator takes two numbers, revenue and cost, and returns up to three results:

  • Profit = revenue − cost
  • Profit margin = profit ÷ revenue × 100
  • Markup = profit ÷ cost × 100 (shown only when cost is greater than zero)

Revenue must be greater than zero and cost can't be negative. Results are rounded to two decimal places.

The inputs can be a single item (selling price and unit cost) or totals for a period (sales and cost of goods for a month). What you count as cost decides what kind of margin you get. Use only the direct cost of the goods and you get gross margin. Include every expense, from rent to wages, and you get net margin.

Worked example

You buy a product for 100 and sell it for 150.

  1. Enter 150 as revenue and 100 as cost.
  2. Profit = 150 − 100 = 50.00.
  3. Margin = 50 ÷ 150 × 100 = 33.33%.
  4. Markup = 50 ÷ 100 × 100 = 50.00%.

The same 50 of profit is a 33.33% margin and a 50% markup. Mixing the two up is a common pricing mistake. If you want a 50% margin and add 50% to cost, you end up with 33.33%.

A loss looks like this: revenue 80 and cost 100 give a profit of −20.00, a margin of −25.00% and a markup of −20.00%.

Margin and markup equivalents

Because margin divides by the larger number (price), it's always smaller than markup for a profitable sale, and it can never reach 100% unless cost is zero.

Markup Margin Price for a cost of 100
10% 9.09% 110
20% 16.67% 120
25% 20.00% 125
33.33% 25.00% 133.33
50% 33.33% 150
75% 42.86% 175
100% 50.00% 200
150% 60.00% 250
200% 66.67% 300

To convert between them, use decimals:

  • Margin = markup ÷ (1 + markup)
  • Markup = margin ÷ (1 − margin)

How to price for a target margin

This calculator works from a price you already have. To set a price that hits a margin you choose:

  1. Write the target margin as a decimal, for example 30% = 0.30.
  2. Subtract it from 1: 1 − 0.30 = 0.70.
  3. Divide your cost by that number: 70 ÷ 0.70 = 100.
  4. Check it by entering 100 as revenue and 70 as cost. The calculator shows a 30.00% margin and a 42.86% markup.

Things that affect the result

  • Sales tax. If your prices include VAT or GST, take the tax out of revenue first. That money goes to the tax authority, not to you. The GST/VAT calculator can extract it.
  • Discounts. A discount comes straight off revenue but leaves cost unchanged, so it eats into profit fast. Take 10% off the 150 price in the example above and revenue becomes 135: profit drops from 50 to 35 and the margin from 33.33% to 25.93%. Try your discounted price in the calculator before running a sale.
  • Hidden costs. Shipping, payment fees and returns are easy to leave out of cost, which makes the margin look better than it is.

Related calculators

Last updated

Frequently asked questions

What is the difference between margin and markup?
Both compare profit to something else. Margin divides profit by the selling price (revenue), while markup divides profit by the cost. Selling for 150 something that cost 100 gives a profit of 50, a margin of 33.33% and a markup of 50%.
How do I convert markup to margin?
Margin = markup ÷ (1 + markup), using decimals. A 50% markup is 0.5 ÷ 1.5 = 33.33% margin. To go the other way, markup = margin ÷ (1 − margin), so a 20% margin is a 25% markup.
What price do I need for a 30% margin?
Divide the cost by 1 minus the target margin. For a cost of 70 and a 30% margin, the price is 70 ÷ 0.70 = 100. Adding 30% to the cost (91) would only give a 23.08% margin.
Why is there no markup in my result?
Markup is profit divided by cost, so it can't be calculated when cost is zero. The calculator leaves it out in that case and shows profit and margin only.
Can the margin be negative?
Yes. If cost is higher than revenue, profit is negative and the margin and markup show as negative percentages, which means you are selling at a loss.