This article reflects federal rules and the rules of California and New York as of June 2026 and covers tax year 2025 (returns filed in 2026). Tax law changes — confirm current figures with the IRS and your state tax agency before you file.
Quick Answer
The state you live in when you sell taxes the gain on stocks and other intangible property. But real estate and business property stay taxed by the state where they sit — even after you move. Part-year residents split the year and file in both states for tax year 2025.
When you move states, your capital gains do not all follow you to the new state, and that surprise can cost you thousands of dollars on a single sale. Where each gain is taxed depends on what you sold, when you sold it, and which state you legally lived in on the sale date — and getting any of those wrong can trigger a tax bill, penalties, or a residency audit you did not expect.
The stakes are real because more people are moving than you might think. About 8.3 million Americans moved between states in a recent year, according to the U.S. Census Bureau, and many carry built-up stock, home, or business gains with them. The timing of a single sale around a move can swing your tax bill by tens of thousands of dollars, especially if you leave a high-tax state like California or New York for a no-tax state like Florida or Texas.
Here is what you will learn:
- 🧭 How states decide which gains they get to tax after you move, and why “I live here now” is not the whole answer.
- 🏠 Why selling your old rental or vacation home can still owe tax to your former state — the single biggest, most expensive myth.
- 📊 Three fully worked dollar-by-dollar examples covering stocks, a primary home, and out-of-state real estate.
- 📝 The exact forms to file in two states, the deadlines, and how part-year allocation works on California’s Form 540NR.
- ⚠️ The mistakes, audit traps, and “183-day” myths that turn a clean move into a costly fight.
What “Capital Gains” and “Moving States” Really Mean Here
A capital gain is the profit you make when you sell an asset for more than you paid for it. The asset can be stock, a mutual fund, a rental house, a business, or your own home. The federal government taxes that profit, and so do most states. Forty-one states plus Washington, D.C. tax capital gains as ordinary income, while a handful — Florida, Texas, Washington (mostly), Nevada, South Dakota, Wyoming, Alaska, Tennessee, and New Hampshire — impose no broad personal income tax on these gains.
Moving states sounds simple, but tax law cares about two separate ideas: residency and domicile. Residency is where you actually live during the year. Domicile is your one true permanent home — the place you intend to return to. You can be a resident of two states in one year, but you have only one domicile. When you move, you must end the old domicile and start a new one, and the date you do that controls which state taxes your income.
The key federal idea is the Section 121 home-sale exclusion, which lets you exclude up to $250,000 of gain ($500,000 for married couples filing jointly) on the sale of your main home if you owned and lived in it for two of the last five years. The key state idea is sourcing — the rule that decides which state a particular dollar of gain “belongs” to. Federal law sets the size of your gain; state sourcing rules decide who gets to tax it.
These two layers do not always match. The IRS taxes your worldwide income no matter where you live, so your move rarely changes your federal bill on a sale. The state layer is where the move matters, because each state writes its own sourcing rules and they often disagree. Start with the federal number, then ask the separate question: which state gets this gain?
The Core Rule: Intangible vs. Real Property
The whole topic turns on one split. Intangible property — stocks, bonds, mutual funds, crypto, and similar financial assets — is generally taxed by the state where you live on the day you sell. Real and tangible property — land, houses, rental buildings, and physical business equipment — is taxed by the state where the property is physically located, no matter where you live.
This is why moving works for some assets and fails for others. If you sell Apple stock the day after you become a Florida resident, the gain is intangible and follows you to no-tax Florida. If you sell a California rental house the day after you move to Florida, the gain is California-source income because the dirt never moved. As Forbes reports on California sourcing, income from California real estate is always California-source income, and income from tangible property is California-source if the property sat in California.
The consequence of confusing the two is a direct tax bill plus interest. A taxpayer who moves to Florida, sells a California rental, and reports $0 to California will get a notice from the Franchise Tax Board for the full tax, plus penalties and interest that can add 20% or more. The misconception — “I live in Florida now, so I owe no state tax on the sale” — is the costliest mistake in this entire area.
What you should do about it is simple: before you sell, ask “is this asset real/tangible or intangible?” If it is real estate or physical business property, plan to owe tax to the state where it sits, file a nonresident return there, and claim a credit on your new home state’s return only if that state also taxes you. If it is stock or another intangible, the date you change residency is what controls — so the timing of the sale becomes your main lever.
Which Situation Applies to You?
The right answer depends on your facts. Use this to find your path through the rest of the article.
- You sold stocks or funds after moving, and the move was clean (one state, then the other). Your gain is taxed by the state you lived in on the sale date. Go to the stocks example below and the part-year section.
- You sold your primary home around the time of the move. Federal Section 121 may erase most of the gain; the state where the home sits taxes any leftover. See the home-sale example.
- You still own real estate or a rental in your old state and sold it after leaving. The old state taxes that gain as a nonresident, period. See the out-of-state real estate example and the credit rules.
- You moved mid-year and were a part-year resident of two states. You file in both and split the year by residency date. See the Form 540NR walkthrough.
- You sold a business, partnership interest, or S-corp on an installment plan. Sourcing gets complex and state-specific. See the installment and business-interest section.
- You left a high-audit state like New York or California. Expect scrutiny of your move date and day count. See the audit section.
Worked Example 1 — Selling Stock After a Clean Move
Maria sells $400,000 of stock she bought years ago for $150,000, producing a $250,000 long-term capital gain. She had lived in California all her life but moved to Texas, changing her domicile on July 1, 2025. She sells the stock on August 15, 2025 — after the move.
Stock is intangible property, so the gain is sourced to where Maria lives on the sale date. On August 15 she is a Texas resident, and Texas has no personal income tax. California cannot tax the gain because she was a nonresident when she sold an intangible asset, and the gain has no California source. California’s own Residency and Sourcing Technical Manual confirms a part-year resident is taxed only on California-source income during the nonresident period.
Here is the math for tax year 2025:
| Step in Maria’s Sale | Dollar Result |
|---|---|
| Sale price of stock | $400,000 |
| Cost basis (what she paid) | $150,000 |
| Long-term capital gain | $250,000 |
| Federal long-term capital gains tax (15% bracket, single) | About $37,500 |
| California tax (sold as a Texas resident, intangible) | $0 |
| Texas state income tax | $0 |
| Total state tax saved by selling after the move | About $25,000+ |
Had Maria sold one day before she moved, California would have taxed the full $250,000 at rates up to 13.3%, costing her roughly $25,000 to $30,000 in state tax. The federal tax of about $37,500 is the same either way, because federal long-term rates of 0%, 15%, and 20% apply no matter where she lives. The single most valuable move she made was selling after her residency changed — and keeping proof of the July 1 move date.
Worked Example 2 — Selling Your Main Home Around a Move
David and Priya, married and filing jointly, sell their primary home in Phoenix, Arizona, for a $480,000 gain after owning and living in it for nine years. They sell on May 10, 2025, then move to Colorado.
First, federal law applies the home-sale exclusion: a married couple can exclude up to $500,000 of gain on a main home if they meet the two-of-five-year ownership and use tests. Their $480,000 gain is fully under the $500,000 cap, so they owe $0 federal tax on the sale. The exclusion is the same regardless of which state they move to, because it is a federal rule.
| Step in the Home Sale | Dollar Result |
|---|---|
| Total gain on the home | $480,000 |
| Section 121 exclusion (married filing jointly, 2025) | $500,000 |
| Taxable gain after exclusion | $0 |
| Federal capital gains tax | $0 |
| Arizona tax (home located in Arizona, gain fully excluded) | $0 |
| Colorado tax | $0 |
The state result follows the federal one here. Arizona taxes the gain because the house sat in Arizona, but there is no taxable gain left to tax after the exclusion. Most states, including Arizona and Colorado, start from federal adjusted gross income, so a gain excluded federally is also excluded at the state level. The misconception to avoid is thinking the move itself created the tax break — it did not; the federal Section 121 exclusion did, and it would apply whether or not they moved.
If their gain had been $620,000, the leftover $120,000 ($620,000 minus the $500,000 exclusion) would be taxable. That $120,000 would be Arizona-source income because the home is in Arizona, so they would file an Arizona nonresident return on it even though they now live in Colorado.
Worked Example 3 — Selling Old-State Real Estate After You Leave
This is the trap. Robert moves from California to Nevada (no income tax), changing residency on March 1, 2025. He keeps his California rental duplex and sells it on September 20, 2025, for a $300,000 long-term gain.
Robert is a Nevada resident on the sale date, so he assumes he owes no state tax. He is wrong. Real property is sourced to where it sits, so the $300,000 gain is California-source income even though he is now a nonresident. California’s 2024 Guidelines for Determining Resident Status state that gain on California property is California source income that a nonresident reports on Schedule CA (540NR), column E.
| Step in Robert’s Rental Sale | Dollar Result |
|---|---|
| Long-term gain on the California duplex | $300,000 |
| Federal capital gains tax (20% top bracket, plus 3.8% NIIT) | About $71,400 |
| California tax owed as a nonresident (about 11.3% bracket) | About $33,900 |
| Nevada state tax | $0 |
| Credit on Nevada return for tax paid to California | $0 (Nevada has no income tax to offset) |
Robert owes California roughly $33,900 plus the federal tax, despite living in Nevada. Because Nevada has no income tax, there is no other-state credit to soften the blow — the California tax is a pure cost. He must file a California Form 540NR nonresident return for 2025. The lesson: moving to a no-tax state does not free real estate gains tied to your old state.
How Part-Year Residents File and Allocate
If you move mid-year, you are usually a part-year resident of both states for that tax year. The general rule is that your old state taxes all your income while you lived there plus any income sourced to it after you left, and your new state taxes all your income from your move date forward. You file a part-year or nonresident return in each state and split the year on the residency-change date.
The hardest part is allocation — deciding which state each dollar of gain belongs to. For a capital gain, allocation usually keys off the sale date and the type of asset. An intangible sold while you were a resident of the old state belongs to the old state; the same asset sold after the move belongs to the new state. Real estate stays with the state where it sits regardless of the date.
California handles this on Schedule CA (540NR), where column E captures only the California-source portion. You report your full federal capital gain, then carve out the part California can tax. To avoid being taxed twice on the same dollar, your new home state generally gives you a credit for taxes paid to another state on income both states claim — but only if your new state actually has an income tax.
Installment Sales, Business Interests, and Pass-Through Gains
An installment sale lets you spread gain over several years as you collect payments. When you move mid-stream, each year’s gain can be sourced differently. For intangibles like stock sold on an installment plan, states generally source the gain to your residency in the year you receive each payment. Minnesota, for example, sources installment gain on intangible property to the seller’s state of residence at the time of the sale.
New York treats the resident period separately. Under a New York advisory opinion, installment interest earned while a nonresident is not taxed, except for amounts that must be accrued to the resident period. So if you signed an installment deal as a New York resident and then left, New York may still reach the part of the gain tied to your resident period — a detail many movers miss.
Business interests are their own minefield. New York taxes a nonresident on installment payments from a New York S corporation under TSB-M-10(10)I, and a Section 338(h)(10) deemed asset sale can convert what looks like a stock sale into New York-source business income. The takeaway: gains from a business that operated in your old state are often sourced there even after you move, and you should get a CPA or tax attorney involved before you sell.
Federal vs. State: What Actually Changes When You Move
It helps to see the two layers side by side. The federal rules barely change when you move; the state rules change a lot.
| Tax Layer | What a Move Changes |
|---|---|
| Federal capital gains tax | Almost nothing — the IRS taxes you the same 0/15/20% on long-term gains and your Section 121 exclusion is identical no matter the state |
| State tax on stocks/intangibles | A lot — the state where you live on the sale date controls, so a clean move can drop your state tax to zero |
| State tax on real estate | Nothing for sourcing — the gain stays with the state where the property sits, even years after you leave |
| Two-state filing | New duty — you may file a part-year or nonresident return in both states and claim an other-state credit |
Mistakes to Avoid
- Believing your new state taxes everything and your old state taxes nothing. Real estate and business gains often stay sourced to the old state, and ignoring that triggers a tax bill plus penalties and interest.
- Selling old-state real estate after moving and reporting $0 to that state. The gain is still sourced there, so you will get a notice for the full tax plus interest of 20% or more.
- Not nailing down your residency-change date. A vague move date lets the old state argue you were still a resident when you sold, taxing the whole gain.
- Forgetting to file the nonresident return in the old state. Missing the return can cost late-filing penalties and forfeits your ability to cleanly claim credits.
- Skipping the other-state tax credit on your new return. You can be taxed twice on the same gain if you do not claim the credit your new state allows.
- Assuming the “183-day rule” alone makes you a nonresident. Staying under 183 days does not end your domicile, and a state can still tax you as a domiciliary.
- Triggering New York statutory residency by mistake. Keeping a New York home and spending 184+ days there makes you a resident even if your domicile moved, taxing all your gains.
- Selling stock the day before you move instead of the day after. A few days’ difference can cost tens of thousands in old-state tax on an intangible gain.
- Ignoring installment-sale accrual rules. Gains tied to your resident period can still be taxed by the old state for years.
Do’s and Don’ts
- Do confirm whether each asset is intangible or real property before you sell, because that single fact decides which state taxes the gain.
- Do document your residency-change date with a paper trail — lease, driver’s license, voter registration — because the date controls intangible gains.
- Do file a nonresident return in your old state for any gain sourced there, because skipping it invites penalties.
- Do claim the other-state tax credit on your new state’s return, because it prevents double taxation on the same dollar.
- Do keep a daily location log if you left a high-audit state, because auditors demand proof of where you were.
- Don’t assume moving to a no-tax state erases tax on old-state real estate, because the dirt keeps the gain sourced there.
- Don’t rely on the 183-day count alone, because domicile is a separate, stickier test.
- Don’t keep a permanent home in New York if you want true nonresident status, because it can trap you as a statutory resident.
- Don’t sell a major asset without checking the timing against your move date, because days matter.
- Don’t guess on a business or installment sale, because sourcing rules are complex and the dollars are large.
Pros and Cons of Timing a Sale Around a Move
- Pro: Selling intangibles after a move to a no-tax state can legally eliminate state tax on the gain, saving real money.
- Pro: A genuine move can lower your tax rate on future gains permanently, not just one sale.
- Pro: The federal Section 121 home-sale exclusion follows you, so your home gain stays protected.
- Pro: Proper part-year filing plus the other-state credit prevents paying the same tax twice.
- Pro: Documenting a clean move date strengthens you against an audit.
- Con: Real estate and business gains usually stay taxable in the old state, so the savings are limited to certain assets.
- Con: High-tax states audit movers aggressively, and a weak move can be unwound.
- Con: Waiting to sell exposes you to market risk while you wait for residency to change.
- Con: Two-state filing adds cost and complexity, often requiring a paid preparer.
- Con: Installment and pass-through rules can reach back into your resident period for years.
Leaving a High-Audit State: New York and California
If you leave New York, watch the statutory residency trap. Even if you change your domicile, you are taxed as a New York resident on all your income — including stock gains sourced nowhere near New York — if you keep a permanent place of abode there and spend more than 183 days in the state. Under New York’s residency rules, any part of a day in the state counts as a full day, so even a brief visit can push you over the line.
New York’s auditors are thorough. The state’s own Nonresident Audit Guidelines require you to prove a genuine change of domicile with “clear and convincing” evidence and to document your exact day count. Auditors use cell-phone records, E-ZPass logs, and swipe-card data to rebuild where you were. After the court ruling in Gaied v. Tax Appeals Tribunal, the abode must actually serve as your residence to count — a small but useful protection.
California is just as serious. Its Residency and Sourcing Technical Manual lays out a long list of factors — where your family lives, where you work, where your cars are registered, where your bank accounts sit — to decide whether you really left. There is no “California exit tax” on unrealized gains as of June 2026; proposals have surfaced but none is law. The real risk is California arguing you never truly left, then taxing your intangible gains as a resident.
What to Do Next
- Identify each asset as intangible or real/tangible property, because that decides which state can tax the gain.
- Pin down your residency-change date and gather proof — lease or deed, driver’s license, voter registration, utility bills — before you sell anything large.
- Time intangible sales for after your move if you are heading to a lower- or no-tax state, and keep records of the sale date.
- For old-state real estate, plan to file a nonresident return there and budget for the tax even if your new state has none.
- File the right forms — for example, California’s Form 540NR for part-year or nonresident gains — by the federal and state April deadline (April 15, 2026 for tax year 2025), and request an extension if needed.
- Claim the other-state tax credit on your new state’s return to avoid double taxation.
- Hire a CPA or tax attorney if you are selling a business, using an installment sale, or leaving New York or California — the dollars and audit risk justify the fee, which often runs a few hundred to a few thousand dollars.
This article is educational and is not a substitute for advice from a licensed tax professional about your specific situation. When a sale involves a business, an installment plan, multiple states, or a high-audit state, the cost of a professional is small next to the tax at stake.
FAQs
Which state taxes my capital gains after I move?
The state where you live on the sale date taxes gains on stocks and other intangibles. Real estate and business property stay taxed by the state where they are located, no matter where you live when you sell.
Do I pay capital gains tax in two states if I move mid-year?
Yes, you can, but you usually get a credit. As a part-year resident you file in both states, and your new state generally credits tax paid to the old state on income both claim, so you are not taxed twice.
Can I avoid state capital gains tax by moving to Florida before I sell?
Only for intangibles like stock. Moving to Florida before selling stock can drop your state tax to zero. But gains on real estate or a business in your old state stay taxed there even after you move.
Does selling my house trigger state tax when I move?
Usually no, thanks to the federal Section 121 exclusion of up to $250,000 (single) or $500,000 (married filing jointly) for tax year 2025. Only gain above the exclusion is taxable, and the state where the home sits taxes it.
What is the difference between residency and domicile?
Residency is where you live during the year; domicile is your one permanent home. You can be a resident of two states in a year, but you have only one domicile, and ending the old one is essential to a clean move.
Does the 183-day rule alone make me a nonresident?
No. Staying under 183 days in a state does not end your domicile. A state can still tax you as a domiciliary, and in New York 184+ days plus a home there makes you a statutory resident.
How are installment-sale gains taxed when I move?
Year by year, based on where you live when paid for most intangibles. But states like New York can still tax the part of the gain tied to your former resident period, so check the rules before you move.
Do I owe my old state tax on a rental I sell after leaving?
Yes. Real estate gain is sourced to the state where the property sits. Selling a former-state rental after you move still produces taxable income in that old state, reported on its nonresident return.
Does the federal capital gains tax change when I move states?
No. The IRS taxes long-term gains at 0%, 15%, or 20% no matter where you live, and your home-sale exclusion is identical. Only the state tax layer changes when you move.
Which form do I file as a California part-year resident?
Form 540NR, the California Nonresident or Part-Year Resident return. You report your full federal gain, then use Schedule CA (540NR) column E to show only the California-source portion for tax year 2025.
Will New York audit me if I move away?
Possibly, yes, especially if you keep a home there or have large income. New York requires clear and convincing proof of a genuine domicile change and reviews cell-phone, E-ZPass, and swipe-card records to count your days.
Can I be taxed twice on the same capital gain?
Usually no, if you claim the other-state tax credit. When two states tax the same gain, your resident state generally credits the tax paid to the other state — but only if your resident state has an income tax.