It's worked out by the interest rate differentials in whatever currencies your holding and for how long your holding them. Here's a handy calculator for u from Oanda
http://www.oanda.com/products/fxmath/interest.shtml
Hang on here you've posted here 534 times and it's only now you've discovered swap rates ???