Skip to main content
calclumo

Finance

Profit Margin & Markup Calculator

Calculate gross profit, margin, markup, and a target selling price.

Compare cost and selling price, account for a discount, and see gross profit, margin, markup, revenue, and the price required for your target margin.

Result

Example with the values filled in above

Gross profit margin

37.5%

$30.00 profit per unit | 60% markup

Target price for 40% margin: $83.33

Profit and pricing breakdown
Effective unit price $80.00 No discount
Revenue $8,000.00 100 units
Cost of goods $5,000.00 $50.00 per unit
Gross profit $3,000.00 37.5% of revenue
Target selling price $83.33 40% target margin

Change any value and press Calculate for your own result.

Calculating…

Add this calculator to your website

Free to embed on any site, blog, or course page. Paste this where you want it to appear — it adjusts to the width of your column and needs no sign-up.

Gross margin by industry

0%25%50%75%100%Banks (Regional): 99.6%Banks (Regional)99.6%Drugs (Pharmaceutical): 71.7%Drugs (Pharmaceutical)71.7%Software (System & Application): 71.7%Software (System & Application)71.7%Tobacco: 64.3%Tobacco64.3%Hotel/Gaming: 60.9%Hotel/Gaming60.9%Semiconductor: 59%Semiconductor59%Telecom Services: 58.8%Telecom Services58.8%Oil/Gas (Production): 57.2%Oil/Gas (Production)57.2%Apparel: 56.9%Apparel56.9%Precious Metals: 55%Precious Metals55%Beverage (Soft): 54.7%Beverage (Soft)54.7%Healthcare Products: 54%Healthcare Products54%Education: 45.8%Education45.8%Insurance (General): 44.7%Insurance (General)44.7%Power: 43.6%Power43.6%Entertainment: 41.4%Entertainment41.4%Computers/Peripherals: 38.4%Computers/Peripherals38.4%Machinery: 37.5%Machinery37.5%Advertising: 36.2%Advertising36.2%Metals & Mining: 34.7%Metals & Mining34.7%Restaurant/Dining: 32.2%Restaurant/Dining32.2%Building Materials: 30.9%Building Materials30.9%Electronics (General): 26.8%Electronics (General)26.8%Retail (Grocery): 26.3%Retail (Grocery)26.3%Construction Supplies: 25.5%Construction Supplies25.5%Food Processing: 23.2%Food Processing23.2%Aerospace/Defense: 17.5%Aerospace/Defense17.5%
US-listed firms, 2026-01. The market-wide average is 37.8% gross and 9.7% net — a gross margin says nothing about overheads. Source: NYU Stern (Damodaran Online), Operating and Net Margins by Industry
Show the numbers
Industry Gross margin
Banks (Regional) 99.6%
Drugs (Pharmaceutical) 71.7%
Software (System & Application) 71.7%
Tobacco 64.3%
Hotel/Gaming 60.9%
Semiconductor 59%
Telecom Services 58.8%
Oil/Gas (Production) 57.2%
Apparel 56.9%
Precious Metals 55%
Beverage (Soft) 54.7%
Healthcare Products 54%
Education 45.8%
Insurance (General) 44.7%
Power 43.6%
Entertainment 41.4%
Computers/Peripherals 38.4%
Machinery 37.5%
Advertising 36.2%
Metals & Mining 34.7%
Restaurant/Dining 32.2%
Building Materials 30.9%
Electronics (General) 26.8%
Retail (Grocery) 26.3%
Construction Supplies 25.5%
Food Processing 23.2%
Aerospace/Defense 17.5%

Pricing a product or service from its cost

Use this profit margin calculator to compare unit cost with selling price and calculate gross profit, gross margin, markup percentage, revenue, and a target selling price. It is useful for retail pricing, e-commerce products, wholesale quotes, handmade goods, food costs, freelance services, and any situation where you need to work out how much profit is left after direct cost. The optional quantity and discount fields show how promotional pricing changes total profit.

Gross profit, margin, and markup formulas

Gross profit = selling price − cost

Profit margin % = gross profit ÷ selling price × 100

Markup % = gross profit ÷ cost × 100

Target selling price = cost ÷ (1 − target margin as a decimal)

Margin versus markup: why the percentages differ

Profit margin and markup use the same profit amount but compare it with different starting figures. Margin is profit as a percentage of revenue; markup is profit as a percentage of cost. If a product costs $50 and sells for $80, gross profit is $30. The markup is 30 ÷ 50 = 60%, while the gross margin is 30 ÷ 80 = 37.5%. Calling a 60% markup a 60% margin would substantially understate the selling price required.

How to calculate a target selling price

If a unit costs $60 and you want a 40% gross margin, divide $60 by 1 − 0.40. The required selling price is $100, leaving $40 gross profit. Simply adding 40% to cost would produce an $84 price: that is a 40% markup but only a 28.57% margin. The target-margin result helps avoid this common pricing mistake.

How discounts affect gross margin

A sale discount reduces revenue without reducing the unit cost you already paid. A $100 item that costs $60 has $40 profit and a 40% margin. After a 20% customer discount, the effective price is $80, profit falls to $20, and margin falls to 25%. This is why a 20% discount can cut profit by much more than 20%. Enter a proposed coupon or sale percentage to check the after-discount margin before publishing a promotion.

What should be included in product cost?

For a useful gross margin calculation, include the direct costs required to deliver one unit. Depending on the business, that may include purchase price, raw materials, production labor, packaging, inbound freight, marketplace fees, and payment processing. Fixed overhead such as rent, software, marketing, salaries, and tax is normally considered later when calculating operating or net profit. If important variable fees are omitted, the displayed product margin will be higher than the margin the business actually earns.

Gross margin is not net profit margin

Gross profit is revenue minus direct cost of goods sold. Net profit goes further and subtracts operating expenses, interest, taxes, refunds, and other costs. This calculator is designed for unit economics and pricing decisions, not a full profit-and-loss statement. A positive gross margin can still lead to a net loss if overhead is too high.

What margins look like by industry

A margin only means something against the margins of comparable businesses. These are averages across 5,994 US-listed firms as of January 2026, from NYU Stern (Damodaran Online), Operating and Net Margins by Industry; checked 17 September 2026.

IndustryGross marginNet marginFirms
Semiconductor 58.97% 30.45% 66
Precious Metals 55.02% 28.59% 56
Banks (Regional) 99.62% 27.49% 568
Tobacco 64.31% 26.65% 10
Software (System & Application) 71.72% 25.49% 309
Drugs (Pharmaceutical) 71.73% 18.54% 228
Computers/Peripherals 38.36% 17.78% 36
Oil/Gas (Production) 57.19% 14.63% 142
Telecom Services 58.82% 14.20% 39
Beverage (Soft) 54.74% 13.40% 27
Power 43.57% 12.73% 46
Insurance (General) 44.70% 12.37% 21
Construction Supplies 25.52% 10.78% 40
Machinery 37.47% 10.58% 105
Metals & Mining 34.68% 10.52% 73
Hotel/Gaming 60.85% 10.38% 63
Healthcare Products 54.00% 9.61% 204
Restaurant/Dining 32.24% 9.37% 64
Education 45.82% 8.79% 32
Building Materials 30.94% 7.42% 41
Electronics (General) 26.76% 6.47% 114
Aerospace/Defense 17.48% 4.99% 79
Entertainment 41.39% 4.43% 92
Apparel 56.88% 3.85% 35
Food Processing 23.23% 2.82% 78
Retail (Grocery) 26.31% 1.32% 15
Advertising 36.24% -0.30% 52
Whole market 37.76% 9.74% 5,994

The net column is the one that resets expectations. Semiconductor keeps 30.45 cents of every dollar of revenue; Retail (Grocery) keeps 1.32 — 23 times less on the same dollar. A grocery chain is not badly run for earning 1%; that is what the business is. Judging your own margin against a number from another industry is the most common way to reach a wrong conclusion from a correct calculation.

Gross and net do not move together. Software (System & Application) and Restaurant/Dining are the clean illustration: 71.72% gross against 32.24%, but the gap at the net line is much narrower (25.49% against 9.37%). Software's cost of sales is small and its operating costs are enormous; a restaurant's are the other way round. A high gross margin is an invitation to spend, not a guarantee of profit.

One row to read sceptically: Banks (Regional) at 99.62% gross. Banks have almost no cost of goods sold in the accounting sense, so gross margin is close to meaningless for them and the net figure is the only one worth comparing. Any industry whose product is money will do this.

Practical pricing checks

  • Calculate the margin at the normal list price and again at the deepest planned discount.
  • Use quantity to estimate revenue, total direct cost, and gross profit for an order or sales forecast.
  • Compare the target price with competitor prices and the value customers receive.
  • Review cost regularly when supplier prices, shipping, or transaction fees change.

Cost of sales (COGS) and cost percentage

Cost of sales is what the goods you actually sold cost you — not what you bought during the period. The difference is stock movement, and skipping it is the most common error in a first set of accounts:

cost of sales = opening stock + purchases − closing stock

Expressed against revenue it becomes the cost percentage, the figure most operators watch weekly:

cost percentage = cost of sales ÷ revenue × 100

A restaurant with $8,000 opening stock, $42,000 of purchases and $7,000 closing stock has a cost of sales of $43,000. On $140,000 of revenue that is a 30.7% cost percentage — and a 69.3% gross margin.

Working cost of sales back from margin or markup

If you know the selling price and either the margin or the markup, you can recover the cost without touching the stock figures. The two look similar and give different answers, which is exactly why they get confused:

You knowFormulaExample on $100 revenue
Gross profit percentage (margin)cost = revenue × (1 − margin)40% margin → cost is $60
Markup percentagecost = revenue ÷ (1 + markup)40% markup → cost is $71.43

Margin is measured against the selling price; markup is measured against the cost. A 40% markup is only a 28.6% margin, so quoting one when you meant the other quietly moves the profit on every line you price.

Cost per portion

Food and manufacturing costing works the same way one level down: total the recipe's ingredients at purchase price, then divide by the number of portions it yields.

cost per portion = total recipe cost ÷ portions yielded

Two adjustments make the figure real. Cost ingredients at as-purchased weight rather than trimmed weight, since you paid for the trim. And add a wastage allowance — typically 2–5% — or the portion cost will read lower than the shelf ever does.

To add VAT or sales tax after setting a price, use the VAT and sales tax calculator. For a customer-facing promotion with stacked reductions, see the discount calculator. These calculations are planning estimates and not accounting or tax advice.

Profit Margin & Markup Calculator — frequently asked questions

How do I calculate cost of sales?

Opening stock plus purchases minus closing stock. That gives what the goods you actually sold cost you, rather than what you spent buying stock during the period.

How do I work out cost of sales from a gross profit percentage?

Multiply revenue by (1 minus the margin). At 40% gross profit on $100 of revenue, cost of sales is $60.

How do I work out cost of sales from a markup percentage?

Divide revenue by (1 plus the markup). At 40% markup on $100 of revenue, cost is $71.43 — not $60, because markup is measured against cost while margin is measured against the selling price.

How do I calculate cost per portion?

Divide the total recipe cost by the number of portions it yields. Price ingredients at as-purchased weight rather than trimmed weight, and add a wastage allowance of roughly 2 to 5%.

What is the difference between margin and markup?

Margin divides gross profit by selling price, while markup divides gross profit by cost. If an item costs $50 and sells for $75, profit is $25, markup is 50%, and margin is 33.33%.

How do I calculate profit margin?

Subtract cost from selling price, divide the profit by selling price, and multiply by 100: margin = (price − cost) ÷ price × 100.

How do I calculate selling price from a target margin?

Divide cost by one minus the target margin as a decimal. A $60 cost with a 40% target margin needs a selling price of $60 ÷ 0.60 = $100.

Does a discount reduce profit margin?

Yes. A discount lowers the effective selling price while cost stays the same, so both gross profit and margin fall. The calculator shows the after-discount price and margin.

Is gross profit the same as net profit?

No. Gross profit subtracts product or service cost from revenue. Net profit also accounts for operating expenses, taxes, interest, payment fees, and other business costs.

Related calculators