When selling a rental property turned vacation home, what tax rules apply?

When you sell a second home that has been generally used as your residence, you have to pay tax on the capital gains on the sale.