
The Retiree's Zero-Tax Gain: How One Couple Realized $40,000 in Capital Gains Without Paying a Dollar in Tax
The single most underused feature of the federal tax code is the 0% long-term capital gains bracket. For 2026, married couples filing jointly with taxable income up to $98,900 pay zero federal tax on long-term capital gains. Not 5%, not 10%, literally zero. The threshold is so generous that most retired couples qualify for it, often without realizing they do. Combined with the standard deduction of $32,200 for couples in 2026, a household can have up to $131,100 in total gross income (including realized long-term gains) and still pay nothing in federal tax on the capital gains portion. For retirees with large taxable portfolios accumulated over decades, the 0% bracket is the most powerful tool available for unwinding embedded gains without ever writing a check to the IRS.
But the 0% bracket alone isn't enough for retirees whose income pushes above the threshold. For those couples, a meaningful portion of all retirees and particularly anyone with required minimum distributions (RMDs) from large pre-tax accounts, pensions, or substantial taxable dividend income, a different tool is needed. That tool is the matched pair: realizing a long-term gain and harvesting an equivalent long-term loss in the same tax year, sized so they offset each other for tax purposes. Used together, the 0% bracket and matched pair strategy let retirees systematically raise the cost basis of their portfolio over time, eliminating embedded tax liability that would otherwise come due whenever they need to actually sell positions in retirement. This article walks through how one retired couple combined both techniques to realize $40,000 in long-term capital gains during a single tax year and pay $0 in federal tax, and how the same strategy, applied consistently over a decade, eliminates hundreds of thousands of dollars in eventual tax liability.
Meet Robert and Eleanor
Robert is 68. Eleanor is 66. They've been retired since Robert sold his small accounting firm three years ago. They live in Phoenix, Arizona, in a modest home they own outright. Their financial picture going into 2026:
- Social Security combined: $58,000 per year ($32,000 Robert, $26,000 Eleanor)
- Robert's RMD from rollover IRA (he turned 73 last year): $14,000
- Eleanor's pension (from 30 years as a high school teacher): $22,000
- Taxable brokerage dividends: $9,500
- Taxable brokerage portfolio value: $1,250,000
- Embedded long-term capital gains in portfolio: approximately $480,000
Their combined income for 2026, ignoring any intentional gain realization, totals $103,500 in gross income. Of the Social Security, approximately 85% will be taxable at the federal level given their other income, so effective AGI is roughly $94,200. After the standard deduction of $32,200, their taxable income before any intentional gain realization is approximately $62,000.
This is the critical number. For married couples filing jointly in 2026, the 0% long-term capital gains bracket extends from $0 to $98,900 of taxable income. Robert and Eleanor sit at $62,000 before any gains, meaning they have $36,900 of headroom inside the 0% bracket that they can use to realize long-term capital gains at zero federal tax.
Most retirees in their situation never use this headroom. They look at their portfolio, see large embedded gains, assume that selling anything will trigger a meaningful tax bill, and continue to defer any rebalancing or basis-raising until forced. Robert and Eleanor's financial planner caught this opportunity in late 2025 and outlined a specific strategy for 2026.
The Plan: $40,000 in Gains, $0 in Tax
The plan had two components that worked together.
Component 1: Use the full 0% bracket headroom to realize long-term gains.
Robert and Eleanor's planner identified a position in their portfolio with substantial embedded gains: 800 shares of Vanguard Total Stock Market ETF (VTI), purchased between 2007 and 2012 at an average cost basis of $52 per share, currently trading at $290 per share. The position is worth $232,000 and has $190,400 of embedded long-term gain.
The strategy: sell exactly enough shares to realize $28,900 of long-term capital gains, occupying the bottom of the 0% bracket headroom but leaving an $8,000 buffer for the second component.
At an average gain of $238 per share, $28,900 in realized gains requires selling approximately 121 shares. Sale proceeds: 121 × $290 = $35,090. Cost basis on those shares: 121 × $52 = $6,292. Realized long-term gain: $28,798, close enough to the target.
Federal tax owed on this gain: $0 (entirely inside the 0% bracket).
Immediately after the sale, they repurchase 121 shares of VTI at the current $290 price. (No wash sale issue, because the wash sale rule only disallows losses, not gains.) Their new cost basis on those 121 shares: $290 each, or $35,090 total, up from the previous $6,292. They have raised cost basis by $28,798 in a single transaction at zero tax cost.
Component 2: Execute a matched pair to realize additional gains.
Within their broader portfolio, the planner identified two positions with meaningful unrealized losses:
- A position in an international developed-markets ETF (VEA), purchased in 2022 at $50, currently $42, with an unrealized loss of about $7,500 across the position
- A position in a small-cap value fund, purchased in late 2021 near a peak, sitting at an unrealized loss of approximately $4,000
Combined harvestable losses available: roughly $11,500.
The matched pair execution: sell 47 additional shares of VTI to realize another $11,200 in long-term gains, and simultaneously sell the VEA position and the small-cap value position to harvest $11,500 in losses. Net taxable gain from these matched transactions: approximately -$300 (a small net loss, which is fine; it offsets a tiny portion of Robert's RMD ordinary income).
Combined with Component 1, the total realized long-term gains for the year: $28,798 + $11,200 = $40,000.
Combined federal tax owed on the $40,000 in realized gains: $0.
The $11,200 from Component 2 was offset dollar-for-dollar by the $11,500 in harvested losses, putting that portion entirely outside the tax calculation. The $28,798 from Component 1 was inside the 0% bracket. The net effect: $40,000 of long-term gains realized, $0 federal tax owed.
The Cost Basis That Was Raised
Track what happened to cost basis across the portfolio:
| Position | Action | Old Basis | New Basis | Basis Raised | |----------|--------|----------|----------|--------------| | VTI (121 shares) | Sold + repurchased | $52/share | $290/share | $28,798 | | VTI (47 shares) | Sold + repurchased | $52/share | $290/share | $11,186 | | VEA (full position) | Sold + replaced with similar fund (IEFA) | $50/share | $42/share | $0 net (loss harvested) | | Small-cap value | Sold + replaced with correlated substitute | $30/share | $26/share | $0 net (loss harvested) | | Total | | | | ~$40,000 |
Robert and Eleanor's portfolio looks essentially identical the day after these trades as it did the day before. Their total market value is the same. Their sector exposures are the same. The funds they hold are slightly different (VEA replaced with IEFA, small-cap value replaced with a correlated substitute), but the economic exposure is essentially unchanged.
What's changed is the embedded tax structure of the portfolio. Where 168 shares of VTI previously carried $40,000 of embedded gain, those shares now carry zero embedded gain. The harvested-loss positions previously carried small losses that would have eventually become useful but had no current value; those losses have now been deployed as offsets against the realized gains, leaving fresh positions with no embedded losses or gains. The portfolio's overall embedded gain has dropped by $40,000, from $480,000 to approximately $440,000, in a single year of intentional activity, at zero federal tax cost.
What This Compounds To Over a Decade
The single-year result is impressive on its own. $40,000 of intentional gain realization at $0 in tax is unusual. But the strategy compounds dramatically when repeated annually. Year after year, the same basic mechanics apply: identify the 0% bracket headroom, use it for intentional gain realization, supplement with matched pairs to capture additional embedded gains using harvested losses from elsewhere in the portfolio. The available headroom shifts year to year based on the couple's exact income (which itself shifts based on RMD growth, Social Security cost-of-living adjustments, and dividend yields), and the available harvestable losses shift based on market conditions, but the fundamental strategy remains consistent.
Worked compounding analysis. Assume Robert and Eleanor execute the same basic strategy for ten years, with annual variations producing somewhere between $32,000 and $48,000 of basis-raising per year (average $40,000). Over the decade, they raise total cost basis by approximately $400,000, eliminating that much embedded gain from the portfolio.
Their portfolio in 2036, at age 78 and 76, looks like this: same market value (perhaps grown to $1.7M with 10 years of equity returns), but with embedded gains reduced from the original $480,000 to roughly $80,000, almost entirely from new gains accumulated on portfolio growth during the harvesting decade.
The eventual tax savings, computed when the portfolio is eventually drawn down or transferred:
-
If positions held until death: with current step-up-in-basis rules, all embedded gains evaporate at the survivor's death anyway. The strategy saves nothing in this specific scenario, but provides flexibility. Robert and Eleanor were never required to hold until death, and now any in-life liquidation costs far less in tax.
-
If positions sold in their 80s to fund late-life care: a $200,000 liquidation in 2042 from the original portfolio would have triggered approximately $200,000 × 15% federal + 2.5% Arizona = $35,000 in tax. The same liquidation from the basis-raised portfolio triggers approximately $30,000 × 15% federal + 2.5% Arizona = $5,250 in tax. Savings: $29,750 on that single liquidation event.
-
If positions transferred to children before death (a strategy increasingly used to spread gains across multiple lower-bracket taxpayers): the children's eventual tax bill is dramatically reduced because they inherit raised-basis positions rather than low-basis positions. The savings flow to the children but originate from the basis-raising work Robert and Eleanor did in their 60s and 70s.
Across these scenarios, the present-value lifetime savings from the 10-year basis-raising program range from $0 (if everything is held until step-up) to $80,000 to $130,000 (if meaningful liquidation occurs during life or before-death transfers happen). The expected value, weighted by the probability of each scenario, is somewhere around $45,000 to $70,000 in present-value tax savings, earned by a 10-year program that paid zero net tax during execution.
Why Most Retired Couples Don't Do This
Three reasons the strategy is rare in practice, despite its mechanical simplicity.
First, retirees usually don't know they're in the 0% bracket. They look at gross income ($103,500 in Robert and Eleanor's case) and assume they're "comfortably middle class" without recognizing that taxable income after the standard deduction sits well below the 0% LTCG threshold. The headroom is invisible unless someone calculates it specifically.
Second, the strategy requires lot-level visibility and active execution. Picking a position to sell, calculating exactly how many shares to sell to hit a target gain amount, simultaneously identifying matched losses elsewhere in the portfolio, and executing the wash sale-safe substitution on the loss side. None of this is something a retired couple typically wants to do for themselves. Most rely on their financial advisor, and most financial advisors don't proactively manage for basis-raising; they manage for asset allocation and overall returns.
Third, the strategy violates an emotional intuition that "you don't sell winners." Retirees have spent decades watching certain positions appreciate enormously, and selling those positions, even to immediately repurchase them, feels like giving up on something that has worked. The intellectual case is clear (the repurchase establishes new higher basis, the economic position is identical), but the emotional resistance is real.
The reason continuous lot-level harvesting software is particularly valuable for retirees specifically is that it handles all three of these obstacles automatically. The software calculates the 0% bracket headroom each year based on the household's actual income. It identifies the specific lots that should be sold and repurchased, sized to hit the target gain. It scans for matched losses elsewhere in the portfolio and executes the pairs without requiring the retiree to make individual transaction decisions. And by automating the process, it removes the emotional friction. The retiree never has to decide to "sell a winner" because the system handles it as routine portfolio maintenance.
A Caution: IRMAA and Social Security Taxation
The strategy described above is mechanically clean, but it interacts with two thresholds that retirees should pay attention to: IRMAA (Income-Related Monthly Adjustment Amount) Medicare premium surcharges, and the Social Security taxation formula.
IRMAA surcharges kick in when modified adjusted gross income exceeds specific thresholds. For 2026, the first IRMAA tier for married couples is around $212,000 of MAGI. Robert and Eleanor's MAGI sits well below this threshold, so no IRMAA concern. But for retirees closer to the line, intentional gain realization that pushes MAGI above $212,000 can trigger several thousand dollars of additional annual Medicare premiums. The 0% bracket savings can be partially or fully offset by IRMAA costs if the planning isn't done carefully.
The Social Security taxation interaction is subtler. Social Security benefits are taxable based on a formula involving "provisional income," defined as half of Social Security plus all other income. The formula has two thresholds that increase the taxable portion of benefits. For Robert and Eleanor at $103,500 of gross income, they're already at the upper threshold where 85% of Social Security is taxable, so realizing additional gains doesn't increase the Social Security tax burden. But for lower-income retirees just below the threshold, intentional gain realization can push more Social Security into the taxable bracket, partially offsetting the 0% LTCG benefit.
The right approach is to model all of these interactions before executing. The calculation is straightforward for software to handle continuously but easy for humans to miss when planning manually. The headline "$0 tax on $40,000 of gains" is real but requires the supporting infrastructure to verify that no other thresholds are crossed.
The Bigger Picture
Robert and Eleanor's story represents the convergence of two strategies, bracket-filling and matched pairs, that work especially well together for retired investors. The 0% bracket alone handles a portion of the gain that fits inside available headroom. Matched pairs handle the rest, using harvested losses to neutralize gains that would otherwise be taxable. Combined, the two techniques let a retired household execute meaningful basis-raising at zero net tax cost, year after year, slowly transforming a portfolio loaded with embedded gain into one with basis approximating current market value.
The strategy doesn't require investment sophistication. It requires precise execution of a small number of mechanical rules across the full lot-level structure of the portfolio. The barriers to entry are lot-level visibility, year-round monitoring, coordinated execution across multiple positions, and tracking the household's exact bracket position throughout the year. These are exactly the barriers that AI-driven tax loss harvesting software exists to remove. What was previously available only to investors with dedicated tax planning professionals is now mechanically achievable for any retired household with a reasonable-sized taxable portfolio.
For background on the rate brackets that make this strategy possible, see capital gains tax rates 2026. For the broader framework on how retirees should approach tax loss harvesting differently from working investors, see tax loss harvesting for retirees. The matched pair mechanics that power Component 2 of Robert and Eleanor's plan are detailed in our matched pairs deep dive. For investors whose state of residence shifts the calculation further, see state capital gains tax rates 2026. And for the continuous lot-level scanning that makes the strategy operationally feasible without requiring constant manual attention, see unrealized losses hiding in your winners.
The 0% capital gains bracket is one of the most generous features of the federal tax code, deliberately designed to favor retirees and lower-income households. Combined with matched pair execution, it enables a class of tax planning that most retired couples never realize is available to them. Robert and Eleanor's $40,000-at-zero-tax outcome isn't unusual. It's what the tax code permits, when the household income falls in the right range and the execution is handled correctly. The mechanics are public. The execution is what's been missing for most retirees, and what continuous software-based portfolio management increasingly provides.