Skip to content
CB-Dogs

How to Calculate Profit and Loss in Forex (Formula and Examples)

Forex profit and loss equals the price difference between your entry and exit, converted to your account currency using pip value and lot size — a long position profits when price rises and a short position profits when price falls, and the same math applies both ways.

By CB-Dogs Editorial4 min read

Disclosure: CB-Dogs receives an advertising (referral) fee — sometimes called an IB commission — from brokers for accounts opened or linked through us, and returns part of it to you as cashback, the same model used by cashback and points sites. This does not change your trading costs.

On this page
  1. The basic formula
  2. Long vs short: which direction makes money
  3. Worked example 1: a winning long trade (EUR/USD)
  4. Worked example 2: a losing short trade (USD/JPY)
  5. Gross P&L vs. net P&L (spread, commission, swap subtracted)
  6. Where cashback fits into net P&L
  7. Common mistakes
  8. Frequently asked questions
  9. Next steps

Every forex trade's profit or loss comes down to one calculation: the price difference between where you entered and where you exited, scaled by your position size, converted into your account currency. This guide walks through the formula, a winning and a losing worked example, and the difference between the "gross" number your platform shows mid-trade and the "net" number that actually lands in your account after costs.

Key takeaways

  • Basic formula: P&L = (Exit price − Entry price) × Trade size, with the sign flipped for a short position, converted into your account currency.
  • Using pip value simplifies this in practice: P&L = Price move in pips × Pip value per lot × Number of lots.
  • A long position profits when price rises after entry; a short position profits when price falls — the pip-value math is identical either way, only the direction of the price move that helps you flips.
  • Gross P&L (from price movement alone) is not the same as net P&L, which subtracts spread, commission, and any swap charged for holding overnight.
  • A demo account or your broker's own trade history lets you check this math against your actual account before relying on it for real position sizing.

The basic formula

Flow diagram showing entry price and exit price combining into a price difference, then multiplied by pip value per lot and number of lots to produce gross profit or loss
The same four inputs — entry, exit, pip value, and lot size — drive every forex P&L calculation.

At its simplest, profit or loss on a closed forex position is:

P&L = (Exit price − Entry price) × Contract size × Lots (for a long/buy position, in the quote currency), converted to your account currency if different.

In practice, it's usually easier to work in pips rather than raw price, using the pip-value formula from our lot, pip, and spread cost guide:

P&L = Price move (in pips) × Pip value per lot × Number of lots

Both formulas describe the same thing — the pip-based version just does the currency conversion for you, since pip value per lot is already expressed in your account currency.

Long vs short: which direction makes money

A long (buy) position profits when the price rises after entry and loses when it falls. A short (sell) position is the mirror image: it profits when price falls after entry and loses when it rises. The formula doesn't change — only the sign of the price move that counts as favorable flips. If you buy at 1.1000 and the price rises to 1.1050, that's a 50-pip gain for a long position; if you'd sold (shorted) at 1.1000 instead, that identical move would be a 50-pip loss.

Worked example 1: a winning long trade (EUR/USD)

Assume you buy 1.0 standard lot of EUR/USD at an illustrative entry price of 1.0850, and close the position at 1.0900 — a 50-pip favorable move.

  • Pip value: $10.00 per pip (standard lot, USD quote currency)
  • Price move: 50 pips in your favor (long, price rose)
  • Gross P&L: 50 × $10.00 = $500.00

Worked example 2: a losing short trade (USD/JPY)

Assume you sell (short) 1.0 standard lot of USD/JPY at an illustrative entry price of 150.00, and the price rises to 150.30 before you close — a 30-pip move against a short position, at an illustrative exchange rate of 150.00 for the pip-value calculation.

  • Pip value: (0.01 × 100,000) ÷ 150.00 ≈ $6.67 per pip
  • Price move: 30 pips against you (short, price rose)
  • Gross P&L: −(30 × $6.67) ≈ −$200.10

Gross P&L vs. net P&L (spread, commission, swap subtracted)

Bar comparison of a hypothetical trade's gross profit and loss from price movement alone against its lower net profit and loss after spread, commission, and swap are subtracted
The price-movement number and the number that lands in your account are rarely identical — costs sit in between.

The gross P&L figures above only account for price movement. In practice, every closed trade also carries the spread you paid to enter (and sometimes exit), any per-lot commission on a raw-spread or ECN-style account, and swap if the position was held overnight — covered in full in our swap and overnight fees guide. Net P&L = Gross P&L − spread cost − commission − swap. For worked cost formulas specifically, see our lot, pip, and spread cost guide and commission per lot guide.

Where cashback fits into net P&L

A cashback rebate isn't part of the trade's P&L calculation itself — it's paid separately, based on qualifying closed lot volume, regardless of whether the underlying trade won or lost. See how forex rebates work for the mechanics, and how cashback lowers your break-even win rate for how a rebate effectively offsets part of your trading cost over many trades, rather than changing any single trade's outcome.

Common mistakes

  • Forgetting the account-currency conversion. Pip value already handles this for standard USD-quote pairs, but pairs quoted in a currency other than your account currency need an extra conversion step — see our non-USD account guide for the equivalent commission-side issue.
  • Mixing up long and short direction. Double-check which direction you're actually positioned before assuming a price move is favorable.
  • Comparing gross P&L across brokers without adjusting for cost. Two brokers can show the same gross P&L on an identical trade and still leave you with different net P&L, because of different spread, commission, or rebate terms.

Frequently asked questions

P&L in pips is just the raw price move expressed in pip units; P&L in dollars (or your account currency) multiplies that by pip value per lot and the number of lots, which is what actually shows up in your account balance.

Next steps

See our lot, pip, and spread cost guide for the pip-value formula behind this article, and run the cashback calculator to see what a rebate is worth on your own typical volume. Register with CB-Dogs before opening or linking your broker account so qualifying trades start earning cashback from the start.

Risk warning: forex and CFD trading carries a high risk of losing money. Cashback does not offset trading losses. Nothing here is investment advice.

← All articles