CPAFIRE

Capital Gains Tax Planning: Rates, Timing and Strategies That Work

By · Updated

Part of: Tax Planning

TL;DR: Long-term gains get 0%, 15% or 20% rates that stack on top of ordinary income. Hold past one year, harvest losses and gains deliberately, give appreciated shares instead of cash, and let the step-up at death erase gains you never needed to sell.

Educational only, not tax, legal, or investment advice. Examples are illustrations, not predictions. Rules and limits change; verify current figures and talk to a qualified professional about your situation.

The tax code is roughly 4 million words long, and capital gains get a suspicious number of them. That is good news. Capital gains are the part of your tax life where you have the most control: you usually choose what to sell, when to sell it, and sometimes whether to sell it at all.

This pillar covers the whole playbook: short-term versus long-term, the 2026 0/15/20% thresholds and how gains stack on top of other income, loss and gain harvesting, gifting and the step-up at death, and where to hold assets so the problem never gets big. Figures are 2026 amounts as of October 27, 2026; the 2027 thresholds had not been released yet.

One honest warning: tax planning should not drive investment decisions off a cliff. Paying 15% on a gain is still better than holding a terrible investment to avoid it.

CPA Warning Label: The cheapest capital gains tax is the one on a gain you realized in a year you planned for. The most expensive is the one you realized because you panicked on a Tuesday.

Short vs long term

A capital gain is short-term if you held the asset one year or less and long-term if you held it more than one year. Short-term gains are taxed at ordinary income rates, up to 37%. Long-term gains get the preferential 0%, 15% and 20% rates. The holding period starts the day after you buy and includes the day you sell, so "more than one year" means selling on or after the one-year anniversary plus one day. The details, including how gifts and inheritances count, are in short-term vs long-term capital gains.

Netting

Gains and losses net in a fixed order: short-term losses offset short-term gains first, long-term offsets long-term, then the net figures offset each other. If you end with a net loss, up to $3,000 a year ($1,500 married filing separately) offsets ordinary income, and the rest carries forward indefinitely.

Special rates hiding in the corner

  • Collectibles (art, coins, gold, many precious metal ETFs) are taxed at up to 28% on long-term gains.
  • Unrecaptured Section 1250 gain from depreciation on rental real estate is taxed at up to 25%.
  • Net investment income tax adds 3.8% on investment income once modified AGI exceeds $250,000 married filing jointly or $200,000 single. Those thresholds are not indexed for inflation, so more people hit them every year.

0/15/20% thresholds

For 2026, long-term gains and qualified dividends are taxed based on where they land in your taxable income:

RateMarried filing jointlySingleHead of household
0%Up to $98,900Up to $49,450Up to $66,200
15%$98,900 to $613,700$49,450 to $545,500$66,200 to $579,600
20%Over $613,700Over $545,500Over $579,600

Stacking

Here is the part that confuses everyone. Ordinary income fills the brackets first, and long-term gains sit on top. If a married couple has $80,000 of taxable ordinary income, only $18,900 of room is left in the 0% zone; any gain above that is taxed at 15%. A gain never pushes your ordinary income into a higher bracket, but ordinary income can push your gains into a higher gain rate. The mechanics are covered step by step in capital gains stacking rules.

The FIRE superpower

Early retirees living on savings often have very low ordinary income. A married couple with no wages can have up to $131,100 of total income ($98,900 plus the $32,200 standard deduction) and still pay 0% federal tax on long-term gains, as long as the gains and dividends make up the income above the standard deduction. That is why 0% capital gains harvesting is one of the best tricks in early retirement. Watch for side effects: higher income can shrink ACA premium credits and affect state taxes, which usually do not offer a 0% rate.

Harvesting losses and gains

Tax-loss harvesting

When an investment drops below what you paid, you can sell it, realize the loss and buy a similar but not substantially identical investment to stay invested. The loss offsets gains and up to $3,000 of ordinary income per year. The catch is the wash sale rule: buy the same or a substantially identical security within 30 days before or after the sale, including in an IRA or a spouse's account, and the loss is disallowed or deferred. See the wash sale rule guide.

Loss harvesting lowers your basis, so it often defers tax rather than eliminating it. It is most valuable when you use losses against short-term gains or ordinary income, or when you eventually donate the shares or hold them until death.

Gain harvesting

The opposite move: in a year with room in the 0% bracket, sell appreciated shares and immediately buy them back. Wash sale rules do not apply to gains. You pay nothing now and reset your basis higher, which reduces future taxable gains. The harvesting calculator at capital gains harvesting calculator estimates how much room you have.

Pick your lots

If you bought the same fund at different prices, tell your broker which shares to sell. Selling the highest-basis lots first can turn a big gain into a small one, or a loss. The how-to is in specific lot identification. Default methods (first-in, first-out, or average cost for mutual funds) are often the most expensive option.

Real estate gains

Rental property sales add depreciation recapture, possible 1031 exchanges, installment sales and the home sale exclusion if you once lived there. Improvements raise your basis, so keep the receipts; the list of what counts is in rental capital improvements.

Gifting and step-up

Give shares, not cash

If you give to charity, giving appreciated long-term shares directly is usually better than selling and donating cash. You generally deduct the fair market value (subject to AGI limits) and neither you nor the charity pays tax on the gain. A donor-advised fund makes this easy with odd lots and many small gifts.

Gifts to family

When you give appreciated property to a person, they take your basis (carryover basis) and your holding period. If the recipient is in the 0% bracket, they may be able to sell with little or no federal tax. Two traps: the kiddie tax taxes much of a child's or student's unearned income above $2,700 at the parent's rates for 2026 (the first $1,350 is untaxed and the next $1,350 at the child's rate), and gifts above the $19,000 annual exclusion per recipient require a gift tax return, though rarely any tax. Rental property gifted to adult children has its own considerations in rental property capital gains and your kids.

Step-up at death

Under Section 1014, assets inherited at death generally get a new basis equal to fair market value on the date of death. Decades of gains vanish for income tax purposes. That makes the decision of which assets to sell during life and which to hold very important for older investors. Highly appreciated assets are often best held, while high-basis assets fund spending. See step-up in basis for community property and other details.

Location

Asset location reduces capital gains before they happen.

  • Taxable accounts: broad index funds and ETFs with low turnover, municipal bonds for high earners, and individual stocks you might donate or hold until death.
  • Tax-deferred accounts: taxable bonds, REITs and actively traded strategies. Gains inside an IRA are never capital gains; withdrawals are ordinary income.
  • Roth accounts: the assets with the highest expected growth, since that growth is never taxed if rules are followed.

Also watch fund distributions. Some mutual funds distribute capital gains every December, which can hand you a taxable gain even if you never sold anything. ETFs usually distribute far fewer gains because of how they are structured.

Donating and rebalancing without selling

Use new contributions and dividends to rebalance instead of selling winners. Use retirement accounts, where trades are tax-free, for the big reallocations. Donate your lowest-basis shares and keep the high-basis ones. Every trick here has the same goal: realize gains only when you mean to.

Capital gains on special assets

Your home

Under Section 121, you can exclude up to $250,000 of gain ($500,000 married filing jointly) on the sale of a main home if you owned and lived in it for at least two of the five years before sale. Gain above the exclusion is a regular capital gain. Depreciation claimed for a home office or a rental period after May 6, 1997 is not excluded and is taxed as unrecaptured Section 1250 gain. See the home sale exclusion.

Rental property

Selling a rental combines up to three tax layers: long-term capital gain on appreciation, up to 25% on depreciation you took (or were allowed to take), and possibly the 3.8% net investment income tax. A 1031 exchange can defer all of it if you buy replacement real estate, and an installment sale can spread the gain over years. Holding the property until death gets a step-up, which can wipe out the depreciation recapture as well as the appreciation for your heirs.

Stock compensation

RSUs are taxed as wages at vesting, and your basis is the vesting value; only growth afterward is capital gain. ESPP and ISO shares have holding-period rules that decide how much of the gain is ordinary income. Many people pay tax twice on the same income by forgetting to adjust basis when the broker's 1099-B shows the original purchase price only. Check Form 8949 adjustments every time you sell stock compensation.

Crypto

Crypto is property for federal tax purposes, so selling, swapping or spending it is a disposal that can create a gain or loss. Holding period rules apply the same way. Brokers now report more of these transactions to the IRS on Form 1099-DA, so the days of "the IRS doesn't know" are over.

Mutual fund distributions

Capital gain distributions from mutual funds are treated as long-term regardless of how long you held the fund. Buying a fund right before its December distribution is a classic mistake: you get taxed on a gain you never enjoyed. Check the fund's estimated distribution date before buying in a taxable account late in the year.

A simple capital gains decision checklist

Before you sell anything in a taxable account, run through this list. It takes five minutes and can save thousands.

  1. Is it long-term? If the sale is within a few weeks of the one-year mark, waiting may convert a 24% or 32% tax into 15%.
  2. Which lots? Pick specific high-basis lots unless you are deliberately harvesting gains.
  3. Where does it land? Estimate taxable income with and without the sale. Is the gain in the 0%, 15% or 20% zone? Does it cross $250,000 or $200,000 MAGI for the 3.8% NIIT?
  4. Any losses available? Check carryforwards and positions sitting below cost.
  5. Side effects? ACA premium credits, IRMAA two years later, Social Security taxation, state tax and college aid formulas all respond to higher income.
  6. Better alternatives? Could you donate these shares instead of cash, gift them to someone in a lower bracket, rebalance inside an IRA, or hold them for a step-up?
  7. Paid on time? A large gain may require an estimated tax payment to avoid an underpayment penalty.

Capital gains tax is one of the few taxes you can schedule. Use that power deliberately and the 0% bracket becomes your favorite room in the house.

Capital losses: making lemons useful

Losses are not fun, but they are useful. A realized capital loss offsets capital gains dollar for dollar, then up to $3,000 of ordinary income per year, with the rest carried forward until used. Carryforwards keep their character as short-term or long-term, which matters because short-term losses first offset short-term gains taxed at ordinary rates. Keep a running record of carryforwards from your prior returns; software that changes from year to year sometimes drops them. Losses on personal-use property, such as your car or your own home, are not deductible at all, and losses on sales to related parties such as a parent, child or controlled company are disallowed. When a married couple files separately, the annual ordinary-income offset drops to $1,500 each. A loss carryforward generally dies with the taxpayer, so for an older investor with a large carryforward, using it against gains during life is part of the plan. In a year with big gains, look for positions below cost that you would be happy to swap for a similar fund, and use them to bring the net gain down.

Example

Illustration: a retiring couple plans three years

Dana and Lee, both 56, retire at the end of 2025 with $900,000 in a taxable brokerage account (basis $500,000) and $1.2 million in traditional IRAs. They plan to live on $90,000 a year from the brokerage account until age 60. Using 2026 figures:

  • They sell $90,000 of shares with an average gain ratio of about 44%, realizing about $40,000 of long-term gains. With $6,000 of interest and qualified dividends, their total income is about $46,000.
  • After the $32,200 standard deduction, taxable income is about $13,800, all of it gains, interest and dividends. The interest is taxed at 10%; the long-term gains and qualified dividends are taxed at 0%. Federal tax is close to zero.
  • They still have roughly $85,000 of room before taxable income reaches $98,900. They harvest about $85,000 more of long-term gains by selling and rebuying the same funds, paying 0% and stepping up their basis.
  • Instead, in one year they could use part of that room for a Roth conversion. Conversion income is ordinary income, so it pushes gains into the 15% zone. Running both scenarios in a projection shows which mix is cheaper over their lifetime.

Before acting, they check whether the extra income affects ACA premium credits for their health insurance and how their state taxes gains. In many states, 0% federal still means state tax.

Illustration only. Numbers are rounded, and real returns depend on lot basis, state tax and health insurance costs.

FAQ

What are the 2026 capital gains tax brackets?

For 2026, long-term gains are taxed at 0% up to $98,900 of taxable income for married couples filing jointly ($49,450 single), 15% up to $613,700 ($545,500 single) and 20% above that. The 3.8% net investment income tax may apply above $250,000 MAGI joint or $200,000 single.

How long do I have to hold to get long-term rates?

More than one year. The holding period begins the day after purchase, so sell on or after the day after the one-year anniversary of your purchase date.

Can I avoid capital gains tax completely?

Legally, sometimes: realize gains within the 0% bracket, donate appreciated shares, hold assets until death for a step-up, or exclude home sale gains under Section 121. Most other strategies defer tax rather than eliminate it.

Does the wash sale rule apply to gains?

No. The wash sale rule only disallows losses. You can sell at a gain and buy back immediately to reset your basis.

Do states tax capital gains?

Most states with an income tax treat capital gains as ordinary income. A few have no income tax, and some offer partial exclusions. Check your state's rules before assuming 0% federal means 0% overall.

Sources & fact-check notes

Figures checked October 27, 2026. Rules and limits change; verify with the official source before acting.