How MT5 calculates the profit of a closed trade

The formula behind the Profit column, three hypothetical examples and a four-step check you can run on any trade in your history.

The Profit column in the MetaTrader 5 history looks like a plain number, but it comes from a calculation that depends on the symbol, the lot size, the contract size and the currency of your account. Traders usually notice only when a figure does not match what they expected: a gold trade that paid more than the points suggest, or a forex position that closed in a different currency. This page explains how MT5 arrives at the profit of a closed position, gives worked examples for a forex pair, gold and an index, and shows how to check any trade yourself. The numbers are hypothetical, and your broker’s specification always decides.

The basic idea

For most forex and metal CFDs the profit of a position is the price difference multiplied by the contract size and by the number of lots. A buy earns when the close price is above the open price; a sell earns when it is below. The result is first expressed in the profit currency of the symbol (the quote currency for a forex pair) and is then converted into your account currency at the current rate if they differ.

PartMeaningWhere to read it
Price differenceClose price minus open price for a buy; the reverse for a sellHistory tab, positions view
Contract sizeUnits of the asset in one lotSymbol Specification in Market Watch
LotsVolume of the positionHistory tab
Profit currencyCurrency in which the symbol’s profit is first calculatedSymbol Specification
ConversionRate used to turn profit currency into account currencyYour broker’s quotes at the close

Contract sizes differ, which is why two brokers can show different profits for the same-looking trade. Our page on lot size and contract size shows how to read them.

Worked example 1: a forex pair (hypothetical)

A buy of 0.10 lots on EURUSD at 1.08000, closed at 1.08500. The contract size is 100,000 units, so 0.10 lots is 10,000 euros. The price difference is 0.00500. Profit is 0.00500 × 10,000 = 50.00 in US dollars, the quote currency. On a US dollar account that is the figure in the Profit column, before commission and swap. On an account in another currency, MT5 converts the 50.00 dollars at the rate at the close, so the same trade shows a different number.

Worked example 2: gold (hypothetical)

A sell of 0.20 lots on XAUUSD at 2,350.00, closed at 2,346.00. If the contract size is 100 ounces, 0.20 lots is 20 ounces. The price difference in the trade’s favour is 4.00, so profit is 4.00 × 20 = 80.00 dollars. If your broker uses a different contract size, the figure is different, which is why you check the specification first. The pip confusion on gold is a separate trap; gold pip value explained covers it.

Worked example 3: an index CFD (hypothetical)

A buy of 0.50 lots on an index symbol, opened at 18,000.0 and closed at 18,040.0, with a contract size of 1 and a point value of 1 dollar per lot. The move is 40.0 points. Profit is 40.0 × 1 × 0.50 = 20.00. Another broker may set the contract size to 10, which would make the same move worth 200.00. The tick value and tick size in the specification tie it together; see tick value and tick size explained.

Profit is not the whole result

The Profit column leaves out two things that also affect your balance: commission, which some brokers charge on the opening and closing deals, and swap, charged for holding overnight. The result of a trade is profit plus commission plus swap. If your calculated number matches the Profit column but not your balance change, commission and swap are the usual reason. We explain them in MT5 commission explained and MT5 swap explained. You can also total costs with the trading cost calculator.

How to check any closed trade in four steps

Why your figure may differ by a little

Where a journal fits

AI Trading Journal does not recalculate profit. It reads the result that MetaTrader 5 recorded for each closed position, combining profit, commission and swap into one figure per entry, with partial closes merged and dated by the last exit on the broker’s clock. That is useful because the figure matches your History tab. The journal is a Windows desktop app for MT5, read-only, and keeps its file on your own PC.

Limits of this page

When your account currency differs from the symbol's profit currency, read MT5 profit currency vs account currency.

Frequently asked questions

How does MT5 calculate profit?
For most forex and metal CFDs: the price difference times the contract size times the lots, in the profit currency, then converted to the account currency.
Why is my profit different from my calculation?
Usual causes are a different contract size, the currency conversion, commission and swap, or a partial close with several closing prices.
Does the Profit column include commission?
Normally no. Commission and swap are separate columns, and the result is the three added together.
Where do I find the contract size?
Right-click the symbol in Market Watch and choose Specification.
Does AI Trading Journal recalculate my profit?
No. It reads the result recorded by MetaTrader 5 and combines profit, commission and swap for each closed position.

Related guides

See every trade's net result in one local journal: free for 7 days

Free for 7 days, no card required. After that, a one-time $19.99 purchase. No subscription. Also on the Microsoft Store.

One-time $19.99, no monthly fee · your MT5 login never leaves your PC · trades go into your own journal on your PC, not through our servers.

Start free 7-day trial