Pomegra Wiki

Capital Gains When Moving Between States

When you move between states and sell an investment, determining which state can tax your capital gain depends on the source of the income (where the property is located) and your tax residency at the time of sale, not where you lived when you bought it. Some states tax non-residents on locally-sourced gains; others only tax their residents.

Source of Income: The Foundation Rule

The core principle underlying state capital gains taxation is source of income. A state can tax income generated within its borders. This rule divides income into two categories:

  1. Source-based income — income tied to a specific location (real estate, business activities, natural resource extraction)
  2. Non-source income — income without geographic nexus (most stocks, bonds, interest, royalties)

A capital gain from selling real estate is almost always source-based. If you own an apartment building in California and sell it for a $500,000 gain, California can tax that gain regardless of whether you’ve moved to Texas, Florida, or abroad. The source is California real estate; the source state claims the income.

Capital gains from selling publicly-traded stocks, mutual funds, or ETFs are non-source income. These are typically taxed only by your state of residence (domicile) at the time of sale. The location of the stock exchange, the company’s headquarters, or the brokerage does not matter.

Residency and Domicile Timing

At the time of the sale, your state of residence determines tax exposure for non-source gains. If you sell Apple shares in February while you’re a California resident, California taxes the gain. If you sold those same shares in February after establishing domicile in Texas (which has no income tax), Texas does not tax the gain, and California generally cannot either, provided you’ve truly left California.

The challenge arises with part-year residence. If you sold the stock in June, having moved from California to Texas in May, California may claim the first five months of the year were when you “earned” the gain through price appreciation and demand tax on a proportional portion. Similarly, Texas might try to tax it as a non-resident transaction on Texas soil.

Most states follow the year of realization rule: the state where you resided when you completed the sale (when you hit “sell” and locked in the gain) taxes the full gain. But states differ, and some attempt to tax based on when the appreciation occurred (years of ownership).

Non-Resident Taxation of In-State Property

Several high-tax states explicitly tax non-residents on gains from in-state property.

  • California: Taxes all capital gains on California-source income, including real estate sales by non-residents. Selling California real estate as a new Texas resident still triggers California tax.
  • New York: Taxes non-residents on New York-source gains, including real property and business activities.
  • Connecticut and New Jersey: Tax non-residents on Connecticut/New Jersey-source gains from real estate.

Other states do not tax non-residents on capital gains at all. Florida, Texas, and Wyoming have no state income tax, so they cannot tax capital gains. A non-resident of Florida can sell Florida real estate with no Florida state tax.

States that tax only residents (e.g., Pennsylvania and Massachusetts) do not tax capital gains from in-state property if you’re a non-resident at the time of sale.

Practical Scenarios

Scenario 1: Sell real estate before moving

You own a rental house in Michigan and live there. You sell it in March for a $200,000 gain while still a Michigan resident. You move to Florida in July.

Result: Michigan taxes the full $200,000 gain. You lived in Michigan when the sale closed, and Michigan-source property generates Michigan tax. Florida has no income tax, so your relocation does not help.

Scenario 2: Move first, then sell

You own Michigan real estate, move to Florida in March, and sell the property in October after establishing Florida domicile.

Result: Michigan still taxes the full gain. It is Michigan-source property. Michigan taxes all gains from Michigan property, regardless of the owner’s residence. Your move to Florida does not shield you. You now have conflicting state tax returns to file in both states.

Scenario 3: Sell stock after moving

You buy Apple stock as a California resident in 2020 at $100/share. You move to Texas in June 2024 and sell the stock at $200/share in September 2024.

Result: Texas has no income tax, so it does not tax capital gains. California does not tax non-residents on non-California-source gains (stocks). The gain is entirely non-taxable at the state level (federal capital gains tax still applies). This is why high-income investors often relocate to zero-income-tax states before realizing large gains.

Scenario 4: Part-year residence

You are a New York resident, sell appreciated stock in New York in May 2024, and move to Florida in July 2024.

Result: New York taxes the gain under the year-of-realization rule. You were a New York resident and lived in New York when the sale closed. Florida does not tax capital gains. The gain is New York-taxable only.

Scenario 5: Cross-border property sale

You buy a vacation home in Maine (a resident state with no capital gains tax) while living in Massachusetts and own it for five years. You move to Maine and establish domicile there, then sell the home for a $150,000 gain.

Result: Maine does not tax capital gains on real property sales (Maine has no capital gains tax). Massachusetts, by residency rules, typically taxes only residents on capital gains. You are now a Maine resident, so Massachusetts does not tax you. If you sold while still a Massachusetts resident before moving to Maine, Massachusetts would tax the gain, because Maine real estate held by a Massachusetts resident is still Massachusetts-taxable under residency rules (even though Maine wouldn’t tax it). The advantage of moving first: you escape Massachusetts taxation.

The Domicile Audit Risk

States protect their tax base by challenging whether a taxpayer has truly changed domicile. If you claim to have moved to Florida in March but your family remained in New York, you still own a home there, or you spent 120 days in New York that year, the state will argue you remain a New York resident.

The IRS and state tax authorities look at:

  • Days spent in each state
  • Location of spouse and dependents
  • Home ownership and occupancy
  • Driver’s license and voter registration
  • Business and employment ties

Selling a large capital gain and relocating shortly after raises audit flags. If a state believes your move was tax-motivated and retroactively disqualifies your new residency, it will tax the gain as if you were still a resident when the sale occurred.

Strategy and Timing

Investors seeking to minimize capital gains tax often structure moves before large sales:

  1. Establish new domicile before the sale closes (not immediately after) by spending time in the state, obtaining a driver’s license, and establishing genuine residence. Most advisors recommend 30+ days of presence in the new state before sale.

  2. For real estate, moving to a non-taxing state does not help; the property’s source state always taxes. The strategy is to hold the property long-term, plan the sale in a lower-tax environment, or donate it to charity to eliminate the tax entirely.

  3. For stocks and intangibles, the sequence matters: move and establish residency, then sell. Once you sell as a non-resident of your old state, the old state generally cannot tax you.

  4. Document the move extensively: lease agreements, utility bills, tax return filings, and communication updates ensure the state cannot challenge your residency claim.

Professional tax advisors help structure relocation timing and documentation to survive audit scrutiny.

See also

  • Capital Gains Tax — Federal long-term vs short-term rates
  • Cost Basis — Foundation for calculating the taxable gain
  • Tax Bracket — How gains push income into higher brackets
  • Depreciation Recapture — Real estate-specific gains subject to higher rates
  • Tax Loss Harvesting — Offsetting capital gains with losses

Wider context