Gains from the sale of investments must be reinvested within 180 days of the day they are recognized as taxable income to avoid paying taxes on that income.