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
- 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.
- 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.
- 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.
- 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?
Can profit margin be negative?
What is a good profit margin?
Why is margin always less than markup?
How do I convert a 50% markup to margin?
Related Finance Calculators
Mortgage Calculator
Calculate monthly mortgage payments, total interest, and amortisation schedules. Compare refinance options and find how much you can afford.
Compound Interest Calculator
Calculate compound interest with contributions. Compare compounding frequencies, find time to target, and see year-by-year growth tables.
Sales Tax Calculator
Calculate sales tax, find pre-tax prices, and compare tax rates. Includes US state tax rate reference table. Free online sales tax calculator.
Discount Calculator
Calculate sale prices, find discount percentages, and work out stacked discounts. See how much you save. Free online discount calculator.
Inflation Calculator
Calculate purchasing power, inflation rates between years, and future value adjusted for inflation. US CPI data from 1913 to 2025. Free online inflation calculator.
Investment Calculator
Calculate investment growth with monthly contributions. Find future value, required contributions, time to reach goals, and compare scenarios. Free online tool.