A retiree living on a modest income does not automatically owe tax just because an old brokerage account finally shows a gain worth selling. Federal tax law includes a bracket where long-term capital gains are taxed at nothing at all, and a retiree whose taxable income falls low enough in a given year can sell appreciated stock, mutual funds, or other investments held more than a year without triggering any federal capital-gains bill on that sale. Few retirees ever use it, mostly because it depends on how the rest of a tax return looks in that specific year, not on any special election, form, or advance paperwork.
The Tax Code Has a Bracket Where Long-Term Gains Are Taxed at Nothing
Current IRS guidance confirms that net capital gains are taxed at different rates depending on a taxpayer’s overall taxable income, and that some or all of a net capital gain may be taxed at 0%. For tax year 2025, the most recently confirmed figures, the 0% rate applies when taxable income is at or below $48,350 for a single filer or someone married filing separately, $64,750 for a head of household, and $96,700 for a married couple filing jointly. Income above those levels moves into a 15% capital-gains bracket that extends well into six-figure income, and only taxable income above roughly half a million dollars for most filers reaches the top 20% rate, with a handful of narrower exceptions for things like collectibles that are taxed differently. The 0% rate applies only to gains on investments held longer than one year; anything held a year or less is taxed as ordinary income at regular rates instead, with no special low-income break at all. The same guidance confirms that qualified dividends are taxed on this identical 0%, 15%, and 20% schedule rather than as ordinary income, so a retiree drawing dividend income from stocks or mutual funds can land in the 0% bracket on that income too, under the same thresholds that apply to a sale.
Free retirement updates: One number can cost or save hundreds a month in retirement. The free Retirement Shield newsletter surfaces the ones worth knowing. Sign up free.
Ordinary Income Fills the Bracket First, Then Capital Gains Stack on Top
The 0% rate is not a flat exemption for every retiree below a certain income line; it depends on where the capital gain lands once everything else on the return is added up first. Ordinary income, including Social Security’s taxable portion, pension payments, interest, and any required withdrawals from a retirement account, is counted first and fills up the lower part of the income scale. Capital gains are then stacked on top of that ordinary income, and only the portion of the gain that still fits underneath the applicable 0% threshold is taxed at nothing; any amount of gain that pushes total taxable income above the threshold spills into the 15% bracket instead, dollar for dollar. That stacking order is why a retiree has to look at the whole return, not just the size of the gain, before assuming a sale will be entirely tax-free, since a large enough gain can push its own later dollars into a higher bracket even while the earlier dollars stay untaxed.
The Strategy Works Best in a Genuinely Low-Income Year
A retiree is best positioned to use the 0% bracket in a year when other income is unusually light, a pattern often called tax-gain harvesting. That can happen in the gap years between stopping work and claiming Social Security, in a year when a retiree is living mostly off cash savings rather than taxable withdrawals, or in any year before required minimum distributions begin pushing taxable income higher. Selling an appreciated position in one of those years and immediately repurchasing it, if desired, effectively resets the investment’s cost basis higher at no federal tax cost, which can reduce or eliminate capital-gains tax on future growth measured from that new, higher basis. A retiree considering this in a single narrow window has to act with actual numbers from that year’s return, since the 0% bracket applies based on the year the sale actually happens, not on typical income in an average year, and a late-year surprise such as a large distribution can close the window without warning.
Repurchasing the same investment right after selling it for a gain is not restricted the way a loss sale is. The wash-sale rule described in IRS Publication 550 disallows the tax loss on a sale when a taxpayer buys the same or a substantially identical security within 30 days before or after that sale, specifically to stop investors from manufacturing a deductible loss while keeping their position intact. That rule has no counterpart for gains: a retiree who sells at a profit inside the 0% bracket and buys the position back the same day still locks in the higher cost basis and owes no federal capital-gains tax on the sale, because there is no gain to disallow and nothing in the tax code that penalizes an immediate repurchase after a taxable, or tax-free, gain.
A simple illustration shows why the ordering rule matters more than the size of the gain alone. A single retiree with $40,000 of other taxable income in 2025 has roughly $8,350 of room left under that year’s $48,350 threshold before any capital gain starts spilling into the 15% bracket. Selling a position with an $8,000 long-term gain that year costs nothing in federal tax, because the gain stacks neatly on top of the $40,000 and stays under the ceiling. Selling a position with a $20,000 gain in the same year is not an all-or-nothing event: the first $8,350 of that gain is still tax-free, while the remaining roughly $11,650 spills over the threshold and is taxed at 15%, because the ordering rule applies dollar by dollar rather than voiding the 0% treatment for the whole sale once any part of it crosses the line.
Realized Gains Can Ripple Into Social Security Taxation and Medicare Premiums
A capital gain that costs nothing in federal capital-gains tax is not necessarily free of other consequences on the same return. The income figures used to determine how much of a Social Security benefit is taxable, and the income figure Medicare uses to set income-related monthly adjustment amounts on Part B and Part D premiums, both key off broader measures of income that a large realized gain can push higher, even when the gain itself is taxed at 0% under the capital-gains rules. A retiree weighing a large sale in a low-income year has reason to model the full return, including the Social Security and Medicare effects, rather than assuming a 0% capital-gains rate means the sale carries no other cost at all.
This article was produced with the assistance of AI and reviewed by The Financial Wire editorial team.
More Financial Reading
- Adding someone to your bank account: tax traps and smart moves
- What really happens to your joint savings account when you die?



