Skip to content

Margin Calculator — Step-by-Step Solutions

The Margin Calculator helps you work out profit margins, markup percentages, and selling prices. It supports four modes: calculate profit margin from cost and revenue, find the selling price needed for a target margin, compare gross and net margins, and convert between margin and markup.

Enter your values and get instant results with step-by-step working. The visual bar chart shows how your revenue splits between cost and profit. Also works as a markup calculator.

Your calculations will appear here

How to Use the Margin Calculator

  1. Choose a calculation mode using the tabs at the top. There are four modes: Profit Margin (from cost and revenue), Selling Price (from cost and desired margin), Gross vs Net margin comparison, and Markup vs Margin converter.
  2. Enter your values in the input fields. Results are calculated in real time as you type. All monetary values should be entered as numbers without currency symbols.
  3. Review the step-by-step working below the results to understand the calculation method. The visual bar shows how revenue is split between cost and profit.
  4. Use the Markup vs Margin converter mode to quickly translate between the two commonly confused metrics. The reference table shows common margin/markup pairs.

Formula and Theory

Profit margin and markup are two ways of expressing the relationship between cost and profit. Although they describe the same transaction, they use different denominators, which is why they produce different percentages for the same sale.

Profit margin is calculated as profit divided by revenue (selling price). It tells you what proportion of your revenue is profit. A 40% margin means 40 cents of every dollar of revenue is profit.

Markup is calculated as profit divided by cost. It tells you how much you add on top of your cost. A 66.7% markup means you add 66.7 cents for every dollar of cost. This produces the same profit as a 40% margin.

Gross margin considers only the cost of goods sold (COGS), while net margin also subtracts operating expenses such as rent, salaries, and utilities. Net margin is always lower than or equal to gross margin.

Worked Examples

Example 1: Calculating profit margin from cost and revenue

Problem: A product costs $30 to make and sells for $50. What is the profit margin?

Solution: Profit = $50 - $30 = $20. Margin = $20 / $50 x 100 = 40%.

Answer: 40% profit margin

Example 2: Finding selling price from cost and target margin

Problem: A product costs $30 and you want a 40% margin. What should the selling price be?

Solution: Price = $30 / (1 - 40/100) = $30 / 0.60 = $50.

Answer: $50.00 selling price

Example 3: Converting margin to markup

Problem: Convert a 25% margin to its equivalent markup percentage.

Solution: Markup = 25 / (100 - 25) x 100 = 25 / 75 x 100 = 33.33%.

Answer: 33.33% markup

Example 4: Comparing gross and net margins

Problem: A business has $100,000 revenue, $40,000 COGS, and $20,000 operating expenses. Find both margins.

Solution: Gross profit = $100,000 - $40,000 = $60,000. Gross margin = 60%. Net profit = $60,000 - $20,000 = $40,000. Net margin = 40%.

Answer: 60% gross margin, 40% net margin

Frequently Asked Questions

What is the difference between margin and markup?
Margin is profit as a percentage of the selling price (revenue). Markup is profit as a percentage of the cost. For the same transaction, margin is always a smaller number than markup. For example, a $20 profit on a $50 sale is a 40% margin but a 66.7% markup.
Can profit margin be negative?
Yes. A negative margin means you are selling below cost, which means you are making a loss on each sale. This can happen during clearance sales or when a business is pricing strategically to gain market share.
What is a good profit margin?
A good margin varies by industry. Software companies often achieve 60-80% gross margins, while grocery retailers may operate on 2-5% net margins. The key is to compare your margin to industry benchmarks rather than using a universal target.
Why is margin always less than markup?
Margin divides by the larger number (revenue), while markup divides by the smaller number (cost). Since revenue equals cost plus profit, revenue is always larger than cost (for a profitable sale), so dividing by revenue produces a smaller percentage.
How do I convert a 50% markup to margin?
Use the formula: margin = markup / (100 + markup) x 100. For 50% markup: margin = 50 / (100 + 50) x 100 = 50 / 150 x 100 = 33.33%.

Related Finance Calculators

Related Articles