Get margin %, markup % and profit from cost and price — or solve for the right price from cost and a target margin.
Enter cost and selling price to get margin, markup and profit — or switch modes to solve for the selling price from cost plus a target margin %.
Formula: Margin = (P − C) ÷ P × 100; Markup = (P − C) ÷ C × 100. Example: $80 cost, $100 price → 20% margin, 25% markup, $20 profit.
Whether you are pricing a product, reviewing a business, or checking a supplier’s quote, the calculator above turns cost and price into margin, markup, and profit in seconds. Follow these steps to use it correctly.
Pro tip: when a supplier or competitor talks about a 40 percent number, always ask whether they mean margin or markup. A 40 percent markup equals only a 28.57 percent margin, so confusing the two can cost you more than 11 points of profitability.
Profit margin is the percentage of revenue that remains as profit after costs. If you sell $100,000 of goods that cost you $80,000, your profit is $20,000 and your margin is 20 percent. It is the single most quoted measure of pricing power in business: a high margin means customers pay well above your costs, while a thin margin means you are passing most of the value to the customer or losing it to inefficiency.
Margins come in layers. Gross margin subtracts only the cost of goods sold (COGS), which is the direct cost of making or buying what you sell, from revenue. It answers whether the core product economics work. Net margin subtracts everything, including rent, salaries, marketing, interest, and taxes, and answers whether the whole business works. A company can have a healthy 55 percent gross margin and a razor-thin 4 percent net margin if its overhead is bloated, which is why professionals always ask which margin is being quoted.
Markup is margin’s close cousin and constant source of confusion. Markup expresses the same profit as a percentage of cost rather than price. On an $80 cost and $100 price, the $20 profit is a 20 percent margin but a 25 percent markup. Neither is wrong; they simply use different denominators. Retailers tend to think in markup because they start from wholesale cost, while investors think in margin because they start from revenue. The calculator above shows both so you never have to convert by hand.
Margins also reveal strategy. Luxury brands sustain 60 to 70 percent gross margins through brand power and pricing discipline. Grocery stores survive on 2 to 3 percent net margins through enormous volume. Software companies post 80 percent-plus gross margins because each additional copy costs almost nothing. When you compute your margin, compare it with businesses like yours, not with a universal ideal: a 10 percent net margin is superb for a supermarket and alarming for a software firm.
Finally, margin is a rate, not an amount. A 5 percent margin on $2,000,000 of revenue is $100,000 of profit, while a 40 percent margin on $100,000 of revenue is only $40,000. Businesses need both perspectives: margin for efficiency, dollars for survival. The strongest companies pair healthy margins with growing revenue, expanding both at once.
Three formulas cover nearly every margin question:
Profit = Selling price – Cost
Profit margin = (Selling price – Cost) / Selling price x 100
Markup = (Selling price – Cost) / Cost x 100
And the pricing formula that works backward from a target margin: Required price = Cost / (1 – Target margin). The two worked examples below show these formulas with real numbers.
Worked example 1: from cost and price. A handmade candle costs you $80 to produce and package, and you sell it for $100. Profit = $100 – $80 = $20.00. Margin = ($100 – $80) / $100 = $20 / $100 = 20 percent. Markup = ($100 – $80) / $80 = $20 / $80 = 25 percent. The same $20 profit looks like 20 percent when measured against the $100 price and 25 percent when measured against the $80 cost. This matches the calculator’s default result exactly.
Worked example 2: pricing to a target margin. A catering company knows each event costs $60 per guest to serve and wants a 40 percent margin. Using the pricing formula: required price = $60 / (1 – 0.40) = $60 / 0.60 = $100 per guest. Check: profit = $100 – $60 = $40, and $40 / $100 = 40 percent margin. Note the markup here is $40 / $60 = 66.67 percent, much higher than the 40 percent margin, which surprises many first-time pricers. If the caterer had mistakenly added a 40 percent markup instead, the price would be only $84, the margin would be $24 / $84 = 28.57 percent, and every event would earn $16 less than planned.
The key takeaway: margin always divides by price, markup always divides by cost. Keep the denominators straight and every pricing question reduces to arithmetic.
A neighborhood coffee shop brings in $100,000 of revenue in a year. Its costs total $62,000: $28,000 for ingredients and cups, $24,000 for barista wages, and $10,000 for its share of rent and utilities. Profit = $100,000 – $62,000 = $38,000. Margin = $38,000 / $100,000 = 38 percent. Markup = $38,000 / $62,000 = 61.29 percent.
A 38 percent margin is strong for a cafe, and it tells the owner that each additional $1,000 of sales at current costs adds about $380 of profit. But margins are fragile. Suppose coffee bean prices push costs up 10 percent to $68,200 while revenue stays flat. Profit falls to $31,800 and margin drops to 31.8 percent, a loss of more than 6 points from a cost increase the owner cannot control.
To defend the 38 percent margin without cutting costs, the owner must raise prices. Required revenue = Cost / (1 – Target margin) = $68,200 / (1 – 0.38) = $68,200 / 0.62 = $110,000. That is exactly a 10 percent revenue increase to offset a 10 percent cost increase, which is no coincidence: when costs and prices rise in proportion, margin is preserved. The calculator makes this planning instant: enter the new cost and the target margin, and it returns the required revenue before you print a single new menu.
A clothing retailer buys a jacket wholesale for $60. The buyer says to price it with a 50 percent markup-or-margin, and the two choices produce startlingly different price tags.
With a 50 percent markup: price = $60 x (1 + 0.50) = $90. Profit = $30. Margin = $30 / $90 = 33.33 percent.
With a 50 percent margin: price = $60 / (1 – 0.50) = $60 / 0.50 = $120. Profit = $60. Markup = $60 / $60 = 100 percent.
The same casual phrase produces a $90 price tag or a $120 price tag, a $30 difference in profit per jacket. This is the most expensive confusion in retail pricing, and it happens constantly when buyers, suppliers, and managers use the two terms interchangeably.
Memorize this conversion ladder, or bookmark the calculator: a 25 percent markup equals a 20 percent margin; a 33.33 percent markup equals a 25 percent margin; a 50 percent markup equals a 33.33 percent margin; a 100 percent markup equals a 50 percent margin; and a 200 percent markup equals a 66.67 percent margin. The general conversion is margin = markup / (1 + markup). Markup is always the bigger number for the same profit, which is why margin-based targets feel harder to hit: a 40 percent margin demands a 66.67 percent markup.
1. Using markup when you mean margin. As the jacket example shows, pricing to a 40 percent markup instead of a 40 percent margin leaves you at 28.57 percent margin, short-changing every sale. Whenever a target is stated as a percentage, confirm the denominator: percent of price (margin) or percent of cost (markup). Write the definition on your pricing sheet if you have to.
2. Counting revenue as profit. A freelancer who bills $100,000 and spends $70,000 on subcontractors, software, and home-office costs has $30,000 of profit, a 30 percent margin, not $100,000 of profit. Revenue is vanity until costs are subtracted. Always run the full cost figure through the calculator before quoting your margin to anyone, including yourself.
3. Forgetting the hidden costs. The product cost is only the beginning. Credit card processing takes 2 to 3 percent of every sale. Shipping, returns, packaging, marketplace fees, and customer support all eat margin silently. A product with a 40 percent margin on paper can easily deliver 25 percent in reality once these are included. Audit a real month of sales, allocate every cost, and compute your true margin at least twice a year.
4. Setting prices from markup when the goal is margin. Businesses that target a 35 percent margin but instruct staff to mark up 35 percent will systematically underprice everything, earning only a 25.93 percent margin instead. Translate margin targets into markup instructions with the formula markup = margin / (1 – margin): a 35 percent margin target means a 53.85 percent markup rule. Or skip the translation and give staff the calculator.
5. Chasing margin while ignoring volume. Raising prices from $100 to $120 lifts margin from 20 percent to 33.33 percent on an $80 cost, but if unit sales fall from 1,000 to 600, total profit drops from $20,000 to $24,000… wait, that still rises. The real danger is steeper: if sales fall to 400 units, profit is $16,000, less than before. Margin measures efficiency per sale; total profit is margin times volume. Model both, because the highest margin is worthless if nobody buys.
Extend your pricing analysis with the Markup Calculator for cost-plus pricing scenarios, the Sales Tax Calculator to see what customers actually pay, or browse the full Financial Calculators collection.
This page’s Profit Margin Calculator computes profit, profit margin, and markup from cost and selling price inputs in dollars. Formulas: profit = price – cost; profit margin = (price – cost) / price x 100; markup = (price – cost) / cost x 100; required price for a target margin = cost / (1 – target margin); margin from markup = markup / (1 + markup). Reference values: cost $80 and price $100 give profit $20.00, margin 20 percent, markup 25 percent. Additional worked values: cost $60 with 40 percent target margin requires price $100 (markup 66.67 percent); $100,000 revenue with $62,000 cost gives 38 percent margin; a $60 cost with 50 percent markup gives $90 price and 33.33 percent margin, while 50 percent margin gives $120 price and 100 percent markup. Inputs: cost in dollars, selling price in dollars or target margin percent. Outputs: profit in dollars, margin percent, markup percent, required price.
Margin is profit ÷ selling price; markup is profit ÷ cost. A 20% margin equals a 25% markup — same $20 profit, different base.
(Selling price − cost) ÷ selling price × 100. $100 price minus $80 cost = $20 ÷ $100 = 20%.
Price = Cost ÷ (1 − margin%). For a 20% margin on an $80 cost: 80 ÷ 0.8 = $100.
No — margin tops out just under 100%. Markup, though, can exceed 100% freely.
It varies by industry — around 10% is healthy for many businesses, 20%+ is strong for retail and services.
Gross margin is (revenue minus cost of goods sold) divided by revenue, and it measures whether the core product economics work. Net margin is net income divided by revenue after subtracting everything, including rent, salaries, marketing, interest, and taxes. For example, $500,000 of revenue with $300,000 of product costs gives a 40 percent gross margin, but after $120,000 of operating expenses and $20,000 of taxes, net income is $60,000 and the net margin is only 12 percent.
Use the formula: margin = markup / (1 + markup). A 25 percent markup becomes 0.25 / 1.25 = 20 percent margin. A 100 percent markup becomes 1.00 / 2.00 = 50 percent margin. Going the other way, markup = margin / (1 – margin): a 40 percent margin requires a 66.67 percent markup.
Because margin is a rate and profit is an amount. A business with $1,000,000 of revenue and $50,000 of profit has only a 5 percent margin, while a business with $100,000 of revenue and $40,000 of profit has a 40 percent margin but less money in absolute terms. Dollars pay the bills; the percentage measures efficiency. Compare your margin with similar businesses in your industry rather than judging it in isolation.
Sources: standard accounting references, including generally accepted accounting principles (GAAP) guidance and widely used corporate finance texts.
Also try our Sales Tax Calculator and Investment Calculator — or browse all Financial Calculators.