Margin Calculator

Profit margin and markup from any two figures — plus the margin required to trade stocks or currency on leverage.

Change any value to update the result instantly
Cost
$
Revenue
$
Margin
%
Profit
$
Fill in any two of the four and the other two are worked out. Type in a third and the oldest entry becomes a result instead.
Profit Margin
0.00%
Margin at Different Prices

Margin is measured against revenue, so it moves faster than the price does. A small price change can shift the margin a surprising amount when costs stay fixed.

Margin and Markup Side by Side
Where the Revenue Goes

What This Calculator Works Out

The word margin does two unrelated jobs in finance, and this page covers both. In business it is the share of revenue you keep after costs. In trading it is the money a broker requires you to put up before lending you the rest. Same word, entirely different arithmetic.

The first tab opens on an ordinary retail case: something costing $185 sold for $260. That is $75 of profit, a 28.85% margin and a 40.54% markup — two very different percentages describing exactly the same seventy-five dollars.

The other two tabs handle the trading sense: what you must fund yourself to buy shares on margin, and what a leverage ratio like 30:1 requires in a currency account.

Margin and Markup Are Not the Same Number

This is the most common and most expensive confusion in pricing, so it is worth being blunt about it.

Margin = profit ÷ revenue × 100
Markup = profit ÷ cost × 100

Same profit on top, different number underneath. Because cost is always smaller than revenue on a profitable sale, markup is always the larger figure. A 25% margin is a 33.33% markup. A 50% markup is only a 33.33% margin.

The damage happens when someone wants a 30% margin and adds 30% to their cost. On a $185 item that gives $240.50 and a margin of 23.1% — nearly seven points short, on every unit sold. To actually reach 30% the price has to be $264.29. Across a year of trading, that gap is the difference between a healthy business and a struggling one.

The table under the first tab lists the two side by side at every margin from 5% to 70%, calculated on whatever cost you enter, so the conversion is there whenever you need it.

The Formulas

Profit = revenue − cost
Margin % = profit ÷ revenue × 100
Markup % = profit ÷ cost × 100

Price for a target margin = cost ÷ (1 − margin)

Stock margin required = share price × shares × requirement %
Currency margin required = exchange rate × units ÷ leverage ratio

The fourth line is the one worth memorising, because it is the one people get wrong. To hit a margin you divide, you do not add. A cost of $185 at a 40% target is 185 ÷ 0.60 = $308.33.

Why Any Two Values Are Enough

Cost, revenue, margin and profit are four views of the same transaction, tied together by the formulas above. Fix any two and the other two follow — no combination leaves an ambiguity.

That makes the first tab work in whichever direction you actually need:

  • Cost and revenue — the everyday case. What am I making on this?
  • Cost and margin — pricing. What do I have to charge?
  • Revenue and margin — a costing ceiling. What can I afford to pay for stock?
  • Margin and profit — planning. What turnover do I need to make this much?
  • Cost and profit, or revenue and profit — filling in the gap when you know two ends of it.

Fields you supplied are labelled given; the ones worked out for you are labelled result and tinted. Type into a third field and the oldest of your entries quietly becomes a result instead, so there are always exactly two inputs driving the answer.

What Counts as a Good Margin

Only against your own industry. Margins vary so widely by sector that a number that is healthy in one is a disaster in another.

A healthy margin still has to cover your fixed costs before any of it is profit. To turn a margin into the volume that actually pays the rent, use our break-even calculator.

Grocery retail runs on low single digits and makes it work on volume. General retail sits higher. Restaurants are famously thin once labour and waste are counted. Software, once built, carries very high gross margins because the cost of one more copy is close to nothing. Comparing a corner shop to a software company on margin alone tells you nothing useful about either.

Two things are worth separating whatever the sector. Gross margin counts only the direct cost of what you sold, which is what this calculator works with. Net margin counts everything else too — rent, wages, tax, interest — and is always smaller. A business can have a comfortable gross margin and still lose money.

Trading Stocks on Margin

Buying on margin means borrowing part of the purchase price from your broker, with the securities themselves as collateral.

The second tab opens on 250 shares at $42.75, a position of $10,687.50. At a 40% requirement you fund $4,275 and borrow the rest, which is leverage of 2.5 to 1.

The rules matter here. Under U.S. Regulation T the initial requirement is at least 50%, so at most half the cost of a new purchase can be borrowed. The maintenance requirement, which applies once you hold the position, is lower — a federal minimum of 25%, with brokers commonly setting 30% or more. The two are often confused, and only the first constrains what you can buy today.

What the leverage does is magnify both directions against a smaller base. On this position a 10% fall is $1,068.75, which is exactly 25% of the money you put in. The same fall on an unleveraged holding would be 10% of your money. That multiplication is the entire point and the entire risk.

Currency Margin and Leverage

Currency trading quotes the same idea as a ratio rather than a percentage. A 30:1 ratio means one dollar of your margin controls thirty dollars of currency, which is a 3.33% requirement.

The third tab opens on 5,000 units at a rate of 0.86 — a position worth 4,300 in your own currency — at 30:1, requiring 143.333.

The arithmetic is simple and the consequence is not. At 30:1 a move of roughly 3.3% against the position consumes the entire margin. At 50:1 it takes 2%. Currency pairs routinely move that much in a day, which is why margin here is better understood as a deposit against a position that can be closed out from under you than as a down payment on something you own.

The margin is not a fee and not a cost. It is your money, held as collateral, and it comes back when the position closes — less whatever the position lost.

Margin Calls

A margin call is the broker telling you that equity in the account has fallen below the maintenance requirement, and that you must add money or have positions closed.

It arrives sooner than people expect, because losses are measured against your contribution rather than against the whole position. The result rows on both trading tabs make this concrete: they show what a 10% move in the shares, or a 1% move in the currency, does to your money specifically rather than to the position.

Brokers can generally close positions without waiting for you, and are not obliged to pick a good moment. Losses can also exceed the deposit, which is what makes leveraged trading different in kind from an ordinary investment rather than merely riskier by degree.

What This Calculator Leaves Out

  • Tax. Every figure is pre-tax. Sales tax and VAT sit outside this calculation entirely.
  • Overheads. The first tab computes gross margin. Rent, wages and everything else come out afterwards.
  • Interest on borrowed money. Margin loans charge interest, and it is not modeled here.
  • Commissions and spreads. Trading costs reduce real returns and are excluded.
  • Maintenance requirements over time. The trading tabs answer what you need to open a position, not what keeps it open.
  • Currency conversion fees and the gap between the quoted rate and the rate you actually get.

For profit across a whole business rather than a single item, see the Profit & Loss Calculator; for leverage in more depth, the Leverage Calculator; and for pricing after a reduction, the Discount Calculator.

Frequently Asked Questions

What is the difference between margin and markup?

They measure the same profit against different bases. Margin is profit as a share of revenue; markup is profit as a share of cost. On this page's opening figures — $185 cost, $260 revenue — the $75 profit is a 28.85% margin and a 40.54% markup. The same money, two different percentages. Confusing them is the most expensive arithmetic mistake in small business pricing, because a 25% markup only produces a 20% margin.

How do I calculate profit margin?

Subtract cost from revenue to get profit, divide by revenue, multiply by 100. Selling at $260 an item that cost $185 leaves $75, and $75 divided by $260 is 28.85%. Note the denominator: revenue, not cost. Dividing by cost gives markup instead, which is always the larger number.

What price do I need for a given margin?

Divide the cost by one minus the margin. For a 40% margin on a $185 cost, that is 185 divided by 0.60, or $308.33. The common error is adding 40% to the cost, which gives $259 and a margin of only 28.6%. Enter the cost and the margin you want on the first tab and the calculator returns the price.

Can margin be more than 100%?

No. Margin is profit divided by revenue, and profit can never exceed revenue, so 100% would mean revenue with no cost at all. Markup has no such ceiling — an item costing $10 sold for $50 carries a 400% markup and an 80% margin. The calculator declines a margin of 100% or more for that reason.

What is a margin requirement in stock trading?

The share of a purchase your broker makes you fund yourself, with the rest borrowed. At 40% on a $10,687.50 position you put in $4,275 and borrow the balance, which is leverage of 2.5 to 1. Under U.S. Regulation T the initial requirement is at least 50%; maintenance requirements after the purchase are lower, commonly 25% or more, and brokers often set both higher.

What does a margin ratio like 30:1 mean?

It is how much position each unit of your own money controls. At 30:1, one dollar of margin controls thirty dollars of currency, which is the same as a 3.33% requirement. Higher ratios need less money up front and leave far less room before a loss consumes the margin — at 30:1 a move of about 3.3% against the position wipes it out.

What triggers a margin call?

Equity in the account falling below the maintenance requirement. Because you are trading with borrowed money, losses are measured against your own contribution rather than the whole position, so they bite several times faster. The result rows on the trading tabs show what a 10% move, or a 1% currency move, does to your money specifically, which is usually the number that surprises people.

Why does the calculator let me enter any two values?

Because cost, revenue, margin and profit are locked together, so any two of them fix the other two. That means you can work forwards from cost and price, or backwards from a margin target, without switching tools. Type into a third field and the oldest of your entries becomes a result instead, so there are always exactly two given values driving the answer.

Figures are pre-tax and exclude overheads, commissions and interest on borrowed funds. Margin trading carries risk of loss beyond the amount deposited. Provided for general information only and not financial advice.