This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.
Many retirees assume they will owe federal tax when they sell shares that have risen in value. But for a married couple over 65 with moderate income, the 2027 tax rules can produce a different outcome: a sizable portion of those gains can be taxed at 0%.
The IRS has placed the 0% threshold at $102,100 of taxable income for married joint filers in tax year 2027. Before that amount is reached, three deductions reduce taxable income, which means a couple can bring in roughly $150,000 before any stock gains are taxed.
Why the $102,100 Threshold Can Still Allow About $150,000 of Income
The 0% capital-gains rate comes from Section 1(h) of the Internal Revenue Code. Long-term gains are taxed at 0%, 15% or 20%[1], depending on where taxable income falls. Taxable income is what remains after deductions, and a married couple in which both spouses are at least 65 gets three of them in 2027:
- Standard deduction: $33,200 for married couples filing jointly, up $1,000 from 2026.
- Additional standard deduction for age 65 and older: $1,700 per spouse, or $3,400 total. The IRS counts you as 65 on the day before your 65th birthday.
- Senior deduction: $6,000 for each spouse who has reached 65[2], or $12,000 for the couple. The 2025 tax law created it, and it applies only to tax years beginning before January 1, 2029[2].
Combined, those deductions shelter $48,600. Added to the 0% line, they create an income ceiling of $150,700 of adjusted gross income. Because the senior deduction starts to phase out once modified AGI exceeds $150,000 on a joint return[2], the practical ceiling is closer to $150,625.
Example: $60,000 in Stock Gains, With No Tax on the Gains
Consider a hypothetical married couple, both age 67, filing jointly in 2027. Their pensions, IRA withdrawals and the taxable portion of Social Security total $90,000. They also sell long-held index fund shares and realize $60,000 in profits.
| Line | Amount |
|---|---|
| Ordinary income | $90,000 |
| Long-term capital profit | $60,000 |
| Adjusted gross income | $150,000 |
| Standard deduction | ($33,200) |
| Extra 65+ deduction | ($3,400) |
| Senior deduction | ($12,000[2]) |
| Taxable income | $101,400 |
| Tax on the profits | $0 |
| Total federal tax | $4,456 |
The gains sit on top of ordinary income. The couple’s $41,400 of taxable ordinary income fills the 10% and 12% brackets first. The gains then occupy the remaining space, and everything stays below the $102,100 cutoff.
In this example, the entire federal tax bill comes from pension and IRA income. Since the 22% bracket does not begin until $104,050 for married couples filing jointly, the ordinary income also remains within the 12% bracket.
Crossing $150,000 Can Increase the Tax on Gains in Two Ways
If the couple instead sells $80,000 of gains, their AGI climbs to $170,000. The law reduces each $6,000 senior deduction by 6% of income above the threshold[2], cutting the couple’s total senior deduction from $12,000 to $9,600.
That pushes taxable ordinary income up to $43,800 and leaves only $58,300 of room taxed at 0%. The remaining $21,700 of gains is taxed at 15%. Total federal tax rises to $7,999. The extra $20,000 of gains adds $3,543 in tax, for an effective rate of about 17.7%.
There are three additional effects to keep in mind:
- Social Security: If your benefits are not already taxed at the maximum level, gains can make more of them taxable and reduce the amount of income that still qualifies for 0% treatment.
- Medicare premiums: Gains count toward IRMAA, the income-based Medicare surcharge, which is based on income from two years earlier. For 2027, joint filers owe no Part B surcharge up to $224,000[3], well above this example. Income in 2027 affects 2029 premiums.
- State taxes: The 0% rate applies only at the federal level. Most states with an income tax still tax capital gains.
Three Ways to Take Advantage of the 0% Rate Before the Senior Deduction Ends
- Harvest gains and buy back right away. The wash-sale rule applies only to losses. You can sell a winning investment, repurchase it the same day, and raise your cost basis without federal tax. Some investors do this every year up to the limit.
- Coordinate IRA withdrawals and Roth conversions with your gains. Ordinary income fills the brackets first, so every dollar converted to a Roth or withdrawn from an IRA uses one dollar of 0% space. Required withdrawals apply to traditional IRAs, 401(k)s and 403(b)s, while Roth IRAs have no lifetime required withdrawals for the original owner.
- Keep AGI below $150,000. The $12,000 senior deduction disappears after 2028, and lawmakers are already debating what may happen to senior tax breaks. That leaves two years, 2027 and 2028, to use the full benefit.
Whether it makes sense to realize gains, do Roth conversions, or combine the two depends on your individual situation, and it is worth reviewing the numbers with a CPA or fiduciary advisor before year-end. For many retirees, the years between retirement and the start of required withdrawals are the least expensive window for Roth conversions, and the full opportunity is explained in a free guide here.
More from Digilifetrends
She Wants to Invest $400,000 in an Annuity to Avoid Market Swings. Using Pretax IRA Money Instead of After-Tax Savings Would Make Another $12,240 of Her Social Security Taxable
An advisor guides an older couple through critical financial and estate planning decisions, such as asset protection for long-term care.
4 min read · Published 2026-11-29Savvy Senior: Should you convert a traditional IRA to a Roth IRA?
Dear Savvy Senior,
3 min read · Published 2026-11-29