Example of a rollover
The way to calculate the interest that has been earned or that needs to be paid is by using the rollover rate, which works off the interest rate differential between the two currencies in a forex pair.
For instance, if the currency pair is EUR/USD, EUR is the base currency and USD is the quote currency – meaning you would be buying the euro and selling the US dollar.
If the EUR had an interest rate of 3% compared to 1% for the USD, you would be credited the interest rate differential of 2% a year (on an unleveraged trade). However, if the USD had a higher interest rate, you would be debited the interest rate differential.