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
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.
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
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
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
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
Calculate monthly mortgage payments, total interest, and amortisation schedules. Compare refinance options and find how much you can afford.
Calculate compound interest with contributions. Compare compounding frequencies, find time to target, and see year-by-year growth tables.
Calculate sales tax, find pre-tax prices, and compare tax rates. Includes US state tax rate reference table. Free online sales tax calculator.
Calculate sale prices, find discount percentages, and work out stacked discounts. See how much you save. Free online discount 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.
Calculate investment growth with monthly contributions. Find future value, required contributions, time to reach goals, and compare scenarios. Free online tool.