Flat editorial illustration showing two branching paths emerging from a central open portfolio ledger. The left path carries a gold-tinted appreciated-stock token arching upward toward an abstract charitable vessel, representing the donation strategy where embedded gains are eliminated at the point of contribution. The right path shows a blue underwater position being exchanged for a replacement, representing tax-loss harvesting where realized losses offset recognized gains. Both paths originate from the same portfolio document — conveying that donation and harvesting address different parts of the same portfolio.
Donating appreciated stock directly to a qualified charity or donor-advised fund may eliminate the embedded capital gain entirely under IRC §170 — while tax-loss harvesting addresses a different part of the portfolio by creating realized losses to offset gains that must first be recognized. Coordinating both strategies may produce the greatest combined tax efficiency for investors with charitable intent.

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.

DIRECT DONATION FLOW APPRECIATED STOCK Embedded gain in position DONATE TO DAF or qualified charity GAIN ELIMINATED Not deferred — extinguished The donor may also deduct the contribution at full fair-market-value under IRC §170 — generally up to 30% of AGI annually for long-term appreciated property, with a five-year carryforward for excess amounts. Illustrative — IRC §170 deduction rules depend on organization type, holding period, and individual AGI. Not tax advice.
When long-term appreciated stock is contributed directly to a qualified charity or donor-advised fund, the embedded capital gain may be eliminated entirely under IRC §170 — not deferred to a later year, but extinguished at the point of contribution. A deduction at full fair-market-value may be available, subject to generally applicable AGI limits and individual circumstances.

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.

TWO DIFFERENT MECHANISMS DONATION Appreciated position → donate → gain eliminated HARVESTING Underwater position → loss realized → offsets gains Gain extinguished before recognized Gain recognized first, then offset Donation is most effective on appreciated positions. Harvesting is most effective on underwater positions. Illustrative — individual tax outcomes depend on specific circumstances. Not tax advice.
Donation and tax-loss harvesting operate through different tax mechanisms: a direct stock donation may eliminate an embedded gain before it is recognized, while a harvested loss offsets a capital gain after it has been realized. The strategies may work best when directed at different parts of the portfolio — appreciated positions toward donation, underwater positions toward harvesting.

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.
TWO APPROACHES FOR APPRECIATED STOCK WITH CHARITABLE INTENT SELL, THEN DONATE CASH Gain recognized → loss consumed → donate proceeds DONATE STOCK DIRECTLY Gain eliminated → loss bank preserved Loss bank capacity used Loss bank remains intact Donating stock directly may preserve the harvested loss bank for gains that cannot be avoided through donation — such as RSU vesting, rebalancing trades, or other recognized gains. Illustrative — individual outcomes depend on holding period, AGI, and specific circumstances. Not tax advice.
Selling appreciated stock and donating cash may consume harvested loss-bank capacity on a taxable event that a direct donation could have avoided entirely. Donating appreciated stock directly to a DAF or qualified charity may preserve the loss bank for gains that cannot be eliminated through donation — potentially producing a more efficient combined outcome for investors with genuine charitable intent.

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.

The ordering principle: Donate positions where the embedded gain is the problem. Harvest positions where the unrealized loss is the opportunity. The two strategies address different parts of the portfolio and generally work better when each is applied to the right type of position.
Abstract portfolio divided into two distinct regions. The left region shows a gold-tinted appreciated position with an upward arc flowing toward a stylized charitable vessel at the top, representing the donation strategy where embedded gains are eliminated. The right region shows a blue declining position being matched to a new blue replacement position, representing the harvesting strategy where realized losses are captured. Both regions are part of the same central ledger and portfolio frame, illustrating that coordinated two-strategy optimization uses each lever on the appropriate type of position — appreciation toward donation, losses toward harvesting.
Coordinating charitable giving and tax-loss harvesting may work best when each strategy is directed at the right type of position: appreciated positions with charitable intent toward direct donation to eliminate embedded gains, and underwater positions toward harvesting to build a reusable loss bank. Both strategies can operate simultaneously within the same portfolio.

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.

FOUR KEY LIMITS TO CONSIDER AGI CAP Generally up to 30% of AGI annually (long-term property) HOLDING PERIOD One-year minimum for full fair-market-value deduction WASH-SALE RULE Harvest side still subject to §1091 repurchase window ESTATE INTERACTION §1014 step-up may change donate vs. hold calculus Illustrative summary — rules vary by taxpayer circumstances. Not tax advice. Consult a qualified tax professional.
Four limits that commonly shape the coordination of charitable giving and tax-loss harvesting: the generally applicable IRC §170 annual deduction cap, the one-year holding period required for full fair-market-value deduction treatment, the IRC §1091 wash-sale constraint on the harvesting side, and the potential IRC §1014 estate step-up interaction for long-held positions. Individual outcomes depend on specific circumstances.

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