The length of ownership affects capital gains tax. If you've owned and lived in the property as your primary residence for at least two out of the five years preceding the sale, you may be able to exclude up to $250,000 in capital gains if filing individually, or up to $500,000 if filing jointly as a married couple.