How To Avoid Capital Gains Tax

[Edited 01/30/2017 to clarify how much can be deducted for donating securities to charity]

Recall that when you sell an asset, you owe capital gains taxes on the difference between your cost basis and the sale price. There are, however, at least three ways capital gains taxes can be avoided (I’m sure there may be more, but these are the ones I am aware of)

  • If the asset is a stock, mutual fund, or ETF, and you’ve held it for at least a year, and you are in the 0% long term capital gains bracket, you don’t owe any tax on the sale. Of course, this requires you to be in the 0% long term capital gains bracket, which you may not be.
  • Donate the stock, mutual fund, or ETF to charity. Of course, this is only really beneficial if you were going to donate anyway.
  • Leave the asset to your heirs in your will. Neither your estate nor the heirs will owe any capital gains taxes.

Donating Appreciated Assets to Charity

A charity, being non-profit, can sell stocks, mutual funds, and ETFs without having to pay any capital gains taxes whatsoever. Hence, by donating appreciated assets to charity, nobody ends up paying the tax on the capital gains.

Suppose Monica bought 200 shares of VTSMX (Vanguard total stock market index, investor shares) back in January 2000, for $32.47 a share. This month, January 2015, she decided to donate the 200 shares to charity, when they were priced at $50 a share. If Monica had sold these shares herself before donating them, she would have a taxable long term capital gain of $3506. But Monica is in the 25% bracket, so should would have had to pay 15% in long term capital gains taxes – $525.90. Additionally, the charity can sell the 200 shares tax free, so they don’t pay any capital gains taxes either.

Now what if Monica had been in the 15% or 10% brackets, where there is a 0% long term capital gains tax? Well, she happens to live in a state with income tax. Even if a long term capital gain isn’t taxed, it’s still reported as income and included as a part of AGI. Hence, it will (generally speaking) also be taxable by the state. Additionally, most states do not have favorable tax treatment of long term capital gains, so Monica would owe state taxes on that.

What if Monica lived in an income tax free state like Washington? It’s possible she could have just sold it without issue. But it still causes her reported income to go up, which can cause issues with the Obamacare subsidy and financial aid for college. And it’s just much easier to not have to fill out the forms.

When you donate assets to charity, you still get a tax deduction like you would if you donated cash (just keep in mind this tax deduction only benefits you if you already or are close to being able to itemize your deductions). However, the deduction amount depends on whether you have an unrealized short term or long term capital gain (STCG/LTCG).

  • If you have an unrealized STCG, you can only deduct your cost basis (what you paid for the shares)*
  • If you have an unrealized LTCG, you can deduct the full fair market value (FMV) – that is, the value of the shares on the date of the donation.*

As noted by TJ below, if the former is true, and you’re either already itemizing your deductions or close to being able to do so, then you should just sell your shares, realize the capital gain, and donate the cash. Your donation deduction will now be for what was the full price of the shares, which will always make up for the taxes on the gains.

To donate shares via an electronic transfer through your brokerage you will need the charity’s DTC and account number (analogous to the routing and account number that is used for bank accounts). Sometimes charities will not post this on their website and you’ll have to email them. This is so they can inform you that when shares of securities are transferred to them through this system they don’t actually know who donated the shares (they only know which brokerage you used). If you wish to receive a letter as proof of donation so you can claim the deduction on your taxes, generally speaking you must inform the charity of when and how many shares you donated. Vanguard does say that they can disclose that information on your behalf, but I haven’t always received the letter from the charity automatically.

*Here are the relevant sections from IRS Publication 526, with my emphases added

Ordinary Income Property

 Property is ordinary income property if you would have recognized ordinary income or short-term capital gain had you sold it at fair market value on the date it was contributed. Examples of ordinary income property are inventory, works of art created by the donor, manuscripts prepared by the donor, and capital assets (defined later, under Capital Gain Property ) held 1 year or less.

Amount of deduction.   The amount you can deduct for a contribution of ordinary income property is its fair market value minus the amount that would be ordinary income or short-term capital gain if you sold the property for its fair market value. Generally, this rule limits the deduction to your basis in the property.

Example.

You donate stock you held for 5 months to your church. The fair market value of the stock on the day you donate it is $1,000, but you paid only $800 (your basis). Because the $200 of appreciation would be short-term capital gain if you sold the stock, your deduction is limited to $800 (fair market value minus the appreciation).

Exception.   Don’t reduce your charitable contribution if you include the ordinary or capital gain income in your gross income in the same year as the contribution. See Ordinary or capital gain income included in gross income under Capital Gain Property, later, if you need more information.

Capital Gain Property

Property is capital gain property if you would have recognized long-term capital gain had you sold it at fair market value on the date of the contribution. Capital gain property includes capital assets held more than 1 year.
Capital assets.   Capital assets include most items of property you own and use for personal purposes or investment. Examples of capital assets are stocks, bonds, jewelry, coin or stamp collections, and cars or furniture used for personal purposes.  For purposes of figuring your charitable contribution, capital assets also include certain real property and depreciable property used in your trade or business and, generally, held more than 1 year. You may, however, have to treat this property as partly ordinary income property and partly capital gain property. See Property used in a trade or business under Ordinary Income Property, earlier.
Amount of deduction—General rule.   When figuring your deduction for a contribution of capital gain property, you generally can use the fair market value of the property.

Intricacies When Donating Vanguard Mutual Funds

On the face of it, donating shares from a Vanguard account is simple: call Vanguard and they’ll send you (electronically or by mail, whichever you prefer) the form you need to fill out to donate shares. Mail it back to them and you’re good to go.

A problem (easily overcome) can arise if you invest with mutual funds as opposed to ETFs—mutual funds oftentimes have investment minimums. I wanted to donate VTSAX, which has a $10,000 investment minimum, but  I didn’t want to donate anywhere close to $10,000. But, recall that Vanguard has a patented process of converting shares of a mutual fund to its corresponding ETF, if it exists, without any tax consequences. An ETF is incredibly portable because it is traded like a stock (and hence, has no investment minimum other than you buying whole shares).

To minimize your future tax burden, pick out the shares with the lowest cost basis (I use specific ID, which allows me to pick out individual shares). I bought 10.67 shares of VTSAX on August 1st for $48.41 a share. Unfortunately you cannot convert mutual fund shares to ETFs online, so you must call them.

This process does involve a little guesswork. Vanguard can either convert a fixed dollar value or number of shares of their mutual funds to their corresponding ETFs. Converting a fixed dollar value is problematic in that ETF prices change throughout the day, so it’s hard to tell how many ETF shares you’ll end up with. However, converting say 4.5 shares of VTSAX like I did mostly avoids this issue because VTSAX and VTI, the ETF version, have well correlated closing price changes. The conversion process does take a few days, but in the end I had 2.19 shares of VTI, of which I donated 2.

The benefit of donating shares instead of cash was I paid $99.47 a share for VTI (after the ETF conversion – $48.41/share of VTSAX * 4.5 shares of VTSAX / 2.19 shares of VTI), whereas the charity sold it for somewhere between $103.55 and $104.16 (the letter they gave me didn’t tell me the actual price they sold the shares of VTI for). Hence, they got at least an extra $8.16 from the stock market. Small potatoes, but as I keep investing, I’ll have shares with much larger unrealized gains.

A couple days later, Vanguard automatically sold the 0.19 leftover shares of VTI. Vanguard does allow you to hold fractional shares of ETFs at Vanguard, so long as you have at least one share. So, if you wish to do something like this in the future without incurring capital gains for yourself, you should convert enough shares such that you’ll have at least one ETF share left over.

Leaving Appreciated Assets to Your Heirs

This works similarly to donating appreciated assets to charity. Upon your death, if you leave appreciated assets to your heirs, your heirs inherit them with a step up in basis—that is, the cost basis for the inherited assets is the fair market value on the day of your death. Hence, nobody will end up paying the taxes for the capital gain.

For example, suppose Monica and Chandler bought 1000 shares of VTSAX last Friday (1/23/2015) for $51.45 a share. They have two children, Jack and Erica, to which they leave all their assets, split evenly. Suppose they die 48 years from now. And let’s suppose that VTSAX experienced 9% gains, on average, The rule of 72 would tell us that 48 years form now, VTSAX would have doubled 6 times – that is, risen to 64 times it’s current value. It’s decently close – the true value is 62.59. So in 2063, each share is worth $3220.26, for a total value of $3,220,260 (if this sounds staggeringly large to you, recall that these are all nominal dollars – there’s going to be a significant amount of inflation over 48 years). Now, because Monica and Chandler kept contributing to their investment account, they never actually touched the shares they bought on 1/23/2015 – they used specific ID and only sold shares bought after that date to fund their retirement.

Upon their death, Jack and Erica each get 500 shares of VTSAX. But the cost basis of these shares is not $51.45, the price that Monica and Chandler paid (and consequently, Monica and Chandler’s basis). The cost basis is $3220.26, the price on the day of Monica and Chandler’s death. Had Monica and Chandler sold these shares right before they died, they would have owed taxes on a capital gain of $3,168,810. But because Jack and Erica inherited them, the tax on that large capital gain is never paid. If Jack and Erica sold all their shares on the day of their parents’ death, they would not a single cent of tax on the sale.

This is an incredibly tax efficient way to pass on wealth to your heirs – they can get stock market gains for free!

2 thoughts on “How To Avoid Capital Gains Tax”

  1. “If you have an unrealized STCG, you can only deduct your cost basis (what you paid for the shares)*

    In this situation, you would realize the STCG and donate the cash. 🙂

    The charitable deduction more than makes up for the tax on the gain.

    Of course this all assumes that you are already itemizing your taxes or close to itemizing. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *