Hello, Suppose I sell a stock for a capital gain this week in a state that taxes you on capital gains. But then I move to another state that has no capital gains tax, and live there for the rest of the year. Do I still have to pay the capital gains tax (because I was living in the tax state at the time of sale)? There is some sort of six-month-plus-one-day rule to determine which state is your tax state. I would be living in the new state for 11 months and perhaps longer... so it's not like I would be pushing the limits on the shortest amount of time possible to live in the state. It's the timing of the sale of the stock that has me concerned. I want to sell the stock before moving, but I would like to (legally) not have to pay the capital gains tax. I'm hoping I can sell the stock, move to the new state in February, and then not have to pay the tax. I'm not sure if the timing of the sale of the stock matters. I almost think it would not matter. A person moving from a non-tax state to a tax state could theoretically sell a ton of stock on Jan 2, then move to the tax state for 363 days. Even though he/she sold the stock immediately prior to moving, the tax state would want to claim tax on the sale, since the person lived in the new tax state for 363 days, Does anybody know what the rules are on this? (P.S. this is a non-trivial amount of tax).