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

Enter your numbers and press Calculate to see the result.

Calculating…

Profit margin and markup calculator for pricing products or services

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.

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