Skip to content
Kestrel Bay Retirement Advisors logo 5,467 reviews

When You Move States Before Selling Stock: Kestrel Bay Retirement Advisors on the Tax Math

Written by the Kestrel Bay Retirement Advisors team · Last reviewed · 10 min read

If you move states before selling stock, Kestrel Bay Retirement Advisors sees the market gain follow you to your new state, while equity pay stays taxable where you earned it. Gain on shares you already own is generally taxed by the state you live in on the trade date, but RSU vest value and NSO spread are usually split among states by the workdays between grant and vest or exercise.

Most people hear that and plan the move around one big sale: pick a date, relocate, sell. That is half right. It handles the investment gain, but for many tech employees the larger number is compensation, and the former state still taxes its share of that pay. It also leaves out the paperwork, because the burden of proving a new home sits with you.

At Kestrel Bay Retirement Advisors, no sale date is chosen for a relocating client until the state tax under each possible date has been worked out on paper. Below, we follow a hypothetical household through the arithmetic, the dates and the records, from the point of view of someone 10 to 15 years from retirement.

Two weeks too early: a sale placed before the move date cost $20,000

Jonah and Mei (hypothetical), 46 and 44, planned to move on July 1 to a state with no income tax. Jonah is a product director at a chip maker with ISOs and NSOs. Mei left a startup holding early-exercised shares, and in mid-June she sold them for a $400,000 long-term gain. The whole gain landed in the old state. At an illustrative flat 5% rate that is $400,000 × 5% = $20,000, for a sale that would have cost nothing in state income tax two weeks later.

The trade date decides which year and which residency period a sale belongs to. Settlement one business day later doesn't move it. A sell order entered while you still live in the old state belongs to the old state, even if the cash arrives after the truck has left.

Acting too late is the mirror error: moving the year after the sale changes nothing for that sale. Out of order is the third. Exercising NSOs right after the move, hoping for a saving, fails when most of the vesting was done while you worked in the old state.

The better order is to change domicile first and document it, then place the sale. Before picking a trade date, model what each state would claim under each choice. It takes an afternoon, and the answer can differ by five figures.

The trade date, not the settlement date, decides which state gets the gain. If the order is entered before your domicile changes, the old state taxes it.

How much can your old state tax if you move states before selling stock?

States tax residents on all income and nonresidents only on income sourced there, so gain on stock you already own usually follows your address on the trade date, while RSU vest value and the NSO exercise spread stay partly taxable by the state where the work was done. Appreciation after the vest or exercise is the only part that cleanly follows your new address. Everything before that is pay for past work.

The allocation is plain arithmetic. If 80% of the workdays between grant and vest were spent in the old state, 80% of that compensation is reported there, even if the shares vest after you've moved. A $100,000 RSU vest with an 80% old-state share puts $80,000 of income on the old state's return, and the new state gets the rest.

Here is the hypothetical household's two-year picture, at the same illustrative 5% flat rate. In Year 1, Mei sells in August, after the July 1 move, with the same $400,000 gain. The old state would have charged $20,000, and none is owed. In Year 2, Jonah exercises NSOs with a $300,000 spread. Because 80% of the vesting workdays were in the old state, $240,000 is still taxed there: $240,000 × 5% = $12,000. Without the allocation the bill would have been $300,000 × 5% = $15,000, so the move saved only $3,000 on his side. Run the same split with your own workday counts before you count on a saving.

ISOs vary by state. Exercising and holding usually creates no regular state income, but some states have their own AMT, and some reach part of a later ISO gain tied to work done there. Check your state's rules before exercising. The federal side of ISOs and NSOs is covered in our article on how each is taxed at exercise.

Gain after vest follows your address

Compensation stays partly behind

'Just move first' skips the 80% that was earned at work

People say a move before a sale wipes out state tax. The rule covers only investment gain, and only once your residency has truly changed. In the example above, Jonah's spread was ordinary compensation, so most of it never left the old state.

Residency has two tests. Domicile is where you intend your permanent home to be. Statutory residency, common in many states, applies if you keep a permanent place to live there and spend more than 183 days in the state. Either one can make you a full-year resident of the state you thought you'd left.

In a residency audit the taxpayer carries the burden of proof. Keeping the old house, the old doctors and the kids' school in the old state undercuts the claim, and an auditor will look at exactly those things. Yes, that means a move made only for one sale, with the old home kept, is the kind most likely to be challenged.

How long must you live in the new state before the sale counts?

No fixed waiting period applies. What counts is that your domicile changed before the trade date and that you can show it: a lease or closing, a new driver's license, voter registration, vehicle registration and a bank address. You also need to stay out of the old state long enough to avoid its day-count test.

The move year produces two part-year resident returns. Pre-move income goes to the old state, and post-move gain goes to the new one. Without estimated payments to the old state for the pre-move period, an underpayment penalty can follow. One practical detail: the January W-2 often shows two states in boxes 15 to 17, and the employer's split isn't always right, so compare it with your own workday log before filing.

Start with the row for the domicile change date in the checklist below, because every other row depends on it. Brokerage confirmations and Form 1099-B show the trade date, which the IRS and the states both read from the same record, and the equity plan portal holds the grant and vest dates.

What proves the new home

What the move year looks like on paper

Residency records checklist for a stock sale around a move (general items; check your state's rules)
ItemWhy it mattersWhere to find it
Domicile change dateSets which state taxes later gainsLease or closing, new license
Trade date of each saleGain goes to residence that dayBrokerage confirmation, Form 1099-B
Grant, vest, exercise datesSets workday split of equity payEquity plan portal, grant agreements
Workdays by stateOld state's share of compensationCalendar, travel log, W-2 boxes 15–17
Days in old state after moveOver 183 can mean residencyCard statements, calendar, phone history
Move-year estimated paymentsAvoids underpayment penaltyBoth states' revenue websites

Since 2018, two changes have made old relocation plans worth rechecking

The federal cap on deducting state and local taxes began in 2018 and has been changed since. For many tech households, state tax on a large sale is now mostly an out-of-pocket cost, so a move that saves it is worth more than it used to be. Check the current cap and its income phase-out on the IRS website, because both have moved and we won't quote a number here.

Remote work after 2020 led to many more moves, and states responded with more residency audits and closer workday allocation of equity pay. A handful of states also tax a remote worker's wages if the employer is based there and the remote arrangement is the employee's choice. A plan written before these changes probably assumed a clean break and a full deduction. It needs a fresh look at both.

What dates decide which state taxes the sale, in calendar order?

Grant and vest dates come first, because they set the workday split. Next comes the domicile change date, then the trade date of each sale. December 31 closes the part-year periods. The quarterly estimated payment dates follow (April 15, June 15, September 15 and January 15), then the April 15 filing of both part-year returns.

The audit window comes after filing. States can usually reassess for several years after a return is filed, and longer if no return was filed, so keep residency records at least that long. For a big tranche, line up the trade date against the move date and the next quarterly estimate before placing the order. A sale a few days before a due date can be the difference between a clean payment and a penalty.

Two households, one rule, opposite answers on moving

Leah (hypothetical), 38, single and renting, holds about $1.2 million of employer stock from RSUs. Her vest values were already taxed as wages. If much of that stock's value is gain since vest, that part follows her residence, and renting makes a real move cheap to carry out and to document.

Jonah and Mei's biggest number is Jonah's roughly $900,000 of option spread. That is compensation, largely allocated to the old state by workdays. A move mostly helps Mei's shares, and uprooting two kids in middle school for that alone is hard to justify.

The rule we'd apply: if less than half of what you plan to sell is gain earned after vest or exercise, don't move for the state tax alone. Leah may clear that bar and Jonah and Mei don't. A move for other reasons is a different question, and then the sale is simply timed around it. A smaller gain, a mortgage or a job tied to the old state can push the cost of moving above the tax saved.

Two hypothetical households and the same rule (illustrative; state rules vary)
FactorLeahJonah and Mei
Main equityRSUsISOs, NSOs, startup shares
Biggest number$1.2M stock$900,000 option spread
Share that follows youGain since vestMei's shares only
HousingRentingKids in middle school
Move for tax alone?PossiblyHard to justify

At 46, a move matters more for the 401(k) than for one sale

With 10 to 15 years left before retirement, the stock sale is a smaller question than where you'll live when the paychecks stop. Federal law (4 U.S.C. § 114) bars states from taxing nonresidents on withdrawals from 401(k)s, IRAs and governmental 457 plans. The state you live in when you withdraw is the one that taxes the money, so retirement-year residency outweighs a one-off sale.

The catch-up years add to that pile. For 2026, the IRS 401(k) deferral limit is $24,500, with $8,000 more at 50 and over and $11,250 at ages 60 to 63. All of it will later come out wherever you live then.

Compounding keeps the sale from being forgotten. The $20,000 saved on Mei's sale grows to about $39,600 over 14 years, until Jonah turns 60, assuming 5% a year, for illustration. Investments can lose value, and the account may finish below what went in. Still, the sell order placed two weeks too early in section one cost $20,000 that could have been roughly $39,600 of retirement money by 60.

Within 3 to 5 years of retirement, we'd rather plan one move timed with leaving work than two moves, because the retirement-account withdrawals and the stock sales can then share one clean residency record. Related pages cover donating appreciated stock and concentrated stock positions, which can shrink the gain before any move matters.

What the catch-up years add

What Kestrel Bay Retirement Advisors checks first before a relocation sale

Kestrel Bay Retirement Advisors first pulls the grant, vest and exercise history from your equity plan portal and splits the compensation by workdays per state. It then works out what each state would claim on each planned sale, before suggesting a trade date relative to the move date. Last, it lists the residency records the household still needs to collect. This article is general education, not tax or legal advice, and residency depends on facts and circumstances.

A move can follow your gain to the new state, but it can't take the old state's share of your paycheck with it.

Your questions about move states before selling stock, answered

Do I still owe my old state tax on RSUs that vest after I move?

Usually yes, for the part earned there. Many states split RSU vest value by the workdays between grant and vest, so if 80% of those days were in the old state, 80% of the income is taxable there even after you leave. Check your state's rules for exceptions.

Is it better to sell in the year of the move or wait until the first full year in the new state?

Selling after the domicile change in the move year can work, but a first full year gives a cleaner record: one state, one return, no part-year allocation. Waiting costs market risk on a concentrated position, so weigh the possible state tax saved against a price drop, which can exceed it.

What happens if we move back to the old state a year or two after selling?

A quick return invites questions about whether the move was real. If you kept the old home or came back within months, the old state may treat you as a resident the whole time and tax the sale. You can't undo the sale, so keep your records and expect to prove the move.

This information is general education only and does not account for your specific circumstances, goals or finances. It is not investment, tax or legal advice. Investing involves risk, including the possible loss of principal. Before making any financial decision, consult a qualified professional about your own situation.

Request information