Trusted by 8,000+ traders

Forex Trading
Calculations

Master the essential formulae behind margin, pip value, spread, profit/loss, and swap calculations for Forex and CFD trading.

5 Topics Covered
Forex & CFDs Asset Types
2026 Updated
Free Guide
MARGIN

Margin Calculation

Understand how much capital is required to open and maintain a trading position.

Forex Currency Pairs

What is a Lot? A lot in Forex refers to the position size or trading volume. One standard lot equals 100,000 units of the base currency. For example, 1 lot of EUR/USD at 1.1250 means buying or selling 100,000 EUR in exchange for 112,500 USD.

Position Margin

Position Margin Formula
Margin = (Position Size) / (Leverage)
Example: 1 Lot EUR/USD with 1:400 leverage
Margin = (100,000 EUR) / (400) = 250 EUR

Account Margin

Calculated when the account currency differs from the base currency.

Account Margin Formula
Account Margin = (Position Margin) x (Exchange Rate)
Example: 1 Lot EUR/USD at 1.1250, USD account
Account Margin = (250 EUR) x (1.1250) = 281.25 USD

Non-Forex Asset CFDs

What is a Lot in Non-Forex CFDs? Non-Forex assets include commodities, stocks, indices, cryptocurrencies, ETFs, and bonds. A lot refers to the regular contract size, usually found on the trading platform under asset specifications.

Position Margin

Position Margin Formula
Margin = [(Contract Size) x (Asset Price)] / (Leverage)
Example: 1 Lot Gold (XAU/USD) at 1,500 USD, 1:50 leverage
1 Lot Gold = 100 ounces
Margin = [(100) x (1,500)] / (50) = 3,000 USD

Account Margin

Calculated when the account currency differs from the quote currency.

Account Margin Formula
Account Margin = (Position Margin) x (Exchange Rate)
Example: 1 Lot DAX 30 (DAX/EUR) at 9,000 EUR, 1:10 leverage, USD account
1 Lot DAX 30 = 10 contracts
Position Margin = [(10) x (9,000)] / (10) = 9,000 EUR
Account Margin = (9,000 EUR) x (1.1250) = 10,125 USD
PIP VALUE

Pip Value Calculation

Calculate how much you gain or lose for each pip of price movement.

Forex Currency Pairs

What is a Pip? In 4-decimal pairs (e.g. EUR/USD at 1.1362), the pip is the 4th decimal. In 2-decimal pairs (e.g. USD/JPY at 110.37), the pip is the 2nd decimal. Pip value is the profit or loss each time the price moves by one pip, based on position size.

4-Decimal Currency Pairs

Pip Value Formula (4-Decimal)
Pip Value = (Position Size) / 10,000
Example: 0.5 Lot EUR/USD at 1.1362
0.5 Lot = 50,000 EUR
Pip Value = (50,000) / 10,000 = 5 USD per pip

2-Decimal Currency Pairs

Pip Value Formula (2-Decimal)
Pip Value = (Position Size) / 100
Example: 0.7 Lot USD/JPY at 110.37
0.7 Lot = 70,000 USD
Pip Value = (70,000) / 100 = 700 JPY per pip

Account Pip Value

Pip values are calculated in the quote currency. If your account currency differs, convert using the current exchange rate.

Account Pip Value Formula
Account Pip Value = (Position Pip Value) / (Exchange Rate)
Example: 1 Lot USD/CAD at 1.2500, USD account
Position Pip Value = (100,000) / 10,000 = 10 CAD
Account Pip Value = (10 CAD) / (1.2500) = 8 USD per pip

Non-Forex Asset CFDs

Pip Value in Non-Forex CFDs: A pip in non-Forex asset CFDs is the first unit in the price before decimals. The pip value reflects the P/L per price move, based on the contract size.

Position Pip Value

Pip Value Formula (Non-Forex)
Pip Value = (Contract Size) x (1 Currency Unit)
Example: 1 Lot Gold (XAU/USD) at 1,600 USD
1 Lot = 100 ounces
Pip Value = (100) x (1 USD) = 100 USD per pip

Account Pip Value

Calculated when the asset is traded against a different currency than your account currency.

Account Pip Value Formula (Non-Forex)
Account Pip Value = (Position Pip Value) x (Exchange Rate)
Example: 0.2 Lot DAX 30 (DAX/EUR) at 9,500 EUR, USD account
0.2 Lot = 2 contracts
Position Pip Value = (2) x (1 EUR) = 2 EUR per pip
Account Pip Value = (2 EUR) x (1.1250) = 2.25 USD per pip
SPREAD

Spread Calculation

Learn how to calculate the cost of the bid-ask spread on your trades.

Forex Currency Pairs

What is Spread? Spread is the difference between the Bid (sell) and Ask (buy) prices. It is the commission charged by FX and CFD brokers and can be fixed or floating. Spread appears as an initial floating loss in a newly opened position and is calculated using the pip value.

Position Spread

Spread Formula
Spread Cost = [(Ask Price) - (Bid Price)] x (Pip Value)
Example: 0.3 Lot AUD/USD, Bid 0.7140 / Ask 0.7145
0.3 Lot = 30,000 AUD
Pip Value = 30,000 / 10,000 = 3 USD
Spread = (0.7145) - (0.7140) = 5 pips
Spread cost = (5 pips) x (3 USD) = 15 USD

Account Spread

Calculated when the quote currency and account currency are different.

Account Spread Formula
Account Spread = (Position Spread) x (Exchange Rate)
Example: 2 Lot EUR/GBP, Bid 0.8973 / Ask 0.8979, USD account
2 Lot = 200,000 EUR
Pip Value = 200,000 / 10,000 = 20 GBP
Spread = (0.8979) - (0.8973) = 6 pips
Spread cost = (6) x (20 GBP) = 120 GBP
GBP/USD rate = 1.2235
Account spread = (120 GBP) x (1.2235) = 146.82 USD

Non-Forex Asset CFDs

Spread in Non-Forex CFDs: Spread is calculated the same way — the difference between Bid and Ask prices. Depending on the asset and broker, it can be fixed or floating. The nominal bid-ask difference is counted for every unit in the position.

Position Spread

Spread Formula (Non-Forex)
Spread Cost = [(Ask Price) - (Bid Price)] x (Pip Value)
Example: 0.1 Lot Gold (XAU/USD), Bid 1616.50 / Ask 1623.50
0.1 Lot = 10 ounces
Pip Value = (10) x (1 USD) = 10 USD per pip
Spread = (1623.50) - (1616.50) = 7 USD per ounce
Spread cost = (7) x (10 ounces) = 70 USD

Account Spread

Account Spread Formula (Non-Forex)
Account Spread = (Position Spread) x (Exchange Rate)
Example: 0.4 Lot DAX 30 (DAX/EUR), Bid 9,362 / Ask 9,366, USD account
0.4 Lot = 4 contracts
Pip Value = (4) x (1 EUR) = 4 EUR per pip
Spread = (9,366) - (9,362) = 4 EUR per contract
Spread cost = (4) x (4 contracts) = 16 EUR
Account spread = (16 EUR) x (1.1250) = 18 USD
PROFIT & LOSS

Profit/Loss Calculation

Estimate potential returns and risk before entering any trade.

Forex Currency Pairs

Profit/Loss in Forex: P/L calculation is based on pip value and price targets for stop loss and take profit. The estimate can be further refined by deducting the spread.

Position Profit/Loss

P/L Formula
Profit = [(TP Price) - (Entry Price)] x (Pip Value)
Loss = [(SL Price) - (Entry Price)] x (Pip Value)
Example: 1 Lot EUR/USD Buy at 1.1320, TP 1.1350, SL 1.1300
Pip Value = (100,000) / 10,000 = 10 USD per pip
Profit = (1.1350 - 1.1320) x 10 = 30 pips x 10 = 300 USD
Loss = (1.1300 - 1.1320) x 10 = -20 pips x 10 = -200 USD

Including Spread

When opening a Buy position, you enter at Ask and close at Bid. With 3 pips spread on EUR/USD:

Net P/L Formula (Including Spread)
Net Profit = [(TP) - (Entry) - (Spread)] x (Pip Value)
Net Loss = [(SL) - (Entry) - (Spread)] x (Pip Value)
Net Profit = (30 pips - 3 pips) x 10 USD = 27 x 10 = 270 USD
Net Loss = (-20 pips - 3 pips) x 10 USD = -23 x 10 = -230 USD

Account P/L

Calculated when the quote currency differs from your account currency. If trading EUR/USD with an EUR account:

Account P/L Conversion
Account P/L = (Position P/L) / (Exchange Rate)
Account Profit = (270 USD) / (1.1250) = 240 EUR
Account Loss = (230 USD) / (1.1250) = 204.44 EUR

Non-Forex Asset CFDs

P/L in Non-Forex CFDs: The same P/L formulas apply. The calculation is based on the value change of each unit in the position. For Gold, the price change is reflected for each ounce your position includes.

Position Profit/Loss

P/L Formula (Non-Forex)
Profit = [(TP Price) - (Entry Price)] x (Pip Value)
Loss = [(SL Price) - (Entry Price)] x (Pip Value)
Example: 1 Lot Gold (XAU/USD) Buy at 1,650, TP 1,668, SL 1,640
Pip Value = (100 ounces) x (1 USD) = 100 USD
Profit = (1,668 - 1,650) x 100 = 1,800 USD
Loss = (1,640 - 1,650) x 100 = -1,000 USD

Including Spread

If Gold has a $2.50 spread:

Net P/L (Non-Forex, with Spread)
Net Profit = [(TP) - (Entry) - (Spread)] x (Pip Value)
Net Loss = [(SL) - (Entry) - (Spread)] x (Pip Value)
Net Profit = (18 - 2.50) x 100 = 15.50 x 100 = 1,550 USD
Net Loss = (-10 - 2.50) x 100 = -12.50 x 100 = -1,250 USD

Account P/L

If your account is in Canadian Dollars, convert using USD/CAD at 1.3325:

Account P/L Conversion (Non-Forex)
Account P/L = (Position P/L) x (Exchange Rate)
Account Profit = (1,550 USD) x (1.3325) = 2,065.38 CAD
Account Loss = (1,250 USD) x (1.3325) = 1,665.63 CAD
ROLLOVER / SWAP

Rollover/Swap Calculation

Understand overnight interest charges when holding positions across trading days.

Forex Currency Pairs

What is Swap? When a position is held overnight, it is called rollover. Each currency has an interest rate set by its central bank. Swap is the interest paid or received based on the rate differential. In long positions, you receive interest if the base currency rate exceeds the quote. In short positions, the reverse applies. Swap accumulates daily and is applied when the position is closed.

Position Swap

Swap Formula (Forex)
Swap = [(Size) x (Rate Diff + Mark-up) / 100] x [(Close Price) / 365]
Example: 1 Lot EUR/USD Buy, closing price 1.1480
EUR rate = 0.25%, USD rate = 0.75%, Broker mark-up = 0.25%
Swap = [(100,000) x (0.25% - 0.75% + 0.25%) / 100] x [(1.1480) / 365]
= [(100,000) x (-0.25%) / 100] x [0.003144]
= (-250) x (0.003144) = -0.79 USD per day (trader pays)

Account Swap

Calculated when the quote currency differs from the account currency.

Account Swap Conversion
Account Swap = (Position Swap) / (Exchange Rate)
Example: If the above position is in an EUR account:
Account Swap = (-0.79 USD) / (1.1480) = -0.69 EUR per day

Non-Forex Asset CFDs

Swap in Non-Forex CFDs: Swap rates are derived from interbank rates plus broker mark-up. If the interbank rate exceeds the mark-up, long positions pay and short positions receive interest. If the interbank rate is lower, you pay regardless of direction. Rates vary by asset and position direction.

Position Swap

Swap Formula (Non-Forex)
Swap = (Contract Size) x (Closing Price) x (Swap Rate)
Example: 1 Lot Gold (XAU/USD) Buy, closing price $1,550
1 Lot = 100 ounces, Swap rate = -0.0028%
Swap = (100) x (1,550) x (-0.000028) = -4.34 USD per day

Account Swap

Account Swap Conversion (Non-Forex)
Account Swap = (Position Swap) x (Exchange Rate)
Example: CAD account, USD/CAD = 1.3225
Account Swap = (-4.34 USD) x (1.3225) = -5.74 CAD per day
FAQ

Frequently Asked Questions

What is a lot in Forex trading?

A lot in Forex is the standard unit of trade size, equal to 100,000 units of the base currency. For example, 1 lot of EUR/USD means you are trading 100,000 EUR. Mini lots (0.1 = 10,000 units) and micro lots (0.01 = 1,000 units) are also available at most regulated brokers.

How do I calculate pip value?

For 4-decimal currency pairs (e.g. EUR/USD), divide your position size by 10,000. For 2-decimal pairs (e.g. USD/JPY), divide by 100. For example, a 0.5 lot (50,000 units) EUR/USD position has a pip value of 5 USD. If your account currency differs from the quote currency, convert using the current exchange rate.

What is spread in trading?

Spread is the difference between the Bid (sell) and Ask (buy) price of an asset. It represents the broker's commission and appears as an initial floating loss when you open a position. Spread can be fixed or variable depending on your broker and market conditions. Use our trading calculators to estimate spread costs before entering a trade.

How does swap/rollover work?

Swap is the interest paid or received when a position is held open overnight. In Forex, it's based on the interest rate differential between the two currencies in the pair, plus the broker's mark-up. In long positions, you receive interest if the base currency rate is higher than the quote. Swap accumulates daily and is applied when the position is closed.

What's the difference between position margin and account margin?

Position margin is calculated in the base currency of the instrument using the formula: Position Size / Leverage. Account margin converts that value into your account currency using the current exchange rate. For example, if your position margin is 250 EUR and you have a USD account, the account margin at EUR/USD 1.1250 would be 281.25 USD.

Why do I need to convert pip value to my account currency?

Pip values are initially calculated in the quote currency of the pair you're trading. If your account currency differs from the quote currency, the pip value must be converted so that your profit/loss is reflected accurately. For example, trading USD/CAD with a USD account requires converting the CAD pip value back to USD using the current exchange rate.

JD

James D. from London

matched with AvaTrade

2 minutes ago