This page sets out the formulas that a pip calculator, a margin calculator or a CFD profit calculator runs for you, so you can do the same sums by hand. Margin is the deposit your provider holds while a trade is open, and a CFD is a contract that pays you, or charges you, the change in a price. Each formula comes with a worked example in made-up numbers, for currency pairs first and then for indices and gold.
Key points
- A pip is 0.0001 on most currency pairs. For pairs quoted in yen, a pip is 0.01. A pipette is a tenth of a pip and is the extra decimal place many platforms show.
- A standard lot means 100,000 units of the first currency in the pair. A mini lot is 10,000 units and a micro lot is 1,000.
- Pip value = trade size in units × pip size. This gives you a number in the second currency of the pair. You then convert that number to your account currency at the current rate.
- Before costs, profit or loss = price change × trade size. Margin = trade size × price × margin rate.
- Position size = the amount you’re willing to lose ÷ (stop distance in pips × pip value of one unit). That sum leaves out the margin.
- Indices use points, while gold is measured in price per ounce. Your provider’s specification shows the contract size, which gives the value of a single point.
What is a pip, and what is a pipette?
Worked arithmetic: the numbers follow from the formula given in this section.
A pip is one step in the fourth decimal place of a currency price. A change from 1.1000 to 1.1001 is one pip. Pairs quoted in Japanese yen are the exception. Those pairs are quoted to two decimal places because a yen is worth far less than a dollar or a euro, so one pip is 0.01.
A pipette is a tenth of a pip. Many platforms show one extra decimal place, the fifth on most pairs and the third on yen pairs, and that last digit counts pipettes. Some platforms call the same thing a point. To count the pips between two prices, take one from the other and divide by the pip size.
| Kind of pair | One pip | One pipette | Example move | Move in pips |
|---|---|---|---|---|
Most pairs, such as EUR/USD | 0.0001 | 0.00001 | 1.10000 to 1.10250 | 0.00250 ÷ 0.0001 = 25 |
Yen pairs, such as USD/JPY | 0.01 | 0.001 | 150.000 to 150.400 | 0.400 ÷ 0.01 = 40 |
Traders count in pips because a pip means the same thing whatever the price level is. That’s why the spread, the gap between the buy and sell price, is quoted in pips. The distance to a stop-loss is quoted in pips too. A stop-loss is an order that closes your trade at a price you set (forex trading).
What is a lot in forex?
Worked arithmetic: the numbers follow from the formula given in this section.
In forex, a lot is a set quantity of the base currency, the pair’s first-named currency. A standard lot equals 100,000 units, so a one-lot trade on EUR/USD is worth 100,000 euros. MetaTrader’s own documentation picks that contract size for its EUR/USD example (MetaTrader 5 Help). A mini lot comes to a tenth of a standard lot, and a micro lot to a hundredth.
When you enter a lot size on a trading platform, you type it as a decimal. A standard lot is 1.00, a mini lot is 0.10 and a micro lot is 0.01. For every market, your provider’s specification tells you the contract size of one lot, the smallest volume you can trade and the step between sizes (MetaTrader 5 Help).
| Lot | Units of base currency | Typed as | Pip value, pair quoted in dollars | Pip value, pair quoted in yen |
|---|---|---|---|---|
| Standard | 100,000 | 1.00 | 10 dollars | 1,000 yen |
| Mini | 10,000 | 0.10 | 1 dollar | 100 yen |
| Micro | 1,000 | 0.01 | 0.10 dollars | 10 yen |
Outside forex, a lot means something different. For an index, a share or a metal, one lot is whatever contract size your provider has set, and the glossary explains the term.
How to calculate pip value
Worked arithmetic: the numbers follow from the formula given in this section.
To find the pip value, multiply your trade size in units by the pip size. The result is in the quote currency, the second currency in the pair, because that’s the currency the price is given in. If your account uses a different currency, you need one more step to convert it. All the prices below are made up.
- Work out the pip value in the quote currency Pip value = units × pip size. With 0.50 lots of
EUR/USD, you get 50,000 × 0.0001 = 5 US dollars per pip. For one lot ofUSD/JPY, the sum is 100,000 × 0.01 = 1,000 yen per pip. - Stop there if your account is in the quote currency If your account is in US dollars, you don’t convert anything when trading a pair that ends in USD. The
EUR/USDtrade above makes or loses 5 dollars a pip, whatever the price is. - Convert by dividing when the rate is quoted in your account currency first You convert yen to dollars with
USD/JPY. Your account currency comes first inUSD/JPY. At 150.00, 1,000 yen gives a pip value of 1,000 ÷ 150.00 = 6.67 dollars. A euro account holding theEUR/USDtrade does the same calculation with its own pair. At 1.1000, 5 dollars ÷ 1.1000 = 4.55 euros a pip. - Convert by multiplying when your account currency comes second When the rate shows the quote currency first, use multiplication to convert. A single lot of
EUR/GBPgives a pip value of 100,000 × 0.0001 = 10 pounds. With a dollar account andGBP/USDat 1.2500, that’s 10 × 1.2500 = 12.50 dollars a pip.
The converted pip value shifts slightly when the exchange rate changes, so your platform recalculates it each time. Your provider may also charge a fee for the conversion itself (costs and fees).
How to calculate margin
Worked arithmetic: the numbers follow from the formula given in this section.
To work out margin, you take the trade’s full size and multiply it by the margin rate. That full size is the notional value, which you get from units × price. So the formula is margin = units × price × margin rate, and the result comes out in the quote currency.
Say you buy 0.50 lots of EUR/USD at a made-up price of 1.1000. That gives a notional value of 50,000 × 1.1000 = 55,000 dollars. ESMA sets the retail minimum for major pairs at 3.33 % if the company that opens your account is regulated in the EU (ESMA Decision (EU) 2018/796). So the margin is 55,000 × 0.0333 = 1,831.50 dollars.
Instead of a margin rate, platforms often display leverage, the ratio of the trade’s size to the deposit backing it. For currency pairs, MetaTrader uses volume in lots × contract size ÷ leverage and the result is in the base currency (MetaTrader 5 Help). With thirty to one, the same trade calls for 0.50 × 100,000 ÷ 30 = 1,666.67 euros. That euro amount lines up with the dollar amount after you account for rounding 3.33 %.
You can find the leverage you’re really using by dividing the notional value of all your open trades by the money in your account. With 5,000 dollars in the account, the trade above runs at 55,000 ÷ 5,000 = 11 to one. The leverage and margin page carries an example through to the point where your provider closes the trade, and the maximum leverage page lists the caps.
How to calculate profit and loss
Worked arithmetic: the numbers follow from the formula given in this section.
To work out profit or loss on a trade, you take the price change and multiply it by the trade size. For a buy the formula is (closing price − opening price) × units. For a sell you reverse the two prices, giving (opening price − closing price) × units. Pips moved × pip value gives the same answer, and in both methods the result is in the quote currency.
For the buy of 0.50 lots of EUR/USD at 1.1000, closed at 1.1040, the profit is (1.1040 − 1.1000) × 50,000 = 200 dollars. You get the same result from 40 pips × 5 dollars. If the price fell to 1.0960, the same sum gives a loss of 200 dollars.
For a losing sell on a yen pair, say you sell one lot of USD/JPY at 150.00 and close at 150.60, so the price rose 60 pips against you. The loss works out to (150.00 − 150.60) × 100,000 = −60,000 yen. At the closing price, that converts to 60,000 ÷ 150.60 = 398.41 dollars lost.
Those numbers are before costs. The spread is already inside your opening and closing prices. Commission and overnight financing are taken off separately. Overnight financing is the daily charge you pay for holding a trade past the end of the trading day. The costs and fees page has the formula for that charge, which forex platforms call swap.
How to calculate position size and lot size
Worked arithmetic: the numbers follow from the formula given in this section.
Position size depends on three numbers: how much you’re willing to lose on the trade, how far your stop is in pips and the pip value of one unit. You work it out using units = risk amount ÷ (stop distance in pips × pip value of one unit). This example uses a dollar account and made-up prices.
- Set the amount at risk Risk here means the amount you lose if the stop is hit. Say your account has 5,000 dollars and you decide this trade can lose 50.
- Measure the stop distance in pips The stop distance is the gap between your entry price and your stop. If you buy
EUR/USDat 1.1000 and set your stop at 1.0975, that’s 0.0025 ÷ 0.0001 = 25 pips. - Find the pip value of one unit If a pair is quoted in dollars, one unit has a pip value of 0.0001 dollars. With a yen pair and a dollar account, the pip value becomes 0.01 yen ÷ the
USD/JPYprice. - Divide to get the units Units = 50 ÷ (25 × 0.0001) = 20,000. Work it backwards to check: 20,000 units make 2 dollars a pip, and 25 pips × 2 = 50 dollars.
- Turn units into lot size Lot size is units ÷ 100,000, so 20,000 units is 0.20 lots. When the result lies between two sizes your platform allows, the smaller one keeps the loss under your limit.
A yen pair uses the same sum. For one unit, the pip value comes to 0.01 ÷ 150.00 = 0.0000667 dollars when USD/JPY is at 150.00, with a 30-pip stop and 50 dollars at risk. Units = 50 ÷ (30 × 0.0000667) = about 25,000, or 0.25 lots.
Your stop doesn’t promise the price you set. In a fast market your provider may fill it at a worse price, and the loss is then bigger than the sum says (stop-loss orders). How to choose the amount at risk in the first place is explained on the risk management page.
Points on indices and gold
Worked arithmetic: the numbers follow from the formula given in this section.
When you move beyond currency pairs, you count points instead of pips. Indices, gold and shares have no agreed pip, so the safe method is the general formula: profit or loss = price change × contract size × number of contracts. The contract size is in your provider’s specification (MetaTrader 5 Help).
Index points
An index point is a move of 1.0 in the index level, such as from 8,000 to 8,001. Index CFDs are usually sized by an amount of money per point. Say you buy 2 contracts at 8,000, with one contract paying 1 dollar a point. The index rises to 8,035, so your profit is 35 × 1 × 2 = 70 dollars.
The margin calculation uses the same formula as before. With a notional value of 8,000 × 1 × 2 = 16,000 dollars and a margin rate of one twentieth, you need 800 dollars of margin. How these contracts are priced is explained on the indices page.
Gold: dollars per ounce
Gold is priced in US dollars for each troy ounce (LBMA), so a gold trade is sized in ounces. Say your provider’s lot is 100 ounces and you buy 0.10 lots, or 10 ounces, at a made-up price of 2,000.00. The price rises to 2,004.50 and you make 4.50 × 10 = 45 dollars.
There is no agreed pip for gold. Some providers treat a 0.01 price change as one pip, and some treat 0.10 as one pip. The question goes away if you use price change × ounces. The commodities page has more on how metal contracts work.
Every formula in one place
Worked arithmetic: the numbers follow from the formula given in this section.
A trading calculator uses the formulas below. Units stands for lots × contract size, and each result is shown in the quote currency unless the line says otherwise.
- Pips between two prices
- (Higher price − lower price) ÷ pip size. The pip size is 0.0001, or 0.01 on yen pairs.
- Pip value
- Units × pip size. Divide by the rate if it names your account currency first, and multiply if it names it second.
- Notional value
- Units × price.
- Margin
- Units × price × margin rate. Written with leverage, it’s units ÷ leverage, in the base currency.
- Leverage in use
- Notional value of all open trades ÷ the money in your account.
- Profit or loss on a buy
- (Closing price − opening price) × units.
- Profit or loss on a sell
- (Opening price − closing price) × units.
- Position size
- Risk amount ÷ (stop distance in pips × pip value of one unit). Divide the units by 100,000 for the lot size in forex.
Risk warning
A bigger lot makes every pip cost more
Lot size sets how much each pip costs you. Leverage lets you open a lot far bigger than your account. On the same move, a trade ten times the size loses ten times as much. According to figures from national regulators that ESMA collected, between 74 % and 89 % of retail CFD accounts lose money (ESMA press release).
The numbers on this page show what a trade can cost you. They can’t show which way the price will move.
Questions people ask about pips, lots and calculators
Worked arithmetic: the numbers follow from the formula given in this section.
Most questions about pips and lots focus on what one pip is worth and how trading calculators work out their results.
How much is one pip worth?
One pip is worth your trade size in units times the pip size. On a standard lot of a pair quoted in US dollars, that’s 100,000 × 0.0001 = 10 dollars. A mini lot gives a pip value of 1 dollar, and a micro lot gives 10 cents. If your account uses a different currency, the amount gets converted at the current exchange rate.
How do you calculate lot size?
Lot size depends on how much you’re willing to lose and how far your stop is. You can calculate the trade size in units by dividing your risk amount by the stop distance in pips multiplied by the pip value of one unit. You can then convert units to lots by dividing by 100,000. Risking 50 dollars with a 25-pip stop on a dollar-quoted pair gives 20,000 units, or 0.20 lots.
How do you calculate CFD margin?
CFD margin is the full size of the trade times the margin rate. The full size is units multiplied by price. For an index, it’s the level times the money per point times the number of contracts. A trade whose full size is 16,000, with a margin rate of one twentieth, needs 800 of margin. A provider can set a rate above any legal minimum its regulator sets (leverage and margin).
What does a pip, margin or position size calculator do?
A trading calculator runs the formulas on this page using live exchange rates. A pip calculator multiplies the number of units by the pip size and then converts that result. A margin calculator multiplies the full size of the trade by the margin rate. A position size calculator divides your risk amount by the stop distance multiplied by the pip value. The answers are only as good as the contract size and rates you enter.
How is swap calculated in forex?
Swap is calculated on the full size of the trade for each night you hold it, using a daily rate your provider publishes. It can be a charge or a payment to you. Whether it’s one or the other depends on the two currencies’ interest rates and the direction of your trade. The costs and fees page works through the formula.
Sources
The original documents this page cites, in the order they first appear.
- Trading - Knowledge base - cTrader Help, Spotware Systems
- Margin Calculation: Retail Forex, Futures - MetaTrader 5 Help, MetaQuotes
- Market Watch - Trading Operations - MetaTrader 5 Help, MetaQuotes
- European Securities and Markets Authority, ESMA
- ESMA Decision (EU) 2018/796 of 22 May 2018 to temporarily restrict contracts for differences in the Union, Official Journal of the European Union (EUR-Lex), 2018-05-22
- The OTC Guide, 11. Precious Metal Benchmarks, LBMA
- ESMA agrees to prohibit binary options and restrict CFDs to protect retail investors, ESMA, 2018-03-27
