You're thinking of an old law. The current law gives you a $250,000 capital gains tax exemption when you sell a house ($500,000 on a joint return). And you can do it as many times as you sell for a gain, after living in the house as your primary residence. It doesn't matter what you do with the money after the sale. For example, you could put the cash in the bank and decide to rent.