Tax-loss harvesting can help stock investors manage taxable gains, but it is not simply a matter of selling a losing position before year-end. This guide explains how tax-loss harvesting works, what to record, how wash-sale rules can affect the result, and how to build a repeatable review process for portfolio decisions and tax preparation.
Overview
Tax-loss harvesting is the practice of selling an investment below its adjusted cost basis to realize a capital loss. That realized loss may then be used, subject to applicable tax rules, to offset realized capital gains. If losses exceed gains, some jurisdictions may allow part of the remaining loss to offset other income or be carried forward, but the limits and treatment depend on the investor’s tax jurisdiction and the tax year.
The important distinction is between an unrealized loss and a realized loss. A stock that has fallen while you continue to hold it has an unrealized loss. It generally becomes a realized loss only after you sell or otherwise dispose of the position. The sale may change your portfolio exposure, so the tax result should be considered alongside investment objectives, diversification, transaction costs, and risk.
Tax-loss harvesting is not automatically beneficial. Selling may remove exposure before a recovery, create a wash-sale issue, or produce a tax benefit that is smaller than the investment or trading costs involved. It should be treated as a portfolio-planning decision rather than a reason to trade unnecessarily.
This article uses a general US stock-investing framework because terms such as the wash-sale rule and common tax forms are often discussed in that context. Rules vary by country, state, account type, security, and tax year. Confirm current requirements with the relevant tax authority or a qualified tax professional before acting.
What to track
A reliable tax-loss harvesting process starts with accurate records. Your brokerage statement may contain much of the required information, but investors should still review transactions for multiple purchases, dividend reinvestments, transfers between accounts, options activity, and securities held at different brokers.
Core variables
- Security and identifier: Record the ticker, fund name, or other identifier, along with the account in which it was held.
- Purchase details: Track acquisition date, number of shares, purchase price, commissions or fees where relevant, and the adjusted cost basis.
- Sale details: Record the sale date, number of shares, proceeds, fees, and resulting realized gain or loss.
- Holding period: Note whether the position was held for a short or long period under the rules that apply to you. Holding period can affect the tax character of a gain or loss.
- Replacement security: Document whether you bought the same security or a potentially similar replacement during the relevant review window.
- Account activity: Include taxable brokerage accounts, retirement accounts, spouse or household accounts where applicable, automatic investment plans, and dividend reinvestment instructions.
- Tax documents: Keep broker statements, trade confirmations, cost-basis reports, and the tax forms used to report sales.
Comparison table
| Item | What it means | What to document | Planning question |
|---|---|---|---|
| Realized gain | Profit recognized after a sale or other taxable disposition | Proceeds, adjusted basis, dates, and tax character | Can a realized loss offset this gain under the applicable rules? |
| Realized loss | Loss recognized after selling below adjusted basis | Shares, proceeds, basis, fees, and sale date | Is the loss available, or could it be deferred by a wash-sale adjustment? |
| Wash-sale consideration | A loss may be disallowed or deferred when substantially identical exposure is acquired within the relevant period | Purchases, reinvestments, transfers, and account locations | Will any related purchase change the reportable basis or timing? |
| Replacement security | A security used to maintain portfolio exposure after selling a losing position | Name, identifier, purchase date, quantity, and rationale | Is the replacement sufficiently different for the intended tax treatment and still suitable for the portfolio? |
| Holding period | The time between acquisition and disposition | Each lot’s acquisition and sale dates | Could the sale change the short-term or long-term character of the result? |
| Recordkeeping | Evidence supporting the calculation and reporting of the transaction | Confirmations, statements, worksheets, and tax forms | Could another person reconstruct the transaction later? |
Reusable trade-log template
Use one row for each tax lot or transaction, rather than recording only the ticker symbol:
Account | Security/identifier | Shares | Buy date | Buy price | Adjusted basis | Sell date | Sale proceeds | Realized gain/loss | Holding period | Related purchases or reinvestments | Replacement security | Wash-sale review | Tax document checked | Notes
Save a dated copy of the log after each review. Do not rely solely on a trading app’s displayed percentage return; that figure may not reflect all lots, distributions, fees, corporate actions, or tax adjustments.
Cadence and checkpoints
A year-round process is usually more manageable than a rushed review near the tax filing deadline. The following schedule provides a practical framework without requiring investors to sell on a fixed timetable.
Monthly or quarterly portfolio review
- Export or download current transaction and cost-basis data.
- Identify positions with unrealized losses and confirm that the loss is meaningful after fees and spreads.
- Review the original investment thesis, desired portfolio weight, diversification role, and risk exposure.
- Check for recent purchases, automatic contributions, dividend reinvestments, options activity, or related accounts that could affect wash-sale analysis.
- Estimate realized gains and losses already recorded during the tax year.
Before realizing a loss
Decide whether you are selling because the investment no longer fits the plan or because a tax adjustment is one factor in a broader decision. Define the replacement plan before placing the order. A replacement may be cash, a different security, or a temporary allocation, but it should match your risk tolerance and target exposure rather than being selected only for tax reasons.
Review the trade with the same discipline used for other stock decisions. A position-sizing and risk-management template can help you assess whether the proposed replacement would create an unintended concentration. If the position is connected to an earnings event or macro catalyst, also consider the risks described in the earnings trading guide and the Fed and CPI planning guide.
After the trade
Save the confirmation, update each affected tax lot, and record any replacement purchase. Reconcile your personal log with the brokerage statement. If the broker later reports a basis adjustment or wash-sale amount, update the log rather than treating the first estimate as final.
Before filing
Compare your log with year-end tax documents and verify that sales, basis information, adjustments, and carryforwards have been considered. Tax forms, reporting methods, thresholds, and instructions can change, so use current official materials or professional advice for the relevant tax year.
How to interpret changes
A falling market value does not by itself create a tax opportunity. First separate three questions: how much has the investment declined, whether the loss is realized, and whether realizing it improves the overall plan after tax and trading considerations.
When realized gains rise during the year, losses may become more relevant as an offsetting tool. However, matching a loss to a gain is not always a reason to sell. Consider the expected return of the holding, the cost of leaving the position, the chance of missing a rebound, and whether a replacement can provide suitable exposure without creating a wash-sale concern.
A wash-sale review deserves particular care. The rules can involve purchases made around the sale, including activity that is easy to overlook, such as automatic reinvestment or transactions in another account. The exact definition of a substantially identical security and the treatment of disallowed losses can be fact-specific. Flag uncertainty in your log and seek advice instead of making an unsupported assumption.
Also distinguish tax efficiency from investment performance. A realized loss can reduce taxable income or gains under applicable rules, but it does not make the portfolio loss disappear. Compare after-tax outcomes, not just the size of the reported deduction. Investors using automated systems or a trading bot should add tax-lot and wash-sale checks to the workflow; an algorithm that ignores account activity can create recordkeeping problems even when its trading signals are sound.
When to revisit
Revisit this guide at least monthly or quarterly during active investing, at year-end before placing tax-motivated trades, and before preparing the annual return. Return sooner after changing brokers, opening or closing an account, enabling dividend reinvestment, transferring securities, trading options, buying mutual funds or exchange-traded funds, or changing your filing situation.
Update the workflow whenever tax rules, reporting forms, wash-sale guidance, cost-basis requirements, or jurisdiction-specific treatment changes. Because these details are time-sensitive, confirm the current tax-year instructions rather than carrying forward an old threshold or form number.
Practical next step: create the trade log today, import your current year-to-date transactions, and mark every position with an unrealized loss. For each one, record the basis, holding period, related purchases, intended replacement, and open questions. Then schedule a recurring calendar review and keep the completed log with your tax records. A careful process makes tax-loss harvesting easier to evaluate without turning it into an automatic sell signal.