Margin Calculator

Calculate gross margin, markup, and profit from cost and selling price. Understand the difference between margin and markup.

Know cost and selling price

$
$
Profit$20.00
Gross Margin20.00%
Markup25.00%

Margin vs. Markup Comparison

Markup %Margin %Cost $100 sells for
10%9.09%$110.00
20%16.67%$120.00
25%20%$125.00
33.33%25%$133.33
50%33.33%$150.00
100%50%$200.00
200%66.67%$300.00

How to Use the Margin Calculator

This profit margin calculator solves three of the most common pricing questions in one place: what margin am I earning, what price do I need to charge to hit a target markup, and what profit does a given margin produce on my revenue. Use it as a gross margin calculator when you know cost and selling price, as a pricing tool when you know cost and a target markup, or as a net margin calculator for revenue-based profit planning.

  1. Pick the mode. Switch between the Margin, Markup, and Profit tabs at the top. Each tab solves for different unknowns, so start with whatever numbers you already have.
  2. Margin mode (cost + selling price): Enter what the item costs you and what you sell it for. The calculator returns the profit per unit, the gross margin percentage, and the equivalent markup percentage.
  3. Markup mode (cost + markup %): Enter the cost and the markup you want to apply. The result gives the selling price, the per-unit profit, and the actual margin that markup produces.
  4. Profit mode (revenue + margin %): Enter total revenue and a target profit margin. The result splits revenue into cost and profit so you know how much room you have for COGS and overhead.
  5. Read the comparison table. The margin vs markup table at the bottom converts between the two so you can sanity-check a supplier quote or spreadsheet formula.

One warning before you run numbers: margin and markup are not the same thing. A 25% markup is only a 20% margin. A 50% markup is a 33.3% margin. Retailers and accountants almost always quote margin (profit as a share of selling price), while manufacturers and wholesalers often quote markup (profit as a share of cost). Confusing the two is the single most common pricing mistake, and it always produces prices that are too low.

Margin vs. Markup Formulas

Gross Margin is based on revenue (selling price):

Gross Margin % = (Selling Price − Cost) ÷ Selling Price × 100

Example: Cost $80, Selling Price $100. Margin = ($100 − $80) ÷ $100 = 20%.

Markup is based on cost:

Markup % = (Selling Price − Cost) ÷ Cost × 100

Same example: Markup = $20 ÷ $80 = 25%.

Converting between margin and markup:

Margin = Markup ÷ (1 + Markup) Markup = Margin ÷ (1 − Margin)

A 25% markup = 20% margin. A 50% markup = 33.3% margin. These look similar but are very different. Using the wrong one can lead to mispriced products.

Gross Margin Formula

Gross margin measures how much of every revenue dollar is left after paying for the direct cost of producing or buying the product. It is the cleanest measure of pricing power.

Gross Margin % = (Revenue − COGS) ÷ Revenue × 100

Worked example: a coffee shop sells $50,000 of drinks in a month. The beans, milk, and cups cost $15,000. Gross Margin = ($50,000 − $15,000) ÷ $50,000 × 100 = 70%.

Net Margin Formula

Net margin is what actually ends up in the owner's pocket after every expense: COGS, rent, payroll, marketing, interest, and taxes.

Net Margin % = Net Income ÷ Revenue × 100

Worked example: the same coffee shop has $50,000 in revenue and $4,000 of net income after all expenses and taxes. Net Margin = $4,000 ÷ $50,000 × 100 = 8%.

Operating Margin Formula

Operating margin sits between gross and net. It subtracts COGS and day-to-day operating expenses (rent, salaries, utilities, marketing), but not interest or taxes. It is the margin investors watch to judge how well a business is being run.

Operating Margin % = Operating Income ÷ Revenue × 100

Worked example: $50,000 revenue, $15,000 COGS, $28,000 operating expenses. Operating Income = $50,000 − $15,000 − $28,000 = $7,000. Operating Margin = $7,000 ÷ $50,000 × 100 = 14%.

Margin vs Markup Conversion Table

Use this table to translate a quoted markup into the actual margin it produces, or vice versa. It is the fastest check when a vendor or spreadsheet mixes up the two.

MarginEquivalent MarkupIf cost is $100, sells for
10%11.1%$111.11
20%25.0%$125.00
25%33.3%$133.33
33.3%50.0%$150.00
50%100.0%$200.00
60%150.0%$250.00
75%300.0%$400.00
80%400.0%$500.00

Notice how fast the gap widens. A 75% margin only requires a 3× markup over cost, but a 90% margin requires a 9× markup. This is why software and digital goods, where the marginal cost is near zero, can post margins that look absurd compared to physical retail.

Industry Benchmarks, Margin Types, and How to Improve Them

A margin percentage calculator gives you a number. What that number means depends entirely on what kind of business you are in, which margin you are looking at, and how the cost structure behaves as volume changes. This section puts the output of the gross margin calculator above into real-world context so you can tell whether a 30% margin is a triumph or a warning sign.

Typical Gross Margins by Industry

There is no universal "good" profit margin. What matters is how you compare to peers in your own industry. Gross margins vary by an order of magnitude across sectors, mostly because of cost structure and volume. A grocery store earning 2% on $50 million of revenue is thriving; a software company earning 2% is in crisis.

IndustryTypical Gross MarginWhy
Software (SaaS)70% to 90%Near-zero marginal cost per customer
Pharmaceuticals (branded)65% to 85%Patent protection and low unit cost
Jewelry40% to 50%High markup on precious materials
Retail apparel40% to 60%Brand pricing power, seasonal markdowns
Consumer staples (CPG)30% to 40%Competitive shelves, distribution costs
Construction15% to 25%Materials, labor, permitting
Restaurants5% to 15% (net)Food cost, labor, rent
Airlines3% to 8%Fuel, aircraft, labor, fixed routes
Grocery1% to 3% (net)Volume business, razor-thin unit margins

If you run a restaurant with a 12% net margin, you are outperforming the industry. If you run a SaaS business with a 12% gross margin, something is wrong: either your cloud bill is out of control or you are underpricing by a factor of five.

Gross vs Operating vs Net Margin: Which One Matters

All three margin numbers come off the same income statement, but they answer different questions:

  • Gross margin tells you whether your pricing covers what it costs to make the product. If gross margin is negative, no amount of volume will save you. Fix pricing or COGS first.
  • Operating margin tells you whether the day-to-day business is profitable before financing decisions. Two companies can have the same gross margin but very different operating margins because one spent heavily on sales and marketing.
  • Net margin tells you what actually lands in the bank after everything, including taxes and loan interest. This is the number that determines whether the owner gets paid.

A common pattern: a business has a healthy 45% gross margin but only a 3% net margin because rent, payroll, and marketing eat the rest. Cutting COGS by one point helps, but the bigger lever is operating expense. Gross margin sets the ceiling; operating discipline determines how close you get to it.

Contribution Margin for Pricing Decisions

Contribution margin is gross margin's smarter cousin. It subtracts only the costs that vary with each unit sold (materials, shipping, payment processing) and ignores fixed costs like rent and salaried staff. Contribution margin tells you how much each additional sale contributes toward covering fixed costs and then profit.

Contribution Margin per unit = Price − Variable Cost per unit Contribution Margin % = (Price − Variable Cost) ÷ Price × 100

Example: a bakery sells a cake for $40. Ingredients, packaging, and card processing total $12 per cake. Contribution margin per cake is $28, or 70%. If monthly fixed costs (rent, equipment, the head baker's salary) total $14,000, the bakery must sell $14,000 ÷ $28 = 500 cakes per month to break even. Every cake beyond 500 drops $28 to the operating line. This is the number to focus on when deciding whether to accept a bulk discount, drop a product, or run a promotion.

How to Improve Your Profit Margin

Three real levers move the needle on margin. Most owners reach for the first one because it is obvious, but the other two often move more profit with less risk.

  • Raise prices. A 5% price increase with no volume loss drops straight to the bottom line, often doubling net margin for thin-margin businesses. Test on a product subset before doing it across the board. Most customers do not notice price moves under 7%.
  • Cut COGS. Renegotiate supplier contracts, change pack sizes, or switch materials on cost-sensitive products. A 3% COGS cut on a 30% gross margin business raises gross margin to 32%, which can mean a 20% to 30% jump in net income after fixed costs are already covered.
  • Improve product mix. Push high-margin products in bundles, upsells, and prominent shelf placement. A grocery store's hot bar earns 60% gross margin; its bananas earn 10%. Shifting mix toward the hot bar with the same total revenue can lift overall margin by several points without any price change.

Discounting is the fourth lever, and it almost always shrinks margin. A 10% discount on a product with a 30% gross margin wipes out a third of the gross profit on every unit sold. You have to sell 50% more units just to hold gross profit flat. Run the math before running the sale.

Frequently Asked Questions

Margin is profit as a percentage of the selling price. Markup is profit as a percentage of the cost. On a product that costs $80 and sells for $100: the margin is 20% ($20 profit ÷ $100 selling price) and the markup is 25% ($20 profit ÷ $80 cost). Retailers and accountants usually prefer margin; manufacturers and wholesalers often use markup. Make sure you know which one you are looking at before setting prices.

Related Calculators