← All Articles

Before December 31: Take Your Gains and Losses on Purpose

By the founder of WhenIm64, a retired VP of Engineering — about the author · October 13, 2026

In December 2024, a mutual fund capital gains distribution I never saw coming pushed my income over an IRMAA threshold. It cost me a Medicare surcharge, weeks on the phone, and an invoice that didn't match the letter that came with it. I wrote about that mess in The IRMAA Nightmare Nobody Warned Me About.

This year I'm deciding my gains and losses on purpose, and before anything else. A realized gain adds to your modified adjusted gross income (MAGI), the number IRMAA looks at, and it competes with a Roth conversion for the cheapest tax room. So decide what to sell first, then what to convert.

This is the first of three year-end articles. The overview is Year-End Tax Planning for Retirees: Three Decisions Before December 31. The others cover your last Roth conversion of the year and the January 15 payment.

The Morrisons

I'll use the couple in WhenIm64's demo, so you can check every number. James is 66, retired and on Medicare. Linda is 62 and earns $220,000 through 2028. They live in Texas, so there's no state income tax. They have $1.2 million in a taxable brokerage account and $2.3 million in traditional IRAs. The taxable account throws off about $35,000 a year in dividends and fund distributions. They're on the Moderate strategy and have converted $7,500 a quarter to a Roth so far this year. Their plan calls for $31,309 in 2026, which leaves $8,809 for December.

Gains Stack on Top

A realized gain counts toward IRMAA, the Medicare surcharge, just like wages or a Roth conversion. Medicare looks back two years, so 2026 MAGI sets the surcharge for 2028.

The Morrisons' 2026 MAGI comes to about $275,000. WhenIm64 projects the 2028 threshold for the second tier at about $289,500 and stops their conversions 5% short of it, a cushion for surprises like a big fund distribution. A gain uses up the December conversion first. Every dollar of gain is a dollar they don't convert this year, up to the full $8,809.

The 0% capital gains bracket doesn't help them. In 2026 it ends at $98,900 of taxable income for married couples ($49,450 single). With Linda's salary, every dollar of their gains is taxed at 15%.

What a $20,000 Sale Costs Them

Suppose they sell a fund with a $20,000 long-term gain and still make the December conversion. Their 2026 MAGI lands about $5,500 past the second-tier threshold. WhenIm64 shows their 2026 tax rising about $4,000: $3,000 of capital gains tax, $760 of the 3.8% net investment income tax, and the rest because their deductions shrink a little.

Then 2028 arrives, and James's Medicare surcharge goes from $1,214 to $3,049 for the year. Linda isn't on Medicare yet, so it's only his. That's $1,835 more, two years after the sale. IRMAA is a cliff: one dollar over would have cost the same. All in, the gain costs about $5,800, roughly 29%.

If they skip the December conversion instead, the gain costs about $4,100, roughly 20%, and their MAGI stays about $3,300 under the threshold. The $8,809 stays in the IRA for another year.

The Morrisons' 2026 MAGI under four scenarios against the projected 2028 threshold for the second IRMAA tier

Only one bar crosses the red line: the gain plus the December conversion. Skip December and the gain fits. Harvest a loss and the December conversion grows by the same amount.

That's the trade. Room you use for gains is room you don't use for conversions. Most years it's one or the other, and the right answer depends on how big your IRA is and how long you have before RMDs. Converting usually wins when the IRA is large, because those dollars get taxed eventually anyway. Gains can wait for a year with more room, or be sized to fit under the threshold.

Jim Cramer's first rule is an old Wall Street saying: bulls and bears make money, hogs get slaughtered. On taxes, he says "I think it's a very bad idea to let tax planning have too much control over your portfolio." That's good advice while you're working. In retirement, the tax on a gain doesn't stop at 15%. It can cost you a Medicare surcharge two years later and the room you'd use for a Roth conversion. I chose conversions over locking in my Apple gains, and wrote about why in Crossing the Tax Valley.

Harvest Losses Before December 31

A loss is the one thing that makes room instead of using it. A capital loss cancels capital gains first, including fund distributions, then up to $3,000 a year of ordinary income. The rest carries forward. It can't offset qualified dividends, even though they're taxed at capital gains rates.

If the Morrisons sell a fund sitting $20,000 below what they paid, the loss cancels all $16,000 of their fund distributions and $3,000 of ordinary income, and $1,000 carries to 2027. Their MAGI drops $19,000, so WhenIm64 raises their December conversion by the same $19,000, to about $27,800, and they land right back at the cushion under the threshold. Their 2026 tax goes up about $1,300 because they're converting more, but that's $19,000 more in the Roth with no Medicare surcharge.

The catch is the wash-sale rule. Buy the same or a substantially identical investment within 30 days before or after the sale and the loss is disallowed. That includes a purchase in your IRA. Swap into a similar fund instead of the same one, and the sale has to execute by December 31.

Or Harvest Gains at 0%

In a year with little other income, the 0% bracket is free money. Sell, buy right back, and your cost basis resets higher, so future gains are smaller. The wash-sale rule doesn't apply to gains.

Those gains still count toward IRMAA, and they can make more of your Social Security taxable. The Morrisons won't see any 0% room until Linda stops working, and even then their conversions will claim it first.

Look Up Your Funds' Distributions

This is the one that got me. Most fund companies publish estimates of their year-end capital gains distributions in October or November, and most pay them in December. Look them up for every fund in your taxable account before you size anything else.

Two things follow. If a fund's distribution looks large, you may want to sell it before the record date, especially if you're sitting on a loss in it. And don't buy a fund in a taxable account just before it distributes; you'd be paying tax on someone else's gains.

One more threshold to know: the 3.8% net investment income tax starts at $250,000 of MAGI for married couples ($200,000 single). It has never been adjusted for inflation, so more retirees cross it every year. The Morrisons pay about $950 of it this year, and every extra dollar of gain adds 3.8 cents.

Try It With Your Own Numbers

Every number above comes from the WhenIm64 demo. Add a gain to the Morrisons' plan and watch what it does to their December conversion, their tax and their 2028 Medicare surcharge. Then try your own.

Next: sizing the last Roth conversion of the year, once Medicare publishes the 2027 IRMAA thresholds in November.

I'll be checking my funds' estimates this week. Fool me once.

Sources

Ben Sprachman is the founder of WhenIm64.ai, a retirement planning tool for people navigating retirement. He is not a financial advisor or tax professional. This article is for educational purposes only. Consult a qualified tax advisor for guidance specific to your situation.