Margin Calculator
Profit Margin Calculator
- Profit
- $40.00
- Markup
- 33.33%
- Cost
- $120.00
- Revenue
- $160.00
Stock Trading Margin Calculator
Find how much of your own cash a margin purchase needs and how much is borrowed from the broker.
- Total purchase value
- $1,830.00
- Amount borrowed
- $1,281.00
- Buying power per $1 of cash
- $3.33
Currency Exchange Margin Calculator
Find the deposit a forex broker requires to open a position at a given leverage.
- Position value (in quote currency)
- 130
- Margin as a share of the position
- 5%
Amounts are in the quote currency, the second currency of the pair.
This margin calculator works out gross profit margin, profit and markup from any two of cost, revenue, margin and profit. Two more tools below find the cash needed to buy stock on margin and the margin required for a currency trade.
"Margin" means different things in different corners of finance. In business it is the share of revenue left as profit. In investing it is borrowed money used to buy securities, and the cash you must put up to do so. In foreign exchange it is the deposit that backs a leveraged position. The three calculators on this page cover each meaning.
Profit Margin
Profit margin measures how much of each dollar of sales a business keeps as profit. Gross margin, which the first calculator computes, subtracts only the direct cost of the item sold. With the defaults, a product that costs $120 and sells for $160 earns $40 of profit, a 25% margin: a quarter of the selling price is profit.
Margin is often confused with markup, which divides the same profit by cost instead of by price. The $40 profit is a 33.33% markup on the $120 cost. Markup is always higher than margin for a profitable sale, and mixing them up is a classic pricing mistake: adding a 25% markup to a $120 cost gives a $150 price and only a 20% margin. To hit a target margin, divide cost by one minus the margin: $120 ÷ (1 − 0.25) = $160.
Businesses track several margins. Gross margin subtracts the cost of goods sold. Operating margin also subtracts operating expenses such as wages, rent and marketing. Net margin subtracts everything, including interest and taxes, and shows the share of revenue that becomes bottom-line profit. Typical margins vary enormously by industry: grocery stores often run net margins of only a few percent and rely on volume, while software companies can reach gross margins above 70%. Comparing a company with its own history and with others in the same industry is more meaningful than comparing across industries.
Margin = (revenue − cost) ÷ revenue
- Profit
- revenue − cost
- Markup
- (revenue − cost) ÷ cost
- Price for a target margin
- cost ÷ (1 − margin)
Margin Trading
Buying on margin means borrowing part of the purchase price of securities from a broker, with the securities as collateral. In the US, the Federal Reserve's Regulation T lets investors borrow up to 50% of the purchase price of most stocks, so the initial margin requirement is at least 50%; brokers can require more, and some offer lower requirements on certain products. With a 30% requirement, as in the default example, buying 100 shares at $18.30 costs $1,830, of which $549 is your cash and $1,281 is borrowed.
Margin magnifies results in both directions, and the loan accrues interest. FINRA rules also require a maintenance margin of at least 25% of the account's market value, and many brokers set 30% or higher. If losses push equity below that level, the broker issues a margin call and can sell holdings without notice to restore it, so a margin account can lose more than the original investment.
Currency Exchange Margin
Forex trading is almost always done on margin. Instead of paying the full value of a position, a trader deposits a fraction of it with the broker, and the ratio of position size to deposit is the leverage. At 20:1, controlling 100 units of a currency quoted at 1.3 requires a deposit of 100 × 1.3 ÷ 20 = 6.5 units of the quote currency, or 5% of the position's value. At 50:1, the same position would need only 2%.
Leverage makes small exchange-rate moves matter a great deal. At 20:1, a 1% move against the position wipes out 20% of the margin deposit, and a 5% move wipes out all of it. If equity falls below the broker's maintenance level, positions are closed automatically. That is why regulators limit retail leverage. In the US, the Commodity Futures Trading Commission and the National Futures Association cap leverage at 50:1 on major currency pairs and 20:1 on others; in the European Union and the UK, retail limits are 30:1 on majors and lower on other pairs.
Margin requirements also vary by broker, by currency pair and around major news events or weekends, when brokers often raise them. Before trading, check the margin requirement, the margin-call and stop-out levels, and the overnight financing charges, which are effectively the interest paid or earned on the leveraged position.
Because a forex position is quoted in two currencies, the margin is usually calculated in the quote currency and then converted into the account's currency. A US-dollar account trading euros against yen, for example, would see the margin calculated in yen and converted to dollars at the current USD/JPY rate. Most trading platforms show the required margin before an order is placed.
Frequently asked questions
What is the difference between margin and markup?
Both use the same profit. Margin divides it by the selling price; markup divides it by the cost. A $120 item sold for $160 has a 25% margin and a 33.33% markup.
How do I price a product for a target margin?
Divide the cost by one minus the target margin. For a 40% margin on a $60 cost, the price is $60 ÷ 0.6 = $100.
What is a margin call?
A demand from your broker to deposit cash or securities when the equity in a margin account falls below the maintenance requirement. If you do not act, the broker can sell your holdings.
What does 20:1 leverage mean in forex?
You control a position 20 times the size of your deposit. The required margin is 5% of the position's value.
Results are estimates for educational purposes and are not financial, tax or legal advice. Confirm figures with a qualified professional or your lender.
Updated by Calculator.hair. How we build and check our calculators