Gold contract size
1.0 lot = 100 oz
0.1 lot = 10 oz
Spread cost formula
Spread cost = Spread × Ounces
spread is 0.4
So:
Spread cost = 0.40 × 10
Spread cost = $4.00
The 0.40 spread on XAUUSD at 0.1 lot = $4.00 cost.
This means when you open a 0.1-lot gold trade, you start the trade –$4 because of the spread.