Tax Planning
Retirement Income
Tax Efficiency

Capital Gains Tax in Retirement: How to Engineer Your Income for the 0% Bracket

Securelegacywealth
September 21, 2026
10 min read

You can eliminate federal capital gains tax in retirement by keeping your total taxable income below the 0% rate threshold, which applies to long-term assets held for over a year. Strategies such as tax gain harvesting and managing the timing of traditional IRA withdrawals allow you to realize profits tax-free, provided your adjusted gross income remains within the specific limits for your filing status.


Many high-net-worth retirees operate under the assumption that their tax liability will naturally decrease once they transition away from a traditional salary. However, the reality of capital gains tax often introduces a complex layer of financial friction that can quietly erode your retirement distributions. Failing to account for how these gains interact with Social Security and Medicare can lead to significant, avoidable costs. This article provides a sophisticated framework for navigating the current tax landscape by explaining the stacking order of income and the specific mechanics of the 0% capital gains bracket. You will learn practical methods for tax-gain harvesting, how to avoid the Social Security tax torpedo, and the critical trade-offs between realizing gains and executing Roth conversions. We will also address legacy considerations, ensuring your strategy protects both your current lifestyle and your future beneficiaries.

The Retirement Tax Myth: Why Your Capital Gains Rate Isn't Fixed

A common misconception among retirees is that capital gains tax in retirement is a fixed, static percentage. In reality, the IRS utilizes a sliding scale where your rate depends entirely on your total taxable income. It is vital to distinguish between ordinary income, such as wages, pensions, or Required Minimum Distributions (RMDs), and long term capital gains. While ordinary income fills the bottom of the tax brackets, capital gains are stacked on top.

This stacking order provides a unique opportunity for what we call income engineering. By strategically selecting which accounts to draw from and in what order, you can intentionally keep your taxable income low enough to qualify for a 0 percent capital gains rate. For many families here in Gilbert, mastering this coordination is the difference between a tax-free harvest of investment growth and an expensive, unexpected IRS bill.

Effective Roth conversion planning and asset location strategies are essential components of this process. Controlling the timing of your income allows you to dictate your tax bracket rather than letting the IRS dictate it for you. If you are unsure how your current portfolio affects your tax liability, a personalized retirement analysis can provide the clarity needed to optimize your withdrawals before the 2026 tax law changes take effect.

Understanding the Stacking Order: How Capital Gains Tax Brackets Work in 2026

To visualize your tax liability, you must understand how the IRS calculates your bill through a 'stacking order' method. Imagine your income as a series of layers. The bottom layer consists of ordinary income, which includes Social Security benefits, pension payments, and traditional IRA withdrawals. These sources fill your standard tax brackets first. Long term capital gains from assets held longer than one year are then placed directly on top of that ordinary income.

For the 2026 tax year, the thresholds for these preferential long term rates are significant. For couples who are Married Filing Jointly (MFJ), the 0 percent rate applies to total taxable income up to approximately $98,900. The 15 percent rate covers income up to $613,700, while the 20 percent rate applies to any amount beyond that. It is critical to distinguish these from short term gains. Assets held for one year or less are taxed as ordinary income, meaning they do not qualify for these lower rates and instead sit in the bottom layer, potentially pushing your long term gains into a higher bracket.

Consider a retired couple in Gilbert with $60,000 in ordinary income from a pension and Social Security. Because the 0 percent long term capital gains threshold is roughly $98,900, they have $38,900 of 'room' remaining in that tax-free bracket.

Income Component

Amount

Tax Treatment

Ordinary Income (Bottom Layer)

$60,000

Ordinary Rates

Remaining Room for 0% Gains

$38,900

0% Capital Gains Rate

Threshold for 15% Gains

> $98,900

15% Capital Gains Rate

In this scenario, if the couple realizes $38,900 in long term gains, their federal tax bill on those gains is zero. However, if they realize $50,000 in gains, the first $38,900 remains tax-free, but the final $11,100 is taxed at 15 percent. This illustrates why Roth conversion planning is such a delicate balancing act; increasing your ordinary income through a conversion directly reduces the 'room' available for tax-free capital gains. Understanding this hierarchy is the first step in avoiding the unintended consequences that often arise when different income types collide.

The Social Security Tax Torpedo: How Capital Gains Impact Your Benefits

Visual representation of retirement concerns including Social Security and tax efficient income planning.
Understanding how different income sources interact is key to avoiding the Social Security tax torpedo.

A common question we hear in our Gilbert office is: Do capital gains increase taxable Social Security income? The answer is a definitive yes. While the gain itself might qualify for a 0 percent federal rate, it still contributes to your Adjusted Gross Income (AGI), which is a primary component of the IRS provisional income formula.

To determine how much of your Social Security is taxable, the IRS calculates your provisional income by adding your AGI, any tax exempt interest, and 50 percent of your Social Security benefits. If this total exceeds $32,000 for a couple filing jointly, or $25,000 for a single filer, up to 85 percent of your benefits can become taxable at ordinary income rates.

Filing Status

Provisional Income Threshold

Max Social Security Taxable

Single

$25,000 to $34,000

50%

Single

Over $34,000

85%

Married Filing Jointly

$32,000 to $44,000

50%

Married Filing Jointly

Over $44,000

85%

This interaction creates the Tax Torpedo. Even if your capital gains tax in retirement is technically 0 percent, realizing those gains can push your provisional income over these thresholds. For every dollar of gain you realize, you might be forcing $0.85 of previously tax free Social Security into your taxable income. This effectively creates a hidden marginal tax rate that is much higher than the stated capital gains rate. Retirees often mistake a 0 percent rate for a total lack of tax impact, only to find their overall bill spiked because their Social Security was collateral damage. Careful Roth conversion planning or a personalized retirement analysis can help you identify these thresholds before you accidentally trigger a tax event.

Strategy: Engineering a 0% Capital Gains Rate through Tax-Gain Harvesting

While the Tax Torpedo serves as a warning against accidental income spikes, proactive investors can use the same mechanics to their advantage. Tax-Gain Harvesting (TGH) is the strategic opposite of the more common tax-loss harvesting. While many generalist advisors focus exclusively on using losses to offset gains, TGH involves intentionally realizing long term capital gains when your taxable income is low enough to qualify for the 0 percent rate.

The ideal window for this strategy is the Retirement Income Valley. This is the period between the day you stop receiving a paycheck and the day you are forced to start taking Required Minimum Distributions (RMDs) or choose to claim Social Security. During these years, your ordinary income often drops to its lowest point in decades. By selling appreciated assets in a taxable brokerage account during this valley, you can lock in investment growth without paying a single dollar in federal tax.

A significant advantage of TGH is the absence of the wash sale rule. Unlike tax-loss harvesting, where you must wait 30 days to repurchase a similar security to claim the loss, you can sell a stock for a gain and buy it back immediately. This process effectively steps up your cost basis to the current market value. For a family in Gilbert, this means if a stock eventually grows another $50,000, you will only owe capital gains tax in retirement on the growth above that new, higher basis. This sophisticated level of income engineering requires precise coordination with your broader Roth conversion planning to ensure you do not inadvertently push yourself out of the 0 percent bracket. To see how much room you have for tax-free harvesting, a personalized retirement analysis is an essential first step.

The Strategic Conflict: Tax-Gain Harvesting vs Roth Conversions

While tax-gain harvesting is a powerful tool for resetting basis, it often exists in direct competition with another cornerstone of retirement planning: the Roth conversion. Both strategies aim to optimize your long-term tax liability, but they consume the same finite space within your lower tax brackets. Because ordinary income sits at the bottom of the tax stack, a Roth conversion effectively pushes the floor for your capital gains higher. This reduces the remaining room available for the 0 percent capital gains tax in retirement.

Deciding which strategy to prioritize requires a careful look at your immediate needs versus your long term legacy goals. You cannot always maximize both in a single tax year without triggering the very taxes you are trying to avoid. The following criteria can help guide this tactical decision:

Feature

Prioritize Tax-Gain Harvesting

Prioritize Roth Conversions

Primary Goal

Increase cost basis and liquidity.

Reduce future RMDs and tax rates.

Account Type

Taxable Brokerage Accounts.

Traditional IRA or 401(k).

Benefit Timing

Immediate tax-free growth realization.

Long-term tax-free growth and legacy.

Risk Hedge

Market volatility in specific stocks.

The 2026 tax cliff and rising rates.

Tax-gain harvesting is often the preferred choice if you have large unrealized gains in a brokerage account and need to rebalance your portfolio or access cash for a major purchase. Conversely, Roth conversion planning is typically the superior long-term play if your goal is to mitigate the impact of the 2026 tax sunset or to protect your heirs from inheriting a large tax bill. Every dollar converted to a Roth account today is a dollar that will never be subject to RMDs or future tax hikes. A personalized retirement analysis can help you model these two paths to determine which trade-off serves your specific mission of wealth preservation.

Medicare IRMAA and NIIT: The Hidden Costs of High Capital Gains

Medicare IRMAA appeal documents and rules for lowering premiums in retirement.
Capital gains can trigger Medicare IRMAA surcharges if not managed within specific income thresholds.

Navigating the interaction between investment growth and federal brackets is only half the battle. Retirees must also account for two stealth taxes that often accompany large distributions. The first is the Net Investment Income Tax (NIIT), a 3.8 percent surtax that applies to investment income when your modified adjusted gross income (MAGI) exceeds $250,000 for married couples or $200,000 for individuals. This surtax can effectively raise your maximum capital gains tax in retirement from 20 percent to 23.8 percent.

The second, and often more disruptive, cost is the Income Related Monthly Adjustment Amount, or IRMAA. Unlike progressive tax brackets, Medicare IRMAA surcharges operate on a cliff system. Going just one dollar over a threshold can trigger significantly higher Medicare Part B and Part D premiums. Because the Social Security Administration employs a two year lookback rule, a Gilbert resident who sells a highly appreciated property or liquidates a large stock position today will not see the impact on their Medicare premiums until two years later. This delayed expense makes a personalized retirement analysis critical, as it allows you to project these costs and determine if you have grounds for an appeal due to a life changing event.

Legacy Planning: When to Hold Assets for a Step-Up in Basis

Legal documents and a pen on a professional desk, representing legacy and estate planning.
Legacy planning involves balancing current tax harvesting with future step-up in basis benefits for heirs.

While engineering a 0 percent rate through harvesting is effective for current tax efficiency, a key tool for wealth preservation involves holding highly appreciated assets until death to secure a step-up in basis. This tax provision resets the cost basis of the asset to its fair market value on the date of your passing, effectively erasing decades of capital gains tax in retirement for your heirs.

Deciding between immediate harvesting and holding for a step-up depends on your legacy goals and current income levels.

Strategy

Primary Benefit

Heir's Tax Position

Tax-Gain Harvesting

Resets basis at 0% while living.

Heirs pay tax on growth after the harvest.

Holding for Step-up

Maximizes tax-free transfer of gains.

Heirs pay zero tax on growth prior to death.

If you have room in the 0 percent bracket and do not risk triggering Medicare IRMAA surcharges, harvesting provides future flexibility. However, for assets with massive appreciation, the step-up provides a superior tax-free transfer. This strategy works best when coordinated with Roth conversion planning to ensure your income needs are met without liquidating the legacy portfolio. A personalized retirement analysis can help determine which assets should be preserved for the next generation.