Profit Margin Calculator

Work out profit, profit margin and markup from a cost and a selling price.

  • Runs locally in your browser
  • No upload required

Try it

Profit
40
Profit margin
40%
Markup
66.6667%
Formula
margin = (revenue − cost) / revenue × 100 = (100 − 60) / 100 × 100

Supported formats

Input
number
Output
number, text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

A price of 100 on a cost of 60 gives a profit of 40, a margin of 40% and a markup of 66.6667%.

How it works

  • Subtracted the cost from the revenue to get the profit.
  • Divided the profit by the revenue and multiplied by 100 for the margin.
  • Divided the profit by the cost and multiplied by 100 for the markup (undefined at zero cost).
textSelect to copy
margin = (revenue − cost) / revenue × 100 = (100 − 60) / 100 × 100
  • A negative profit means the price is below cost; the margin is then negative too.
  • This is an illustration for information only, not accounting or financial advice.

Methodology

  1. Profit = revenue − cost.
  2. Profit margin = profit ÷ revenue × 100.
  3. Markup = profit ÷ cost × 100, reported only when the cost is greater than zero.
  4. Results are rounded half-up to two decimals for money and four for percentages.

Usage

  1. Enter the unit or total cost.
  2. Enter the selling price (revenue).
  3. Read the profit, the profit margin and the markup.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Healthy retail margin

jsonSelect to copy
{
  "cost": 60,
  "revenue": 100
}

Sold at cost

jsonSelect to copy
{
  "cost": 80,
  "revenue": 80
}

Sold at a loss

jsonSelect to copy
{
  "cost": 120,
  "revenue": 100
}

Limitations

Disclaimer

This calculator is an illustration for information only and is not accounting or financial advice. It does not know your real cost base or tax position. Confirm the figures against your own records.

Frequently asked questions

What is the difference between margin and markup?
Margin is the profit as a percentage of the selling price; markup is the same profit as a percentage of the cost. A 40% margin is the same money as a 66.7% markup.
Why is markup blank when the cost is zero?
Markup divides the profit by the cost, so a zero cost has no defined markup; the margin is still reported.

Sources

  1. ISO 80000-2:2019 Quantities and units — Part 2: Mathematics — ISO (accessed 2026-10-11)