High-income investors with taxable accounts often have access to two distinct tax levers at the same time: a harvested-loss bank built from underwater positions, and appreciated positions they may want to diversify out of or direct toward a philanthropic goal. Both levers reduce what is owed to the IRS, but they work on fundamentally different parts of the tax picture. The most efficient approach generally depends on sorting each position into the right strategy — and understanding why donation and harvesting are not interchangeable.
The central distinction is this: donating appreciated stock directly to a qualified charity or donor-advised fund bypasses the embedded capital gain entirely, while a harvested loss offsets a gain only after the gain has already been recognized. For investors who have genuine charitable intent, that structural difference changes which positions get which treatment.
How donating appreciated stock to a charity or DAF works
How does donating long-term appreciated stock directly to a qualified charity or donor-advised fund avoid capital gains tax?
When a donor contributes long-term appreciated stock directly to a qualified 501(c)(3) organization or donor-advised fund, the embedded capital gain is never recognized as income — neither the donor nor the recipient organization pays capital gains tax on the appreciation — while the donor may deduct the full fair-market-value of the donated shares under IRC §170.
The mechanism works because the IRS treats a contribution of appreciated property as a disposition at fair value without requiring the donor to recognize the gain first. The embedded gain is extinguished from the donor's tax picture entirely — not deferred to a future year, but eliminated at the point of contribution.
A donor-advised fund (DAF) is a common vehicle for this strategy because it allows flexibility in timing: the investor contributes appreciated shares to the DAF and takes the charitable deduction in that year, then recommends grants to specific operating charities over time. Because the DAF is itself a qualified 501(c)(3) organization, the same gain-elimination treatment applies to the contribution.
IRC §170 limits the annual deduction for contributions of appreciated long-term property to generally up to 30% of adjusted gross income in a given year, compared with up to 60% for cash contributions. Amounts above the applicable annual limit may carry forward for up to five years. For positions with very large embedded gains, this timing difference may become a relevant planning consideration.
How tax-loss harvesting addresses a different tax problem
How does tax-loss harvesting differ mechanically from donating appreciated stock as a tax-reduction tool?
Tax-loss harvesting works by realizing losses on underwater positions and using those losses to offset recognized capital gains elsewhere in the portfolio — which is a different mechanism from donation, because harvesting requires a gain to be recognized first and then applies the harvested loss as an offset, whereas a direct stock donation removes the gain from the tax picture before it is ever realized.
Both strategies reduce taxable income, but through distinct paths. A harvested loss creates a realized capital loss under IRC §1211 that may offset realized capital gains dollar-for-dollar. Losses not used in the current year carry forward indefinitely under IRC §1212 and remain available for future gains.
The practical question for an investor with both appreciated positions and underwater positions is: which positions get which treatment? Donating the most appreciated positions directly can eliminate those gains without any realization event, while harvesting losses on underwater positions creates a reusable loss bank for gains that arise from events where donation is not available — such as rebalancing, RSU vesting, or portfolio transitions. For more on how to build and deploy a harvested loss bank over time, see annual TLH pacing and tax alpha explained.
When donating appreciated stock produces a better result
When does donating an appreciated position directly typically produce a better after-tax result than using a harvested loss to offset the gain on that same position?
Donating an appreciated position directly typically produces a better after-tax result when the investor has genuine charitable intent, because the donation avoids the embedded gain entirely and generates a deduction at the full fair-market-value — whereas using a harvested loss to offset that same gain still requires first recognizing the gain, which consumes loss-bank capacity that could have been preserved for gains that cannot be eliminated through donation.
The structural contrast between the two approaches is clearest when looking at what happens to the loss bank:
- Sell appreciated stock, then donate cash: The sale potentially triggers a capital gain. A harvested loss can offset that gain. The cash proceeds are then donated for a deduction. But the harvested loss has been consumed by a taxable event that a direct donation would have prevented entirely.
- Donate the appreciated stock directly: The embedded gain is never recognized. The charitable deduction is based on the full current fair-market-value. The harvested loss bank remains intact for use against other gains — RSU vesting, rebalancing trades, or future realized income.
The second approach generally preserves loss-bank capacity while accomplishing the same charitable goal. In high-tax states where capital gains may also be taxed at the state rate, the difference between the two approaches in after-tax value can be more significant — see how TLH interacts with state taxes for the combined federal-and-state picture.
How charitable intent and harvestable losses work together
How can an investor coordinate charitable giving and tax-loss harvesting for the greatest combined tax efficiency?
The most tax-efficient coordination typically involves directing the most appreciated, least-wanted positions toward direct donation to eliminate embedded gains, while applying tax-loss harvesting to underwater positions worth replacing — preserving the harvested loss bank for gains that arise from events where donation is not available.
A common approach sorts the portfolio along two dimensions: which positions carry the largest embedded gains and are most likely to be given away or exited anyway, and which positions are currently at a loss and worth replacing with a wash-sale-compliant alternative.
For appreciated positions with charitable intent: contributing them directly to a DAF eliminates the embedded gain without consuming any loss-bank capacity. The deduction is based on current value.
For underwater positions the investor wants to replace: harvesting the loss, reinvesting in a tax-efficient replacement, and banking the realized loss against other gains — rebalancing proceeds, vested RSU sales, or distributions — is typically the right path.
For investors with concentrated positions — a large employer stake or accumulated RSU grants — this framework often helps clarify which lots to give to a DAF, which to harvest, and which to hold for a potential estate step-up. See concentrated stock and RSU planning for how the decision set looks in a large single-stock position, and the estate step-up basis math for how the IRC §1014 interaction fits into a long-horizon plan.
Limits and trade-offs to consider
What are the most important limits and trade-offs when combining direct stock donations and tax-loss harvesting in a coordinated tax plan?
The most important limits are: the IRC §170 annual deduction cap at generally up to 30% of AGI for long-term appreciated property contributions, the one-year minimum holding period required for full fair-market-value deduction treatment, the wash-sale rule constraining which harvested positions can be immediately repurchased, and the potential interaction with the IRC §1014 estate step-up for positions likely to be inherited rather than donated.
Several specific considerations are worth noting explicitly:
Holding period matters for the deduction. The full fair-market-value deduction under IRC §170 applies only to long-term appreciated positions — generally those held more than one year. Short-term appreciated positions donated to a DAF generate a deduction limited to cost basis rather than current value, which significantly reduces the tax efficiency of the donation for recently acquired or rapidly appreciated positions.
The wash-sale rule still constrains the harvest side. Selling an underwater position to generate a harvested loss requires purchasing a wash-sale-compliant replacement — buying back the same or substantially identical security within 30 days of the sale can disallow the loss under IRC §1091. See the wash-sale rule explained for how the substantially-identical test interacts with replacement selection.
The AGI cap may spread the deduction across multiple years. For investors contributing large appreciated positions in a year with moderate income, the generally applicable 30%-of-AGI annual limit may mean the full deduction takes multiple years to absorb. A DAF smooths this timing because the deduction belongs to the year the shares are contributed — even if the grants to operating charities are recommended in later years.
The IRC §1014 estate step-up changes the calculus for some positions. Positions that are likely to pass through an estate may be better candidates for holding rather than donating or harvesting — the step-up potentially eliminates the embedded gain at death without any charitable intent required. For positions where all three options are available (donate, harvest, or hold for the step-up), the analysis depends on charitable intent, time horizon, and legislative risk around each rule. See the step-up basis overview for the full long-horizon picture.
Read this next with the estate step-up basis math, the zero-tax exit strategy, the step-up basis overview, the wash-sale rule explained, and annual TLH pacing.
See unrealized gains and donation candidates in your portfolio