Generally, you can realize a foreign exchange gain or loss for income tax purposes in one of three ways.
First, you can have a foreign gain or loss when you buy and sell a foreign currency. The gain or loss will be the difference between what you paid for the currency in Canadian dollars relative to what you realized on the sale in Canadian dollars. In this case, a special rule in the Income Tax Act says you ignore the first $200 of net foreign exchange gains or losses for each year. Of the remaining net gain or loss, half will normally be a taxable capital gain or allowable capital loss, as the case may be. (However, if you are actively trading in foreign currency, it could be business income or loss.)
Second, you can have a gain or loss if you purchase and sell a property in foreign currency. In such case, the gain or loss will be the difference between the sale price, converted into Canadian dollars at the time of sale, and the purchase price, converted into Canadian dollars at the time of purchase. If the foreign currency fluctuated from the time of purchase to the time of sale, all or part of your gain or loss will be a foreign currency gain or loss.
Example
I bought a condo in Florida five years ago for US$100,000, when the exchange rate was 1 USD = 1 Canadian dollar. As such, the condo cost me C$100,000. I sold the property recently for US$90,000, when the exchange rate was 1 USD = C$1.34 $.
Looking at only the US dollars, one would think I had a $10,000 loss.
However, for Canadian tax purposes, I bought the condo for $100,000 and sold it for $90,000 x 1.34, or $120,600, so I must actually report a capital gain of $20,600, half of which is included in my income as a taxable capital gain.
Third, you can have a foreign exchange gain or loss when you repay the principal amount of a debt or other liability denominated in foreign currency. The gain or loss will be the difference between the principal amount you repay, converted into Canadian dollars at the time of repayment, and the principal amount of the debt, converted into Canadian dollars at the time you incurred the debt.
Example
I borrowed 100,000 euros, when the exchange rate was 1 euro = 1.4 Canadian dollar. As such, the loan was C$140,000 in Canadian currency. I later repaid the 100,000 euros when the exchange rate was 1 euro = 1.5 Canadian dollar. Therefore, I repaid C$150,000. Since I repaid $10,000 more in Canadian dollars than I borrowed, I will have a $10,000 foreign exchange loss, half of which will be an allowable capital loss.
The above discussion assumes that the properties or borrowing are on capital account. If, for instance, in the first example I was in the business of buying and selling properties, (including if I held the condo for only a short time), any foreign exchange gain or loss on the sale of the property would likely be considered by the CRA to be business income or loss, and therefore fully included in income or fully deducted, as the case may be.