Margin Calculator

Find your profit margin and markup, the cash needed to buy stock on margin, or the margin needed to trade currency.

Profit Margin Calculator

Give any two of the four values and the calculator finds the rest.

Stock Trading Margin Calculator

The cash you must hold to buy shares on margin.

Currency Exchange Margin Calculator

The minimum balance to keep in a margin account to trade currency.

Quick answer. Margin is profit divided by revenue and markup is profit divided by cost. An item costing $120 and selling for $160 has a margin of 25% and a markup of 33.3%. To price for a 25% margin on a $120 cost, divide by 0.75.

Margin and markup

Margin and markup both describe profit, but against different bases. Margin is profit as a share of revenue, the selling price. Markup is profit as a share of cost. If an item costs $120 and sells for $160, the profit is $40, the margin is 25% and the markup is 33.3%. Markup is always larger than margin for the same sale, and the two are easy to confuse when you set prices.

The same sale as margin and as markup (cost $120, revenue $160)The profit is $40 either way, but it is 25% of the price and 33.3% of the cost, so markup is always the larger figure.The same sale as margin and as markup (cost $120, revenue $160)Margin (profit / revenue)25.0%Markup (profit / cost)33.3%
Same profit, two different percentages.

A second example: a product costing $60 and selling for $100 earns $40 of gross profit. Gross margin is $40 ÷ $100 = 40% and markup is $40 ÷ $60 = 66.7%.

Tool 1: profit margin

Enter any two of cost, revenue, margin and profit and the calculator finds the rest, plus the markup. The defaults, cost $120 and revenue $160, give a profit of $40.00, a margin of 25.00% and a markup of 33.33%. The formulas are margin = profit ÷ revenue and markup = profit ÷ cost. To find the price for a target margin, enter the cost and the margin: price = cost ÷ (1 − margin). Margin must stay below 100%, since profit can never be the whole of the revenue.

Price needed on a $120 cost to reach each target marginTo reach a 25% margin on a $120 cost, divide by 0.75: the price is $160.00.Price needed on a $120 cost to reach each target margin10% margin$133.3320% margin$150.0025% margin$160.0030% margin$171.4340% margin$200.0050% margin$240.00
Pricing from a margin: divide the cost by one minus the margin.

Converting between margin and markup

Markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup).

MarginEquivalent markup
10%11.1%
20%25.0%
25%33.3%
30%42.9%
40%66.7%
50%100.0%
60%150.0%

How discounts eat margin

A discount comes off revenue but the cost stays the same, so the margin falls faster than the discount. On the default item, a 20% discount drops the price to $128.00 and the margin from 25% to 6%.

DiscountSale priceProfitMargin
0%$160.00$40.0025.0%
5%$152.00$32.0021.1%
10%$144.00$24.0016.7%
20%$128.00$8.006.2%
25%$120.00$0.000.0%

Tool 2: margin in stock trading

In investing, margin means borrowing from a broker to buy more than your cash allows. The stock tool shows the cash you must hold: the value of the shares times the margin requirement. With the defaults, 100 shares at $18.30 are worth $1,830.00, a 30% requirement means you must hold $549.00 and you borrow $1,281.00. Under US rules brokers can lend up to half the purchase price of marginable stock, and firms must keep a minimum equity in the account, often higher than the minimum.

Return on your own cash from a 10% move in the shares (30% margin requirement)Margin magnifies results: a 10% price move becomes about 33% on the $549 of your own cash, which is why losses can be larger than the cash you put in.Return on your own cash from a 10% move in the shares (30% margin requirement)Shares rise 10%+33%Shares fall 10%-33%
Margin magnifies both gains and losses.

If the shares fall 20% to $1,464.00, the loan stays at $1,281.00, so your equity drops to $183.00, only 12% of the position. Falling below the broker’s maintenance level triggers a margin call: you must add money or securities, or the broker can sell your holdings without asking.

Tool 3: margin in currency trading

The currency tool shows the amount you need to hold for a leveraged position. With an exchange rate of 1.3, 100 units and a 20:1 margin ratio, the position is worth $130.00 and the margin required is $6.50, which is 5% of the position. The margin ratio, such as 20:1, says how much you can control for each unit of your own money. US rules have set minimum deposits of 2% for major currency pairs and 5% for others, and the calculator offers ratios up to 50:1.

Margin ratioMargin percentageMargin for a 130.00 position
1:1100.00%$130.00
5:120.00%$26.00
10:110.00%$13.00
20:15.00%$6.50
30:13.33%$4.33
50:12.00%$2.60

Risks of trading on margin

  • You can lose more than you put in.
  • Brokers set their own margin rules and can change them, sometimes quickly.
  • Interest on the borrowed money adds to the cost.
  • A margin call can force you to sell at a bad time.

These calculators do simple arithmetic and are not investment advice.

Common mistakes

  • Using markup and margin interchangeably when setting prices.
  • Forgetting that margin is based on revenue, so a 50% margin is a 100% markup.
  • Ignoring discounts when estimating profit.
  • Treating a margin requirement as the maximum you can lose.

How to read your result

For profit margin, the large number is the margin, with cost, revenue, profit, margin and markup listed below. For stock and currency margin, the large number is the cash you must hold. Compare it with the position value to see how much leverage you are using.

Trading on margin carries a high risk of loss. This calculator gives arithmetic, not investment advice.

What to do next

Common questions

What is the difference between margin and markup?

Margin is profit divided by revenue, while markup is profit divided by cost. For the same sale, the markup is always bigger than the margin. A 25% margin is the same as a 33.3% markup.

How do I price an item for a target margin?

Divide your cost by one minus the margin as a decimal. To reach a 25% margin on a cost of 120, divide 120 by 0.75 to get a price of 160. Enter the cost and the margin to do this.

Why can margin not be 100% or more?

Margin is the share of revenue that is profit. If the margin were 100%, the cost would be zero, and a margin above 100% is impossible.

How is the stock margin amount worked out?

Multiply the share price by the number of shares to get the position value, then multiply by the margin requirement as a percentage. The result is the cash you must hold, and the rest is borrowed from the broker.

What does a 20:1 margin ratio mean?

You can control 20 units of currency for every 1 unit of your own money, so the margin required is 5% of the position.

What is a margin call?

If your account equity falls below the broker's maintenance level, you must add cash or securities. If you do not, the broker can sell your holdings without your consent.

Sources: FINRA: Know what triggers a margin call; Investor.gov: Investor bulletin, understanding margin accounts; CFTC: Customer advisory, eight things to know before trading forex

More Financial Calculators

Pick another tool to jump straight to it.