Capital Gains Tax & Tax-Loss Harvesting

Category: Tax Planning Author: Andrey Sapir Updated: 2026-11-10 13:58:19 Reading Time: 17 min

Understand what you owe, use investment losses thoughtfully, and avoid the wash-sale mistakes that can undo your plan.

Capital gains tax applies to taxable profits when you sell investments. Tax-loss harvesting means realizing deductible investment losses to offset capital gains and, within limits, other income. Used carefully, it can reduce today’s tax bill or defer taxes. It cannot turn a poor investment into a profit, and a replacement purchase can invalidate the deduction.

This guide covers 2026 federal rules for individuals investing through taxable accounts, with selected state examples. It does not apply corporate, trust, trader, or nonresident rules. For a coordinated projection, explore SAPIR EA’s tax preparation and planning services. All examples are hypothetical and exclude unstated taxes, fees, and income interactions.

1. What counts as a capital gain or loss?

A gain or loss generally equals the amount realized on a sale minus adjusted tax basis. Stocks, investment funds, and many other investments are capital assets. A price decline while you continue holding shares is an unrealized loss; it normally provides no current deduction. A taxable sale makes that economic change relevant to your return. [1]

If shares cost $18,000 and you sell them for $24,000, ignoring fees and adjustments, the gain is $6,000. Selling them for $14,000 instead produces a $4,000 loss. You calculate tax on the gain, not the entire proceeds. Losses on personal-use property, such as your family car, generally are not deductible. [2]

2. Get basis and tax lots right first

Adjusted basis may include purchase costs, reinvested distributions, corporate actions, and prior wash-sale adjustments. Reinvested dividends can be taxable income and also buy additional shares with their own basis. Missing those purchases can cause you to pay tax twice on the same dollars. Gifted and inherited assets have special basis rules. [3]

Review individual lots before selling. Two purchases of the same fund can have different gains and holding periods. Specific identification can let you select particular shares, but follow the broker’s identification and confirmation procedures. Do not assume you can choose a better lot retroactively after the sale. Reconcile transferred positions and missing basis records before executing a large transaction. [4]

3. Short-term versus long-term capital gains

For ordinary investment stock, a holding period of one year or less produces short-term treatment; more than one year produces long-term treatment. Counting generally starts the day after acquisition and includes the sale date. A purchase on November 5, 2025, sold November 5, 2026, is not held more than a year; November 6 generally clears that threshold. [5]

Net short-term gains generally face ordinary federal rates, currently 10% through 37%. Most net long-term gains qualify for preferential rates. Inherited property and certain specialized investments follow exceptions. Waiting for long-term treatment may help, but a market decline can exceed the tax difference. Compare the projected tax saving with concentration risk and your actual need for cash.

On small screens, scroll the table horizontally.
Short-term versus long-term: standard investments
Feature Short-term Long-term
Holding period One year or less More than one year
Usual federal rates Ordinary rates: 10%–37% Preferential rates: 0%, 15%, 20%
NIIT May apply May apply
State treatment Check separately Check separately

4. The 2026 long-term capital gains tax brackets

These thresholds apply to taxable income, not salary, account value, gross proceeds, or adjusted gross income. Ordinary taxable income fills the lower layers first; preferential gains and qualified dividends sit above it. Crossing a threshold does not make every dollar of gain taxable at the higher rate. The table covers the usual 0%/15%/20% categories. [6]

On small screens, scroll the table horizontally.
2026 taxable-income thresholds for usual long-term capital gains
Filing status 0%: up to 15%: above 0% ceiling, through 20%: above
Single $49,450 $545,500 $545,500
Married filing jointly / qualifying surviving spouse $98,900 $613,700 $613,700
Head of household $66,200 $579,600 $579,600
Married filing separately $49,450 $306,850 $306,850

For example, assume a single filer has $40,000 of ordinary taxable income and $20,000 of eligible net long-term gains, with no qualified dividends or special-rate gains. The first $9,450 fits below $49,450 and receives the 0% rate. The remaining $10,550 is taxed at 15%, or $1,582.50. This is a regular federal income-tax illustration, before other taxes and interactions.

The 0% rate does not make the gain disappear from income. Realizing gains can affect other tax calculations and income-based benefits. Qualified dividends also consume the available preferential-rate space. Use a complete return projection before intentionally realizing gains in a low-income year.

5. Some assets do not fit the standard rate table

Long-term collectibles gains can face a maximum 28% rate. Unrecaptured section 1250 gain from certain depreciated real estate can face a maximum 25% rate. Depreciation recapture may instead be ordinary income. These are maximum categories, not automatic flat rates on every transaction. Rental sales also involve section 1231, passive-loss, and depreciation rules. [2]

A qualifying principal-residence sale may exclude up to $250,000 of gain, or $500,000 for qualifying joint filers, subject to ownership, use, and other requirements. A loss on a personal residence generally is not deductible. Review SAPIR EA’s rental real estate tax guide when an investment property is involved; a brokerage harvesting calculation cannot replace a property-sale analysis. [7]

6. When the 3.8% NIIT applies

The Net Investment Income Tax is a separate 3.8% federal tax. For individuals, it applies to the lesser of net investment income or modified adjusted gross income above the applicable threshold. The thresholds are $200,000 for single or head-of-household filers, $250,000 for joint filers and qualifying surviving spouses, and $125,000 for married filing separately. They are not indexed for inflation. [8]

Suppose joint filers have $280,000 of NIIT MAGI and $50,000 of net investment income. The excess over $250,000 is $30,000, so NIIT is $30,000 × 3.8% = $1,140. It is not $1,900 on the entire $50,000. Eligible capital losses can reduce the calculation, but their benefit depends on both sides of this lesser-of test.

The familiar 23.8% figure combines the 20% long-term rate and 3.8% NIIT when both apply to the same dollars. It is not a universal investment tax rate, and state taxes may add more.

7. How capital losses offset gains

Start by netting short-term gains and losses, including short-term carryovers. Separately net long-term items and long-term carryovers. If the two results have opposite signs, they generally offset each other. You cannot freely assign a particular loss to whichever gain has the highest tax rate; the statutory netting sequence controls. [5]

Consider $8,000 of short-term gains, $3,000 of short-term losses, and $7,000 of net long-term losses. The short-term subtotal is a $5,000 gain. Offsetting it against the long-term loss leaves a $2,000 net capital loss. Assuming sufficient income and no other adjustments, that loss can fall within the annual ordinary-income deduction limit.

Capital loss netting rules
The text above and below explains the netting sequence and applicable limits.

8. The $3,000 deduction and capital loss carryforwards

After gains are offset, individuals generally may deduct up to $3,000 of remaining net capital losses against other income annually, or $1,500 if married filing separately. This is a deduction, not a dollar-for-dollar credit. At an unchanged 24% marginal rate, a fully usable $3,000 deduction saves $720 of regular federal tax. [9]

Unused losses generally carry forward to later years, keeping their short-term or long-term character. Individual capital losses generally cannot be carried back. If a single filer has a $12,000 net capital loss, no other capital items, and enough taxable income to use $3,000, the simplified carryforward is $9,000. Low taxable income can change the carryover calculation, so use the applicable worksheet. [10]

Retain prior returns and carryover schedules when changing preparers. A loss can have little immediate value but offset a later taxable gain. The annual deduction limit does not cap how much loss can offset capital gains in the same year.

9. How tax-loss harvesting works

Tax-loss harvesting deliberately realizes an investment loss inside a taxable account while preserving an appropriate investment plan. First project annual realized gains and carryovers. Then identify eligible loss lots, check purchase activity, choose whether to hold cash or buy a suitable replacement, and document the transaction. The replacement must avoid the wash-sale restrictions discussed below.

Harvesting is often tax deferral. Selling a $10,000-basis position for $7,000 realizes a $3,000 loss. Buying a different investment for $7,000 gives that replacement a $7,000 starting basis. If it later sells for $10,000, the $3,000 rebound generally creates a gain. Today’s tax saving must be weighed against later tax, trading costs, and investment differences.

There is no general federal annual dollar ceiling on properly realized harvesting losses. Their current deductibility depends on netting, the ordinary-income limit, and other applicable restrictions. Losses already carried forward may reduce the need for additional sales. Harvest only when the expected after-tax result supports the transaction.

10. A tax-loss harvesting example with the math

Assume you already realized $20,000 of long-term gains, have no other capital items, and hold a separate investment with a $30,000 adjusted basis worth $22,000. Selling that position produces an $8,000 long-term loss. Assume no wash sale, no NIIT, and that every affected gain dollar otherwise falls in the 15% bracket.

On small screens, scroll the table horizontally.
Illustration: $8,000 loss offsets gains taxed at 15%
Calculation Without harvesting With harvesting
Realized long-term gains $20,000 $20,000
Harvested long-term loss $0 −$8,000
Net long-term gain $20,000 $12,000
Regular federal tax at 15% $3,000 $1,800
Current-year tax reduction — $1,200

The $1,200 difference is a current-year regular federal tax reduction under these assumptions. It is not an $8,000 refund or a guaranteed permanent saving. Changing brackets, NIIT exposure, state rules, or later replacement gains changes the result. Compare those effects before selling, especially if transaction costs or market exposure differ substantially.

Tax-loss harvesting example
Illustration only: all affected gains taxed at 15%; no NIIT, state tax, fees, or wash sale.

11. The wash-sale rule: a 61-day review window

Under section 1091, a loss on stock or securities can be disallowed when you acquire substantially identical stock or securities during the 30 days before or 30 days after the sale. The sale date makes the review window 61 days altogether. Contracts and options can count. Buying before selling can trigger the rule too. [11]

For a December 15, 2026, loss sale, review November 15, 2026, through January 14, 2027, inclusive. January 15 is day 31 after the sale. That later purchase date avoids the after-sale portion only; you still must check earlier purchases and other transactions. December harvesting therefore requires monitoring purchases into January.

In a typical taxable-account wash sale, the disallowed loss increases the replacement shares’ basis, and the old holding period carries over. Partial repurchases can disallow only part of a loss. A broker’s report may miss purchases at another firm, a spouse’s purchases, or other relevant transactions; taxpayers remain responsible for correct reporting. [4]

Wash-sale review window
Review purchases on both sides of the loss sale, including relevant activity in other accounts.

12. Replacement investments and automatic purchases

“Substantially identical” requires a facts-and-circumstances analysis. Different ticker symbols or fund companies do not establish a safe harbor. Two funds tracking the same index deserve particular scrutiny. Conversely, investment similarity alone does not settle the legal test. Avoid claiming that a named ETF pair is automatically IRS-approved for harvesting. [4]

Review dividend reinvestment, recurring purchases, managed accounts, employee stock activity, spouse accounts, and option positions. Pause conflicting automatic purchases where appropriate before selling. Coordinate with an adviser on replacement exposure and record why the replacement is meaningfully different. Holding cash through the restricted period avoids one replacement issue but introduces the risk of missing a market rebound.

13. Retirement accounts need separate treatment

Selling an investment at a loss inside an IRA or 401(k) generally does not create a deductible capital loss on your individual return. Taxable-account harvesting rules should not be applied to internal retirement-account trades. Traditional IRA distributions generally follow ordinary-income rules, while qualified Roth distributions generally are tax-free. [12]

More seriously, selling stock at a loss in a taxable account and causing your IRA or Roth IRA to buy substantially identical stock within the wash-sale window can permanently eliminate the deduction: Revenue Ruling 2008-5 disallows the loss without increasing IRA basis. Do not assume every wash sale merely defers the loss. [13]

Qualified-plan and IRA distributions generally are excluded from net investment income, but taxable distributions and Roth conversions can increase MAGI and expose other investment income to NIIT. Coordinate harvesting with SAPIR EA’s 2026 IRA strategy guide. [14]

14. Digital assets: separate current law from proposals

Digital assets held for investment generally produce capital gains or losses when disposed of. Exchanging one token for another can be taxable even without withdrawing cash. Maintain acquisition, disposition, value, and basis records rather than relying solely on an exchange summary. [15]

As checked November 5, 2026, section 1091’s operative text addresses stock or securities; it does not impose a blanket wash-sale rule on every digital asset. That does not establish an unrestricted crypto harvesting safe harbor. Security classification, transaction substance, related-party rules, and other restrictions still matter.

H.R. 10357 and S. 5616 propose digital-asset tax changes, including wash-sale provisions. The reviewed congressional materials describe proposed legislation, not an enacted blanket expansion. Proposed effective dates are not current-law instructions. Recheck enactment and effective-date language before trading or filing; a later law could change the treatment of transactions discussed here. [16]

15. State taxes can change the answer

Federal savings do not establish state savings. Pennsylvania generally taxes taxable net gains at its 3.07% personal income tax rate without a preferential long-term rate. Its separate income classes generally prevent a net investment loss from offsetting wages, and gains or losses generally cannot be carried between years. A federal carryforward may therefore provide no Pennsylvania carryforward benefit. [17]

California taxes capital gains as ordinary income without a lower capital-gains rate. Other states have different exclusions, conformity rules, and loss treatment. Residency changes and source-state real estate can complicate the calculation. Consult SAPIR EA’s multi-state tax return guide before assuming a move eliminates state tax. These examples are not a fifty-state survey. [18]

16. Reporting and year-end planning

Capital transactions generally flow through Form 8949 and Schedule D, subject to reporting exceptions. Reconcile Forms 1099-B and any applicable 1099-DA with your own records. Missing broker basis, transferred lots, and unreported cross-account wash sales require attention. Use final 2026 instructions when filing; several currently published investment instructions still cover 2025. [19]

For exchange-traded stocks and securities, the trade date generally determines the tax year, rather than settlement. Confirm execution and market schedules instead of leaving a sale until the final minutes of December 31. Losses ordinarily must be realized within the tax year; filing an extension does not reopen the investment calendar.

Large gains may require estimated payments or adjusted withholding. Federal penalty protection generally depends on timely payments meeting applicable current-year or prior-year safe harbors; higher-income taxpayers can face a 110% prior-year requirement. An annualized-income calculation may help with uneven gains. Start with SAPIR EA’s estimated tax calculator, then verify the full payment schedule. [20]

Before trading, gather year-to-date gains, carryovers, tax lots, pending distributions, all purchase activity, projected income, and state information. Coordinate any sale with retirement decisions and the year-end tax planning checklist. After trading, retain confirmations and monitor the entire wash-sale window. Reconcile results again when final tax statements arrive.

Frequently asked questions

How much capital loss can I deduct in 2026?

Capital losses first offset capital gains. An individual can generally deduct up to $3,000 of the remaining net loss against other income, or $1,500 if married filing separately. Unused losses generally carry forward; low taxable income can affect the calculation.

Can tax-loss harvesting offset short-term gains?

Yes. Short-term losses first net against short-term gains. Long-term losses can also offset a net short-term gain through the required netting sequence. You cannot simply assign losses to any gain you choose.

Does the wash-sale rule apply across brokerage accounts?

Yes. Using a different broker does not avoid the rule. Review all relevant accounts, spouse purchases, reinvested dividends, and IRA transactions. A broker’s Form 1099-B may not identify every wash sale you must report.

Can I buy the same stock back after 30 days?

A purchase on day 31 after the loss sale falls outside the after-sale window. You must also check the 30 days before the sale and other relevant transactions. Counting calendar days correctly matters, particularly around year-end.

Can I harvest losses inside an IRA?

An internal IRA sale generally does not create a deductible capital loss. Buying substantially identical stock in your IRA or Roth IRA around a taxable-account loss sale can disallow that taxable loss without increasing IRA basis under Revenue Ruling 2008-5.

Is tax-loss harvesting always a permanent tax saving?

No. A replacement investment normally has a new basis, and later appreciation can create taxable gains. The result depends on current and future rates, holding periods, state treatment, costs, and how long the tax payment is deferred.

Does a 0% federal capital-gains rate mean no state tax?

No. State law is separate. Pennsylvania and California, for example, do not provide the federal preferential long-term rate structure. A gain taxed at 0% federally can still produce state tax and affect other income-based calculations.

Can I wait until filing season to harvest a 2026 loss?

Generally no. The loss ordinarily must be realized during 2026 to affect that tax year. For exchange-traded stocks and securities, the trade date generally controls. A tax-return extension does not extend the trading year.

Turn investment activity into a coordinated tax plan

Bring SAPIR EA your realized-gain report, carryforward schedules, tax-lot detail, retirement transactions, and state residency information. A projection can compare selling now, waiting, harvesting losses, or realizing gains in a lower-rate year. Contact SAPIR EA to discuss your tax planning needs.

Educational information, current as researched November 5, 2026; not individualized tax, legal, or investment advice. Outcomes depend on your facts and later law. Consult your tax professional and investment adviser before implementing transactions.

Sources and further reading

IRS publications and instructions explain rules; the Code and applicable regulations govern.

  1. Capital assets and gains
  2. Asset sales and special gain categories
  3. Adjusted basis
  4. Investment income and wash sales
  5. Holding periods and netting definitions
  6. 2026 rate thresholds
  7. Principal residence sales
  8. NIIT thresholds and calculation
  9. Capital loss deduction limit
  10. Individual capital loss carryovers
  11. Wash-sale statute
  12. Retirement distribution treatment
  13. IRA wash-sale loss disallowance
  14. NIIT and retirement distributions
  15. Digital asset dispositions
  16. Digital-asset legislative proposals
  17. Pennsylvania personal income tax
  18. California capital gains
  19. Capital transaction reporting
  20. Estimated payments