Part-year California resident tax on capital gains realized while living elsewhere

Moved from California to Texas in March last year. Sold a chunk of index fund shares in September, well after I'd established residency in Texas. Broker sent a 1099-B showing all the gains, and now I'm staring at TurboTax asking me to allocate income to California for the part-year return. The shares were purchased years ago when I lived in CA, but the sale happened entirely while I was a Texas resident. I've been reading about sourcing rules but I keep finding conflicting things — some say CA taxes gains based on where you lived when you sold, others suggest they look at where you lived when you accrued the gain. Which state actually gets to tax this, and what does the CA 540NR part-year form actually want me to put on the income allocation schedule?

32 comments

I dealt with nearly the same CA-to-elsewhere split on last year's return. California taxes you as a part-year resident on income you earned while a CA resident, and on California-source income you earned after you left. For capital gains on publicly traded securities, the sourcing rule is based on your residency at the time of the sale — not where you bought the shares or where the company is headquartered. If you sold in September and you were a Texas resident by then, that gain generally isn't California-source income and shouldn't go on the CA column of your 540NR.

Matt A.

Author

That's what I was hoping to hear. So the date of sale is the key date, not the date of purchase? The shares were bought in CA but that shouldn't matter for the state allocation?

Correct. The sale date and your residency on that date control. CA doesn't apportion stock gains based on where you lived during the holding period, unlike wages from an employer that may require day-count allocation.

My situation last year had a similar question — I sold stock after moving out of CA and wasn't sure how to fill the allocation column. I uploaded my 540NR and the 1099-B to taxr.ai and had it walk through each line of Schedule CA (540NR) for my actual numbers. It flagged that I was about to include the September gain in the CA column when it shouldn't be there based on my move date. Really helped me catch it before I filed.

Matt A.

Author

Good to know it can go line by line on the 540NR — that form's allocation columns are what's tripping me up most.

Worth double-checking when California considers you to have changed residency. It's not just about physically leaving — CA FTB looks at your intent to establish domicile elsewhere and they're aggressive about it. If you kept a CA driver's license, voter registration, or maintained a home there past March, they may argue your residency change happened later than you think.

Matt A.

Author

I updated my license and voter registration when I moved, and my CA lease ended in March. I also don't have any property there anymore. Hoping that's clean enough.

That sounds like a solid paper trail. Keep documentation of your move date — utility shutoffs, new TX lease start date, that kind of thing. FTB audits on residency changes do happen.

I want to add something that tripped me up: if any of your shares were RSUs that vested while you were still a CA resident, California may assert that the ordinary income piece (the vest-day FMV included in wages) was CA-source regardless of when you sold. The capital gain portion from appreciation after vesting is still governed by residency at sale, but the two pieces are reported differently. Does your 1099-B show just one lump or did your employer also issue a W-2 adjustment?

Matt A.

Author

These are plain index fund shares I bought myself, not RSUs. No employer comp involved. So I think I'm dealing purely with capital gain on the sale.

That simplifies things considerably. With open-market purchases the whole gain is capital gain and the sale-date residency rule applies cleanly.

Moved from CA to Nevada two years ago and had gains in the year of the move. I ran my 1099-B and my 540NR draft through Taxr and it checked whether my sale dates fell inside or outside my CA residency period and then showed me exactly which lines of the CA allocation column to leave blank. Saved me from over-reporting to FTB by a significant amount.

The allocation column on 540NR is genuinely confusing. CA column is only your CA-period income plus CA-source post-move income. Everything else goes in the total column but not the CA column.

One thing that matters for federal: even though CA won't tax the gain, you still report the full sale on federal Form 8949 and Schedule D. The 1099-B goes on 8949 regardless of where you lived. Texas has no income tax so there's no state filing there.

Matt A.

Author

Yeah I figured the federal side was straightforward — the whole gain goes on 8949 and Schedule D as long-term. The CA allocation is the only piece I was unclear on.

Something to watch: California's 540NR uses Schedule CA (540NR) to reconcile your federal AGI down to what CA can actually tax. The capital gain from the September sale should appear in the "total" column (which starts with your federal amounts) but should not appear in the "California" column. If TurboTax is auto-populating that CA column with the full gain, it's worth going into the allocation interview and entering your move date carefully.

Matt A.

Author

This is exactly the step I think I was missing. I'll go back into the interview and make sure the move date is set correctly — TurboTax might have defaulted to treating me as a full-year CA resident.

Check the residency question at the very beginning of the state return section. If it says "full-year resident" that would explain why everything is landing in the CA column.

Lived in CA for three months last year before leaving. My part-year return only had to include wages from those three months and gains from sales I made during those three months. Gains from later in the year on the same securities were zero in the CA column.

Heads up on one edge case: if you had capital loss carryovers from prior California returns, CA tracks those separately from federal. CA doesn't always match the federal carryover, especially if you had prior-year losses that CA limited differently. When you file the 540NR you'll want to check your prior CA return's loss carryover schedule to make sure the numbers reconcile.

Matt A.

Author

I do have a small loss carryover from a prior CA year. I'll pull up that prior 540 and find the carryover line. Good catch.

My accountant told me CA is one of the states that does not conform to federal capital gains rates — CA taxes all capital gains as ordinary income at regular CA rates. So even though federal gives you the preferential long-term rate on assets held over a year, CA applies your CA ordinary income rate to the gain. That said, if the gain isn't CA-source for you anyway, it's moot for the CA return.

Correct on the rate point — CA has no preferential rate for long-term gains. But as noted, if the sale happened post-move and it's not CA-source, it doesn't go in the CA column and that rate question doesn't come up for this person's situation.

Worth clarifying something from earlier in this thread: someone mentioned CA looking at "where you accrued the gain." That language applies to things like deferred compensation tied to a CA employment period, not to open-market stock sales. For publicly traded securities sold on the open market, CA follows residency at the date of sale. I don't want that to create confusion for anyone reading this later.

Good clarification. The accrual-period concept comes up in nonresident allocation of wages and certain deferred comp, not for straightforward brokerage transactions.

My part-year CA return got kicked back once because I left the CA column blank for income that FTB thought should be there. If you're leaving the gains out of the CA column, make sure your move date is documented and consistent across the return — the date on the 540NR part-year section, the date in Schedule CA, and what your records show should all match.

Matt A.

Author

Noted — I'll make sure the move date I entered in TurboTax matches what's on my lease and license. Consistency is what I need to avoid a letter from FTB.

I used a CPA who specializes in multi-state returns for my move year and would genuinely recommend it if the numbers are large. The residency determination and the Schedule CA allocation are the two spots most likely to trigger FTB scrutiny, and a CPA or enrolled agent who handles CA non-resident returns regularly will know exactly what documentation FTB wants to see.

Matt A.

Author

The gain is big enough that I'm thinking about it. I may at least have a CPA review the 540NR before I file even if I do the federal return myself.

Federal basis reporting doesn't change at all for state purposes — whatever cost basis appears on the 1099-B is what you use on federal Form 8949. CA doesn't have its own version of Form 8949; the federal form feeds into the CA return through the Schedule CA adjustment columns. So don't worry about recalculating basis for CA.

Federal basis reporting doesn't change at all for state purposes — if the cost basis on the 1099-B is right, that's what you use on federal Form 8949. If it's wrong, the fix depends on the box. With box A or D checked, you still enter the 1099-B basis in column (e), then correct it with code B and an adjustment in column (g). With box B or E checked (basis not reported), you enter the correct basis yourself. CA doesn't have its own version of Form 8949; the federal form feeds into the CA return through the Schedule CA adjustment columns. So don't worry about recalculating basis for CA.

Matt A.

Author

This is a clean summary. Really appreciate everyone working through it — I feel like I know what to do now.