Skip to content

Profit Margin Calculator

Find profit and margin from a cost and revenue, or the selling price needed to hit a target margin.

Choose a calculation

Find profit and profit margin from a known cost and revenue (selling price).

Result

How to Use

  1. Choose which calculation you need from the options above the form.
  2. Enter the cost, and either the revenue you received or the margin percentage you want to hit.
  3. The result updates instantly, showing profit and the corresponding markup percentage alongside the margin.
  4. Use Copy Result to copy the answer to your clipboard.

Formula

Margin from cost + revenue
margin% = (revenue − cost) ÷ revenue × 100
Selling price from cost + margin
selling_price = cost ÷ (1 − target_margin% ÷ 100)

Worked Example

A $100 cost sold for $130.

  1. Profit: $130.00 − $100.00 = $30.00
  2. Margin: $30.00 ÷ $130.00 × 100 = 23.08%
  3. For comparison, that same $30 profit is a 30% markup (profit ÷ cost) — margin and markup are never the same number for the same sale.

Result: Profit: $30.00 (margin 23.08%, markup 30%)

About This Tool

What this tool does

This calculator finds profit and profit margin from a known cost and revenue, and shows the corresponding markup percentage alongside every result. It can also work backwards: given a cost and a target margin, it finds the selling price needed to hit that margin.

When to use it

Use it to check the actual margin a sale produced, or to price something so it hits a specific margin target — a common way retailers and service businesses set prices.

What the result means

Margin is profit expressed as a percentage of revenue (selling price). Markup is profit expressed as a percentage of cost — a genuinely different number for the same sale, always shown alongside the margin result here so the two are never confused. See the Markup Calculator for the tool built the other way around, starting from a markup percentage instead of a margin target.

Assumptions & limitations

Cost and revenue must be zero or greater; zero revenue makes margin undefined (division by zero) and is rejected. A target margin must be between 0% and just under 100% — a margin at or above 100% would require an infinite price relative to cost. Solving for a price from a $0 cost is rejected too: at $0 cost, any positive price is already a 100% margin, so no other target margin has a meaningful answer.

Frequently Asked Questions

What is the difference between profit margin and markup?
Margin is profit as a percentage of revenue (what the customer paid); markup is profit as a percentage of cost (what it cost you). A $30 profit on a $100 cost sold for $130 is a 23.08% margin but a 30% markup — margin is always a smaller percentage than markup for the same profitable sale.
How do I calculate profit margin?
Subtract cost from revenue to get profit, then divide profit by revenue and multiply by 100. A $130 sale that cost $100 has a $30 profit and a 23.08% margin.
How do I price something to hit a 40% margin?
Divide the cost by (1 minus the margin as a decimal). A $60 cost at a 40% margin target needs a selling price of $60 ÷ 0.60 = $100.