Usually, you have a capital gain or loss when you sell or are considered to have sold or disposed of the property.