How to avoid capital gains tax in New York State — what actually works?

I sold some index fund shares this year and the federal bill was already a shock, but then I looked up New York State and realized NY taxes capital gains as ordinary income with no separate lower rate. I'd been assuming NY had something similar to the federal preferential rates but nope. Now I'm trying to figure out how to avoid capital gains tax in New York State legally before I make any more moves this year. I already maxed my 401(k) at work. I've read vague stuff about tax-loss harvesting and opportunity zones but I don't know which of those actually reduce the NY bill vs. just the federal one. My brokerage sent a 1099-B and I'm looking at a decent short-term gain from shares I held under a year. Is there any NY-specific strategy here or does everything just flow from the federal AGI?

41 comments

NY is brutal on this because they conform to federal AGI and then build the state tax on top of it. There's no separate NY capital gains rate — it's all taxed as ordinary income at whatever your NY bracket is. So the strategies that shrink your federal AGI generally shrink the NY tax too. Tax-loss harvesting is the clearest lever: realized losses on your 1099-B net against gains on Schedule D before the number flows into AGI. Watch the wash sale rules though — if you rebuy substantially identical shares within 30 days before or after the sale, the loss is disallowed and gets a code W on Form 8949.

Dana S.

Author

So the wash sale window is 30 days on each side — I want to make sure I have that right before I sell anything else this year.

Correct, 30 days before and 30 days after the sale date. The disallowed loss gets added to the cost basis of the replacement shares, so it's deferred not gone — but it won't help you this tax year.

I uploaded my 1099-B and my draft Schedule D to taxr.ai last month when I was in the same spot. It went line by line and flagged two positions where I had unrealized losses that would offset my short-term gains without triggering wash sales, and it estimated what the net Schedule D figure would look like before it hit NY adjusted gross income. That concrete number was what I needed to decide whether harvesting was worth the trade. Worth doing before you sell anything else.

Dana S.

Author

Did it catch anything about the NY add-back rules or just the federal Schedule D side?

Mostly the federal side — the Schedule D netting, the 8949 codes, the holding periods. For the NY-specific conformity questions I still checked the NY IT-201 instructions separately, but having the federal numbers clean first made that a lot easier.

Opportunity zones are real but the NY angle is complicated. NY decoupled from some of the federal OZ rules, so a deferral that works at the federal level doesn't automatically carry over to your NY return. Before you park money in a QOF thinking you'll defer the NY gain too, check the current IT-201 instructions — the NY treatment has changed more than once.

This is the part people miss. Federal OZ deferral on Form 8949 and Schedule D does not equal NY deferral. NY has its own conformity rules and they haven't always matched federal.

Dana S.

Author

Good to know — I was about to assume OZ deferral was a clean NY benefit too. I'll read the IT-201 instructions more carefully before going that route.

Holding period matters more than people realize even inside a single year. Short-term gains — shares held a year or less — are taxed federally at ordinary income rates anyway, so there's no federal preference to protect. If you can hold past the one-year mark before selling, the federal rate drops significantly, but the full gain still counts in your federal AGI, so your NY AGI starting point doesn't change. NY still taxes it as ordinary income on the same federal AGI number flowing in. The holding period for securities on an established market runs from the day after your purchase trade date to your sale trade date — not settlement dates.

Dana S.

Author

My shares are at about 9 months. If I wait another 3-plus months I'd get the federal long-term rate even though NY still taxes it ordinarily?

Exactly on the federal side. You'd owe less federal tax, but the long-term gain is still fully included in federal AGI, so since NY AGI starts with federal AGI, the NY bill wouldn't shrink from the holding period alone. Not a perfect fix but a real one federally.

I had Taxr read through my prior-year Schedule D and the IT-201 side by side. It listed every place where a federal capital loss carryforward showed up on Schedule D and noted that NY has its own carryforward tracking that doesn't always match the federal worksheet. That comparison saved me from assuming my federal carryforward would zero out my NY gain one-for-one — it doesn't necessarily work that way.

The NY capital loss carryforward is tracked on Form IT-227 and the IT-201 instructions, and it runs independently of the federal Capital Loss Carryover Worksheet in Pub 550. They can diverge if you had a year where federal and NY treatment differed.

That's exactly what happened in my case. Federal carryforward was larger than NY's because of a year where NY didn't conform to a particular federal rule. If I'd just copied the federal number onto the state return I'd have overstated the NY deduction.

Retirement account contributions are probably the cleanest move for most people. Traditional IRA contributions — if you're eligible to deduct them — reduce federal AGI and therefore NY income too. Same with HSA contributions if your health plan qualifies. Neither involves timing stock sales or wash sale risk.

Dana S.

Author

I already maxed the 401k but hadn't thought hard about a traditional IRA deductibility since I have a workplace plan. Need to check the phase-out range for my income level.

The deductibility phase-out depends on your filing status and whether you or your spouse has a workplace plan. The IRA Publication 590-B doesn't cover the deduction limits directly — check the Form 1040 instructions or Pub 590-A for the deductible contribution rules.

Gifting appreciated shares to charity before selling avoids the capital gain entirely — you deduct the fair market value and never recognize the gain on Schedule D. If you're not ready to pick a charity, a donor-advised fund lets you get the deduction this year and direct grants later. NY follows the federal charitable deduction so this works on both returns.

Worth noting this only works if you're itemizing. If your standard deduction is higher, the charitable deduction disappears and the strategy loses most of its appeal.

Fair point. The strategy still eliminates the capital gain even if you don't itemize — you just lose the deduction benefit. So it depends how much you care about the gain vs the deduction.

Installment sales are another option if you're selling something other than publicly traded securities — a business interest or real property, for example. You spread the gain across the years you receive payments, which can keep any single year's income lower. NY generally follows federal installment sale treatment under IRC 453. Doesn't apply to publicly traded stocks though — those have to be reported in full in the year of sale.

Dana S.

Author

My situation is just index fund shares so installment sale isn't available. Good to know for future real estate situations though.

I moved from NY to another state a couple years ago and the sourcing rules matter a lot for the transition year. NY taxes you as a full-year resident on worldwide income if you're domiciled there all year. If you move out mid-year, you're a part-year resident and gains recognized after your move date may only be taxed by NY if they're sourced to NY — the IT-203 handles that. But don't assume moving fixes everything: NY is aggressive about auditing domicile changes.

The NY domicile audit issue is real. NY looks at where you spend your time, where your primary home is, where your social and economic ties are. Changing your driver's license isn't enough on its own.

Exactly. I kept a lot of documentation — utility bills, credit card statements showing where I actually was day by day. It's not something to do casually just to avoid a tax bill.

One thing I'd flag: if you have RSUs vesting this year, the ordinary income at vest flows into your W-2 and straight into NY income — you can't avoid that part. The capital gain piece only starts after vest, on any appreciation from the vest-date price to your sale price. So separating the RSU ordinary income from the RSU capital gain is important when you're counting up how much of your NY bill is actually reducible.

Dana S.

Author

No RSUs in my case but good to understand for later. The vest date FMV becomes your cost basis for the capital gain calculation going forward?

Right. Your basis in the shares is the FMV at vest (which was already taxed as income). Only gain above that gets Schedule D treatment — and NY taxes it at ordinary rates either way.

I want to correct something implicit in this thread: NY does not have any exclusion for capital gains on small business stock the way Section 1202 works federally. The federal QSBS exclusion doesn't carry over to NY — NY adds back the excluded amount. So if someone is counting on a big QSBS exclusion to also wipe out their NY bill, that math doesn't work.

This is an important correction. NY's decoupling from Section 1202 is a real trap for startup employees and early investors. The federal gain might be entirely excluded but NY still taxes it.

And it can be a large number. Worth running the NY IT-201 calculation before assuming the federal exclusion solved the whole problem.

The federal capital loss limit is worth understanding here too. If your losses exceed your gains, you can only use a certain amount against ordinary income each year — check the Schedule D instructions and Topic 409 on irs.gov for the current limit and how the carryforward works. NY has a parallel limit and carryforward but tracked separately as mentioned above.

I realized last year that I had been ignoring the interaction between my capital gains and the NY college savings deduction. Contributions to a NY 529 reduce NY taxable income directly (up to limits in the IT-201 instructions) even though they don't reduce federal AGI. So if you have kids and aren't maxing a NY 529, that's a NY-only deduction that could offset some of the NY ordinary income tax on your gains.

Dana S.

Author

No kids yet but bookmarking this. I didn't realize 529 contributions were deductible at the state level even when they don't help federally — that's a meaningful NY-specific lever.

The deductible amount per year is in the IT-201 instructions and it's per-contributor not per-child, so a married couple filing jointly can each contribute and deduct. Worth reading before year-end.

Covered securities and noncovered securities get reported differently on Form 8949 — box A or D when basis is reported to IRS, box B or E when it's not. If you have old shares where the broker didn't report basis, make sure you're using the correct box and entering your own records for column (e). The NY return flows from your federal AGI so getting the 8949 right federally is step one.

And under Exception 1 in the Form 8949 instructions, if you have covered transactions with no adjustments and basis was reported to the IRS, you can skip Form 8949 for those and enter totals directly on Schedule D line 1a or 8a. Saves some paperwork.

That exception only applies when there are no adjustments needed — no wash sales, no incorrect basis corrections, nothing in columns (f) or (g). If you have any adjustments at all for that group, you need the full 8949.

If the gains are large enough that you're unsure whether you've exhausted the legal strategies, an enrolled agent or CPA who handles NY returns specifically is worth consulting. NY conformity questions, the OZ decoupling, the QSBS add-back — these aren't areas where you want to guess and find out at audit.

Dana S.

Author

My situation is straightforward enough that I think I can handle it with what's in this thread and the 1099-B I have. But agreed that once it gets complicated — multiple states, real estate, business equity — a professional makes sense.