AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I calculate profit margin and markup?

Pick a mode in AnyTool Margin Calculator and type your numbers. From a cost and selling price it works out the gross profit (price − cost), the margin as a share of the price (margin = profit ÷ price × 100) and the markup as a share of the cost (markup = profit ÷ cost × 100). It can also price an item from a target margin (price = cost ÷ (1 − margin ÷ 100)), price it from a target markup (price = cost × (1 + markup ÷ 100)), or back out the cost a known price and margin imply. The key clarification it makes is that margin and markup are not the same number — markup is always the larger figure — and the breakdown appears live, entirely in your browser.

  • Gross profit = selling price − cost
  • Margin % = profit ÷ price × 100 (a share of the price/revenue)
  • Markup % = profit ÷ cost × 100 (a share of the cost)
  • Margin and markup differ: a 50% markup is only a 33.3% margin
  • 100% in your browser — no upload, no signup, works offline

What is

Profit margin and markup

Profit margin and markup both express the gross profit on a sale, but against different bases. Gross margin is profit as a percentage of the selling price (revenue): margin = (price − cost) ÷ price. Markup is profit as a percentage of the cost: markup = (price − cost) ÷ cost. Because the price exceeds the cost on a profitable sale, the markup percentage is always larger than the margin percentage for the same item, and the two convert as markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup). These are gross figures and exclude overheads, fees and taxes.

Calculators

Related terms

Gross marginMarkupGross profitCost of goodsSelling priceRevenue

Frequently Asked Questions

Margin is profit as a share of the price; markup is profit as a share of the cost. A 50% markup is only a 33.3% margin, so they are never the same number.

Margin and markup describe the same profit but divide it by different things: margin = profit ÷ selling price, while markup = profit ÷ cost. Since the price is larger than the cost, the markup percentage is always higher than the margin percentage. A 50% markup equals a 33.3% margin, and a 50% margin equals a 100% markup. AnyTool Margin Calculator shows both side by side and converts between them so you never confuse the two when pricing.

Divide the cost by (1 − margin ÷ 100). A $50 cost at a 30% margin sells for $50 ÷ 0.70 = $71.43.

To price an item for a target gross margin, divide the cost by (1 − margin ÷ 100), because the cost has to be the remaining share of the price after the margin. A $50 cost at a 30% margin gives $50 ÷ 0.70 = $71.43, a $21.43 profit. If you instead want a target markup, multiply the cost by (1 + markup ÷ 100). AnyTool computes both directions live and shows the resulting margin, markup and profit.

Profit is price minus cost, and margin is that profit divided by the price. $80 sold on a $50 cost is $30 profit and a 37.5% margin.

First find the gross profit as selling price minus cost, then divide by the selling price for the margin and by the cost for the markup. An item costing $50 and sold for $80 has a $30 profit, a 37.5% margin (30 ÷ 80) and a 60% markup (30 ÷ 50). AnyTool Margin Calculator returns all three at once and shows the worked formula for each.

Yes, it is free with no signup, and nothing is uploaded — every calculation runs in your browser and the page works offline.

AnyTool Margin Calculator is completely free with no account or limits, and all math runs on a small, unit-tested engine entirely in your browser, so the cost and price figures you type are never sent to a server. The numbers are gross margin and markup from a single cost and price, so they exclude overheads, shipping, payment fees, returns and taxes — your net margin will be lower.

Detailed Explanation

Methodology

How the Margin Calculator Works

The calculator offers four solve-for modes built on the cost–price–profit identity. From a cost and selling price it returns gross profit = price − cost, margin = profit ÷ price × 100 and markup = profit ÷ cost × 100. From a cost and a target margin it prices the item as price = cost ÷ (1 − margin ÷ 100). From a cost and a target markup it prices it as price = cost × (1 + markup ÷ 100). From a selling price and a target margin it backs out the cost as cost = price × (1 − margin ÷ 100). Every result is produced by a pure function in a small, unit-tested engine, with the worked formula and gross profit shown live as you type.

  • Gross profit = selling price − cost
  • Margin % = profit ÷ price × 100 (share of revenue)
  • Markup % = profit ÷ cost × 100 (share of cost)
  • Price from margin: price = cost ÷ (1 − margin ÷ 100)
  • Price from markup: price = cost × (1 + markup ÷ 100)
How It Works

Margin Is Not Markup — They Use Different Bases

The single most common pricing mistake is treating margin and markup as the same number. Both express the same gross profit, but margin divides it by the selling price while markup divides it by the cost. Because the price is larger than the cost on a profitable sale, the markup percentage is always higher than the margin percentage for the same item. They convert exactly: markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup). So a 50% markup is only a 33.3% margin, and a 50% margin is a 100% markup. Charging a "50% margin" when a supplier quoted a "50% markup" silently under-prices the item, which is why the tool shows both figures together and converts between them.

  • Margin is a share of price; markup is a share of cost
  • Markup % is always larger than margin % for the same item
  • markup = margin ÷ (1 − margin); margin = markup ÷ (1 + markup)
  • A 50% markup = 33.3% margin; a 50% margin = 100% markup
  • Tool shows margin and markup side by side to avoid the mix-up
Limitations

Gross Figures, Rounding and What This Cannot Decide

These are gross margin and markup computed from a single cost and selling price. They deliberately exclude overheads, labour, shipping, payment-processing fees, returns, discounts and taxes, so the net margin a business actually keeps will be lower than the gross margin shown. The calculator also does not model volume tiers, currency conversion or per-unit versus total figures beyond the single pair entered. A 100% (or higher) margin is rejected because it would require an infinite price, and a price below cost is reported as a loss with a negative margin rather than an error. Figures are rounded to two decimals for display while full precision is used in the math.

  • Gross only — excludes overheads, fees, returns and taxes
  • Net margin will be lower than the gross margin shown
  • A 100%+ margin is impossible (it implies an infinite price)
  • A price below cost is reported as a loss (negative margin)
  • An estimator for pricing — not an accounting or P&L system
Privacy & Security

Privacy and Offline Use

Because all computation runs in the browser, the cost and price figures you enter are never sent to a server, there is no account or tracking, and the page works offline after first load. The calculator is built on a shared, unit-tested margin engine so its behaviour is consistent and verifiable across all four modes, and the full breakdown — profit, margin, markup and the worked formula — can be copied to the clipboard with one tap.

Margin calculation: in-browser (AnyTool) vs typical online margin calculators
CapabilityAnyToolTypical online margin calculators
ProcessingRuns in your browserOften server-side
Solve-for modes4 (cost+price, target margin, target markup, find cost)Usually 1–2
Margin vs markupBoth shown and convertedOften conflated
Margin ↔ markup conversionExplicit (50% markup = 33.3% margin)Rarely shown
Worked formulaShown for every resultUsually result only
CurrenciesSevenOften one
Works offlineYes (PWA)No
Cost / signupFree, no signupOften ad-heavy or gated

AnyTool computes margins locally and uploads nothing. Comparison as of June 2026.