Forex

Swap Rate: How to Calculate the Cost of Holding a Position

Any leveraged position kept open past the market's daily closing time can generate a cost — or, in some cases, a credit — called the swap rate, also known as the overnight or rollover fee. It shows up in forex, CFDs, commodities, indices, and margin positions in cryptocurrencies. If the trade is opened and closed on the same day, before the rollover time, there's usually no swap to calculate.

The problem with the swap is that it doesn't arrive as a visible charge at the time of entry. It shows up later, quietly, in the account. This means many traders only notice the impact when a trade that looked short-term turns, without planning, into a position held for several days.

How the calculation works

The formula depends on how the broker displays the swap rate. When it's shown as a percentage of the position's value:

Swap = position value × daily swap rate × nights charged

When it's shown per lot:

Swap = lot size × swap per lot × nights charged

The phrase nights charged deserves attention. A position held over the weekend usually counts as more than one night, because the market needs to settle the period it was closed. Many platforms apply a triple rollover on a specific day of the week, but the exact day and the rate vary by instrument and broker — so it's always worth checking the current conditions before deciding to hold a position open overnight.

Worked example: percentage swap

Suppose a position with an exposure value of R$ 7,500, a daily swap rate of 0.05% for long trades, held for three charged nights (including the weekend's triple rollover). The calculation is:

R$ 7,500 × 0.05% × 3 = R$ 11.25 estimated cost

If the same position, on the short side, had a daily rate of −0.02% (a credit, instead of a cost), the result over the same three nights would be:

R$ 7,500 × (−0.02%) × 3 = −R$ 4.50, that is, a credit of R$ 4.50 in the account

Notice that the sign of the rate changes the result from a cost to a credit — that's why it's essential to use exactly the sign shown by the platform, without mentally adjusting the number.

Why buying and selling cost differently

The swap isn't a random fee. In forex, it's tied to the difference between the interest rates of the two currencies in the pair. In CFDs, it can reflect financing cost, liquidity, and instrument-specific rules. That's why it's common for:

  • Long trades to have a different financing cost than short trades on the same asset.
  • One side of the pair to pay while the other receives, depending on the interest rate difference between the currencies involved.
  • Broker adjustments and instrument-specific rules to also influence the final value.

This doesn't mean the trade's direction should be chosen based on the swap. The direction needs to come from the technical analysis or the scenario that motivated the trade. But when two entry ideas are similar and one of them has a much higher overnight cost, the swap becomes a legitimate tiebreaker.

When the swap really matters

A cost of R$ 2 per night isn't automatically relevant. On a trade with a R$ 150 target, that amount is practically irrelevant. On the same trade, but with a target of just R$ 8 — typical of a scalper — that R$ 2 per night eats away a huge chunk of the expected result.

The practical calculation worth doing before holding a position open overnight is simple: take the estimated swap value for the planned number of nights and compare it with the trade's profit target. If the swap represents a small fraction of the target, the cost is manageable. If it represents a large chunk, it's worth reconsidering holding the position open or reducing the size to compensate.

The habit that prevents surprises in the account

The practical workflow for using this calculation is: first, check how the broker displays the swap rate — percentage or per lot; second, calculate the position value or lot size; third, apply the buy and sell rates separately, since they tend to differ; fourth, multiply by the actual number of nights the position will stay open, not forgetting the triple rollover when applicable; finally, compare the result with the trade's planned target.

The swap is usually treated as a minor detail because, unlike the spread, it doesn't show up immediately on the screen. But a cost that goes unnoticed is still a cost. Before deciding to hold any position open overnight, whether on Astron or another platform, it's worth doing this quick math — it keeps a positive result on the chart from turning into a negative surprise on the statement.

Practice before you risk. Open your Astron account and test your ideas on the demo account with R$ 10,000 in virtual funds.

Create free account