Business & pricing
Profit margin calculator
Compare cost with selling price or revenue, plan a price from a desired margin or markup, and see exactly which base each percentage uses.
Works locally in your browser
How this tool works
This calculator separates three figures that are often mixed together. Profit is the amount left after subtracting the entered cost from revenue. Margin expresses that profit as a percentage of revenue, while markup expresses it as a percentage of cost.
Use an analysis mode when you know actual cost and revenue or selling price. Use a planning mode when you know cost and want to derive a selling price from a target margin or markup. Every calculation stays in your browser.
Inputs and definitions
- Cost should include the expenses you intend the result to cover. The calculator cannot decide whether labour, shipping, tax, platform fees, or overhead belong in your cost.
- Selling price or revenue is the amount earned before subtracting the entered cost. A value below cost correctly produces a loss and negative rates.
- Desired margin or markup is entered as a percentage number, such as 40 for 40%. Desired margin must be below 100%.
Select the number format before typing amounts. Currency selection changes symbols and standard display conventions only; it does not convert values or apply an exchange rate.
Methodology
profit = revenue - costmargin % = profit / revenue × 100; markup % = profit / cost × 100For a target margin, the calculator divides cost by one minus the margin rate. For a target markup, it multiplies cost by one plus the markup rate. Intermediate values retain decimal working precision before display rounding.
Assumptions
- Amounts refer to the same period, quantity, and currency; no currency conversion is performed.
- Analysis inputs and planning rates are zero or positive. Negative margin and markup still appear when revenue is below cost.
- Results use decimal arithmetic with up to 80 significant digits, while the selected decimal places affect display only.
Worked examples
Analyse a cost of 60 and price of 100
An item costs 60 in the chosen currency and sells for 100.
Find profit
Subtract 60 from 100 to obtain a profit of 40.
Use the two percentage bases
Divide 40 by revenue of 100 for 40% margin, then divide 40 by cost of 60 for approximately 66.67% markup.
Profit is 40, margin is 40%, and markup is approximately 66.67%.
Plan a price with 50% markup
A product costs 60 and the planned markup is 50%.
Convert and apply the markup
Convert 50% to 0.5 and multiply 60 by 1.5 to obtain a selling price of 90.
Check the resulting margin
The profit is 30; dividing it by revenue of 90 gives approximately 33.33% margin.
The required selling price is 90, producing 50% markup and approximately 33.33% margin.
Limitations and common mistakes
The result is a direct gross calculation over the amounts supplied. It is not automatically net profit, because unentered operating expenses, finance costs, taxes, returns, discounts, and fees are excluded.
Margin is not defined when revenue is zero, and markup is not defined when cost is zero. Those cases are labelled explicitly instead of displaying Infinity. A desired margin of 100% is rejected because the required-price denominator becomes zero.
Frequently asked questions
Why is margin lower than markup for a profitable sale?
The same profit is divided by revenue for margin and by the smaller cost amount for markup. Different denominators produce different percentages.
Does changing currency convert my amounts?
No. Currency selection changes formatting only. Enter cost and revenue in the same currency and perform any exchange-rate conversion separately.
Why does the calculator show a negative percentage?
When selling price or revenue is below cost, profit is negative. Margin and markup are therefore negative and the result is labelled as a loss.
Is this gross margin or net margin?
It is a direct calculation from the cost and revenue you enter. It behaves like gross margin only if cost represents the relevant cost of sales, and like net margin only if cost includes every expense you intend to deduct.
Sources
- Prepare an Income Statement, Statement of Owner's Equity, and Balance Sheet — OpenStax (accessed )
- Manage your finances — U.S. Small Business Administration (accessed )
Method and content record
The method, examples and limitations describe how this tool works. Recorded checks do not establish independent professional review.
Record attribution, date and versions
Record attribution: ToolsOrigin calculation review.
Record date: .
Content version 1.0.0. Engine version 1.0.0.