If you donate the stock directly to a charity without selling it first, you don’t pay taxes on long-term gains. In your example, if you donate $100 of stocks and reinvest the $100 in cash, then you don’t pay taxes on the $25 capital gain. When you sell the $125 in two years, you pay taxes on a long-term capital gain of $25, compared to the gain of $50 if you donated the $100 in cash instead.
You’re right that you could end up paying more in taxes if you sold the stocks less than a year after reinvesting. Another caveat is that you can only deduct donations of stock up to 30% of adjusted gross income, unlike 50% for cash donations.
If you donate the stock directly to a charity without selling it first, you don’t pay taxes on long-term gains. In your example, if you donate $100 of stocks and reinvest the $100 in cash, then you don’t pay taxes on the $25 capital gain. When you sell the $125 in two years, you pay taxes on a long-term capital gain of $25, compared to the gain of $50 if you donated the $100 in cash instead.
Here’s an article that describes this in more detail: http://www.fivecentnickel.com/2010/04/30/reset-your-investment-cost-basis-with-charitable-donations/ It also mentions the wash sale rule, which might be the law that you were thinking of. That rule only applies if you sell assets at a loss, so it wouldn’t come into play here.
You’re right that you could end up paying more in taxes if you sold the stocks less than a year after reinvesting. Another caveat is that you can only deduct donations of stock up to 30% of adjusted gross income, unlike 50% for cash donations.