How to Avoid State Capital Gains Tax: Residency, 1031, and Trusts

There is no single trick to avoid state capital gains tax, but there is a short list of strategies that work, and most people qualify for more than one. The right combination depends on what you’re selling, where you live, and how soon you need the money. Moving to a no-tax state, using the federal exclusions and deferrals that most states honor, spreading a large gain across tax years, and transferring assets in ways that reset or shift the cost basis are the main levers.

Move to a State With No Capital Gains Tax Before You Sell

Nine states currently let you sell appreciated assets without owing anything at the state level. Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, and Wyoming impose no personal income tax of any kind. Missouri eliminated its capital gains tax effective January 1, 2025, though it still taxes wages.

Washington looks like a tenth option and isn’t. It has no wage income tax, but it does tax profits above $250,000 from sales of stocks, bonds, and similar financial assets, with a higher rate above $1 million. For someone selling a large portfolio, Washington offers no shelter.

Making the Move Count

Buying a condo in Florida doesn’t change your tax residency. Your former state will keep taxing you until you prove you’ve genuinely moved, and high-tax states audit these changes aggressively. The burden of proof is on you.

Most states use a 183-day test as one factor, so you need to spend more than half the year in the new state. But day count alone isn’t enough. Auditors look at where your home is, where your family lives, where you do business, and where you keep items you’d never leave behind. If your old residence is larger, more expensive, and better furnished than the new one, expect an auditor to argue you never really left.

The strongest evidence is a daily location log. Beyond that, sever ties systematically: get a driver’s license in the new state, register to vote there, file a declaration of domicile if one is available, transfer your doctors and accountants, and update every financial account to your new address. Inconsistency sinks these claims. Brokerage statements still going to the old address while your license says Florida is exactly the conflict an auditor needs.

The Statutory Residency Trap

Some states can tax you even after you move. If you keep a home in your former state suitable for year-round use and spend more than 183 days there, certain states classify you as a statutory resident regardless of domicile. Selling or giving up the old residence entirely is the cleanest fix. Keeping it “just in case” is the most common and expensive mistake people make when relocating for tax reasons.

What Moving Doesn’t Solve

Real estate stays taxable where it sits. Sell a rental house in California while living in Florida, and California will tax the gain regardless of your residency. Gains from stocks and bonds are typically sourced to your state of residence at the time of sale, which is why relocation works for portfolios. Gains tied to a business operating in a specific state can usually be claimed by that state based on where the activity occurs. Before assuming a new domicile solves everything, check the source of each major gain.

Use the Home Sale Exclusion If You’re Selling a Residence

Under Section 121 of the Internal Revenue Code, a single filer can exclude up to $250,000 of profit from the sale of a principal residence, and married couples filing jointly can exclude up to $500,000.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Most states follow the same figures, so a moderate home sale often triggers zero state tax.

To qualify, you must have owned and used the home as your primary residence for at least two of the five years before the sale. The two years don’t need to be consecutive. You also can’t have claimed the exclusion on another home sale within the prior two years.

Partial Exclusion for Early Sales

If you sell before hitting two years because of a job relocation, health reasons, or certain unforeseen circumstances, you can claim a prorated portion.2Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence Divide the time you actually lived there by two years, then multiply by the $250,000 or $500,000 limit. One year in the home before a qualifying job change gets you half the exclusion.

Raise Your Basis With Documented Improvements

Anything above the exclusion is taxed at your standard state rate. Capital improvements to the property increase your cost basis and shrink the taxable gain. A new roof, kitchen renovation, or addition counts. Routine maintenance doesn’t. Keep receipts. If your gain is close to the exclusion threshold, documented improvements can be the difference between owing nothing and owing thousands.

Defer With a 1031 Exchange on Investment Real Estate

Investment property owners have a deferral tool homeowners don’t. Under Section 1031, when you sell a rental, commercial building, or investment land and reinvest the proceeds in another qualifying property, you can defer the entire capital gain at both the federal and state level.3Office of the Law Revision Counsel. 26 U.S. Code 1031 – Exchange of Real Property Held for Productive Use in a Trade or Business The gain transfers into the new property’s basis and is taxed only when you eventually sell without doing another exchange.

Deadlines are strict. You have 45 days from the sale to identify replacement properties in writing and 180 days to close on the replacement.4Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Miss either window and the entire gain becomes taxable that year. Since the Tax Cuts and Jobs Act of 2017, 1031 treatment applies to real property only. Equipment, vehicles, and artwork no longer qualify.

Some investors chain 1031 exchanges for decades and then pass the property to heirs, who receive a stepped-up basis. In that scenario, the deferred gain is never taxed at the state level at all.

Spread a Large Gain With an Installment Sale

If you can’t reinvest and a lump-sum gain would push you into a higher bracket, an installment sale lets you spread income over multiple years. Under the installment method, you report gain only as you receive payments from the buyer.5Internal Revenue Service. Topic No. 705, Installment Sales Each year’s recognized gain is the profit portion of that year’s payment.

This works well in states with graduated brackets. Receiving $100,000 a year for five years instead of $500,000 in one year may keep each year’s income in a lower bracket. It requires a willing buyer, so it’s most common in private sales of real estate and closely held businesses.

One caveat: depreciation recapture on real property is recognized immediately in the year of sale, even when payments are stretched out.6Office of the Law Revision Counsel. 26 U.S. Code 453 – Installment Method Only the capital gain portion gets deferred.

Offset Gains With Tax-Loss Harvesting

Selling a losing investment generates a capital loss that offsets capital gains dollar for dollar at both federal and state levels. If losses exceed gains in a given year, you can deduct up to $3,000 of the excess against ordinary income, and any remainder carries forward.

The tactic is most useful late in the year. Review the portfolio, identify positions trading below cost, and sell before December 31 to lock in losses against gains realized earlier that year. You can reinvest in a similar but not identical asset to keep your allocation. The wash-sale rule disallows the loss if you buy a substantially identical security within 30 days before or after the sale.

Because most states calculate capital gains the way the IRS does, losses reduce state-taxable income just as they reduce the federal number.

Donate Appreciated Assets Instead of Cash

If you were going to give to charity anyway, donating appreciated stock directly to a qualifying charity avoids the capital gains tax entirely. You never realize the gain because you never sell. The charity sells it tax-free, and you claim a deduction for the full fair market value at the time of donation, provided you’ve held the asset more than one year. Selling first and donating the cash means paying tax and then giving away what’s left.

Charitable Remainder Trusts

For larger amounts, a charitable remainder trust lets you transfer appreciated assets into a trust that sells them without an immediate tax bill. The trust reinvests the full proceeds, pays you an income stream for a set period or your lifetime, and eventually distributes the remainder to the charity. You take a partial deduction upfront, and the capital gains get spread across the years of distributions rather than hitting all at once. A few states, such as New Jersey, tax these trusts at the state level even though the federal government does not.

Keep Gains Inside Retirement Accounts

Capital gains realized inside a 401(k), IRA, or similar account don’t trigger any state tax in the year they occur. You can buy and sell repeatedly without a state return entry.

Traditional accounts give you a deduction on contributions and tax-deferred growth. State income tax applies only when you withdraw in retirement, and the withdrawal is taxed as ordinary income rather than at a separate capital gains rate.

Roth accounts flip the sequence. Contributions are after-tax, but qualified withdrawals in retirement are completely tax-free at both federal and state levels, including all accumulated gains.7Thomson Reuters. 401(k) Tax FAQ – Tax Considerations for Contributions and Withdrawals For a long time horizon, the Roth eliminates state capital gains tax permanently rather than just deferring it.

Reinvest in a Qualified Opportunity Zone

Section 1400Z-2 lets you defer capital gains tax by reinvesting a realized gain into a qualified opportunity fund within 180 days of the sale.8Office of the Law Revision Counsel. 26 USC 1400Z-2 – Special Rules for Capital Gains Invested in Opportunity Zones The deferred gain must be recognized by December 31, 2026, so the deferral window for new investments is short. The larger benefit is on the back end: hold the opportunity zone investment for at least ten years and any gain on that new investment gets a basis adjustment to fair market value, effectively making it tax-free.

Not every state follows the federal rules. California, Mississippi, and North Carolina have decoupled from the opportunity zone provisions entirely. Massachusetts has decoupled for individual taxpayers. Investors in those states owe state tax on deferred gains as if the program didn’t exist. Confirm conformity before investing.

Use the Step-Up in Basis and Bracket-Aware Gifting

When you inherit an asset, its tax basis resets to fair market value on the date of the previous owner’s death.9Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent A parent who bought stock for $10,000 that was worth $200,000 at death leaves you a $200,000 basis. Sell the next day for $200,000 and you owe nothing, federal or state.

Lifetime gifts work differently. When someone gives you an asset while alive, you inherit their original basis. That same parent gifting the stock instead of leaving it to you would pass along a $10,000 basis and a $190,000 gain waiting to be taxed when you sell. For highly appreciated assets, the timing of the transfer matters enormously.

Community Property Double Step-Up

In community property states, the step-up applies to the entire value of jointly held assets when one spouse dies, not just the deceased spouse’s half. Federal law provides the surviving spouse’s half of community property also receives a new basis equal to fair market value at death, as long as at least half the community interest was includible in the deceased spouse’s estate.10Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent In a common-law state, only the decedent’s half is stepped up. This double step-up can wipe out state capital gains tax on a couple’s largest assets.

Gifting Down the Bracket

Gifting appreciated assets to a family member in a lower tax bracket can reduce the overall state tax when they sell. The annual gift tax exclusion for 2026 is $19,000 per recipient, or $38,000 for married couples electing to split gifts, with no gift tax filing required at that level.11Internal Revenue Service. Frequently Asked Questions on Gift Taxes The recipient takes over your original basis, so the gain doesn’t disappear. If they live in a lower-bracket or no-tax state, the family pays less overall.