Tax insanity... 4/2/2010 12:20:00 PM
Doing your own taxes isn't that hard if you have all of the paperwork. However, I've recently discovered that it's easy to do your taxes incorrectly if you're not aware of how screwy the rules are for Employee Stock purchase programs.

First, a bit of contrast.  Your Stock Awards (part of your annual review) are pretty easy to deal with tax-wise. The vested award's value appears on your W2 in Box 1, and shows on your paystub as "Stock Award Spread". Taxes on the award are automatically withheld, and those also appear on your W2 in the appropriate Federal, Social Security, and Medicare tax boxes. They're listed on your paystub as "Stock Award taxes."  Easy enough.

Of course, you still have to figure your Capital Gains (or losses) when you sell the awarded stock. We'll get to that in a minute.


Compared to Stock Awards, the tax rules for ESPP are quite complicated. They're also hard to follow because of how Fidelity and your W2 do recordkeeping.

When you actually "buy" ESPP at the end of the offering period, there are no taxes to pay. Great!

Unfortunately, when you sell, the world gets very complicated. The first thing to understand is that, depending on when you sell, you either have made a "Qualifying" or "Disqualifying" Disposition. For Microsoft ESPP, if you sell the ESPP shares within 21 months of buying them, it's a "Disqualifying" Disposition.

Now, "Disqualifying" sounds bad, but it isn't necessarily a problem and actually makes your taxes a fair bit simpler.

When you make a DQDSP sale, you have to account for the "Compensation value" of your ESPP DISCOUNT as "ORDINARY INCOME". For Microsoft, that discount is 10% of the purchase price of the shares. Microsoft keeps track of the DQDSP "Compensation value" on your W2; it appears alone in Box #14, and the value is also added to Box #1.

Being in Box #1 means that DQDSP's "Compensation Value" is counted as a part of your taxable income automatically, which is good. The bad part is that Microsoft doesn't withhold taxes on that taxable income, however, which can lead to unpleasant surprises come tax season.

In contrast, when you make a Qualifying sale (QDSP), your "Compensation value" / ORDINARY INCOME is the lower of:

 1> The Discount you *would have gotten* on the stock, AS IF it would have bought at the *start* of the offering period (aka 3 months before it actually DID buy)
 2> The gain you made when you sold the stock (e.g. Proceeds minus what you paid.)

Depending on how the stock price has moved between the start of the offering period and when you sell it, a QDSP could provide tax advantages OR disadvantages over a DQDSP.

Surprising, eh? It gets worse...

 ** WARNING **
The BIG problem is that Microsoft doesn't keep track of a QDSP's "Compensation value" / "ORDINARY INCOME" for you, and it's not super-easy to go back and calculate it. Once you do calculate it, you have to add it to your W2 Box #1 yourself.


The "Qualifying" or "Disqualifying" nature of the Disposition controls how much "ordinary" income you have received from the ESPP discount. But when you buy or sell stock, you also have to report the Capital Gain or Loss. To do that, you calculate the proceeds of the sale minus your BASIS cost. Critically for ESPP sales, your BASIS cost IS NOT what you *actually* paid for the stock-- it's what you paid for the stock PLUS the "ordinary" income you reported for the discount. This means your Capital Gain on ESPP shares is smaller (or your Capital Loss larger) than what Fidelity reports on your year-end statement.

 ** WARNING **
Fidelity *does not* add this "ordinary income" to the basis cost, meaning that if you just blindly accept Fidelity's numbers for the Gain/Loss on the sale, you're getting double-taxed on the Compensation value: once as ORDINARY INCOME, and once as CAPITAL GAIN/LOSS.

To calculate the CAPITAL GAIN OR LOSS for DQDSP:

 1> Use the FAIR MARKET VALUE of the shares purchased (e.g. what you paid PLUS the $ discount) as your BASIS COST
 2> Calculate your GAIN or LOSS (PROCEEDS less BASIS)

To calculate the CAPITAL GAIN or LOSS for a QDSP:

 1> Determine how much ORDINARY INCOME you paid on the QDSP sale
 2> Add that value to your BASIS COST
 3> Calculate your GAIN or LOSS (PROCEEDS less BASIS)

At this point the record keeping is getting pretty hard, huh? Because you cannot trust the BASIS information reported to you (because it doesn't account for the "Compensation Value" treated as ORDINARY INCOME) you must understand which specific shares were sold as a part of each sale, so that you can properly compute the BASIS.

It gets worse.

When you go to sell stock, Fidelity shows a checkbox that allows you to choose "specific lots". This checkbox is unticked by default-- unless you tick it, Fidelity chooses which shares to sell (I'm pretty sure it sells FIFO by default). The problem is that your future reporting statements will not necessarily tell you WHICH tax lots were sold, and if you hold any shares throughout the year, the accounting gets quite hard.

For instance, say you buy 212 shares on March 31st, and sell 212 shares on April 5th. You might logically think that your April 5th sale represents the shares that you bought on March 31st. But if you didn't pick specific shares to sell, and already held any shares before March 31st, it's likely that some or all of those other, earlier shares are what actually sold. So, your order to sell 212 shares might actually be selling shares you bought last year, or whatever.

If you sold shares at a loss, it gets worse.

Normally, if you sell shares at a loss, you get to claim a CAPITAL LOSS on your taxes (or shrink your CAPITAL GAINS). But there's a rule called the "Wash Sale Rule" which says that if you buy "substantially identical" stock within 30 days (before/after) of a losing sale, you don't get to directly claim the loss.

In the example above, you failed to specify the exact shares to sell in your April 5th sale. You're not selling the March 31st shares, and hence your March 31st ESPP purchase means that you've acquired "substantially identical" stock ( So if your sale of those older shares results in a loss, you don't get to claim that loss directly due to the Wash Sale rule.

Now, it's not the end of the world because the Wash Sale rule says that you get to use your loss to adjust the BASIS (price and date) of the new stock that you've acquired. But this means yet more accounting on your part.

But it gets worse.

Fidelity will try to keep track of your wash sales and adjust the basis of your future sales accordingly. Unfortunately, that makes the record-keeping almost impossible. Firstly, adjusting the BASIS doesn't just change the basis price, it also changes the "effective" DATE of the purchase. So when you go to sell that March 31st stock, may get statements from Fidelity showing that you sold stock bought on "12/31/2009w" -- it's really your 3/31 stock but the basis has been adjusted due to your wash sale on April 5th. This can get extraordinarily confusing, because it means that neither the BASIS price nor purchase DATE for this set of shares corresponds to what was actually sold.

And that's a freakin' disaster, because as mentioned 3 sections ago, Fidelity fails to properly adjust the BASIS price of shares ESPP sales, meaning that you have to do it yourself. But since Fidelity has already "helpfully" changed the BASIS price and DATE to account for the WASH SALE, it can be virtually impossible to figure out WHICH shares were actually sold, meaning it's virtually impossible for you to properly adjust the BASIS to take into account the ORDINARY INCOME you recognized.

Oh, and keep in mind that the change of the BASIS DATE means that your later sale may be changed from a SHORT-TERM transaction to a LONG-TERM transaction. Confusing.
Oh, and keep in mind that because you often will be buying and selling different-sized blocks of shares, a given sale will likely be split up into multiple transactions, each tracking a different wash sale.


Now, the easy answer for all of this is to just give an accountant $300 bucks and a binder full of your documents and submit whatever tax return they prepare for you. But given the utter insanity of the math and the "lossy" record-keeping on Fidelity's statements and the W2, it's hard to imagine that a professional accountant would get this all done correctly either.

It's enough to make me wish for a flat tax even if I were to end up paying a lot more.

Thoughts for the future:

1> Always specify which tax lots to sell.
2> Always record myself what shares specifically were sold.

Even if I choose "wrong" and don't have the best tax outcome, at least I won't spend 9 hours trying to figure out which shares correspond to which transactions.

+ Comment
D I thought I was crazy when I figured out that the tax basis on the Fidelity statements was wrong a few days ago. Surprisingly there isnt a lot of hits when you search for this topic specifically for MSFT employees. Thanks for your post, kind of helped me confirm that I am not crazy. I am a CPA and I have to now go back and sort through 5 years of transactions to get the returns corrected. Way to go, Fidelity!
Sharon so is there anyway to know from your fidelity statements which lots you sold or you just have to guess/work it out based on the cost basis that fidelity is reporting?
Eric Sharon: The Fidelity statements will typically break your transaction down into the lots you sold with a "Acquired" date on them. The problem is that if you have any WASH sales, they will auto-adjust the Acquired date for you, which makes it hard to tell which shares exactly they were. Hence my advice to keep track of which lots you're selling manually.
Tom Nice to know I'm not the only one who feels like an idiot trying to figure this out Don't forget another problem; sometimes the 1099-B just says "various" for the acquired date on some sales :) Selecting "view lots" from the MSFT dropdown when on the "cost basis" positions tab gives a better breakdown.
DK What happens if Fidelity sold the shares FIFO? Is there a way the sale with specific lots come tax time?
TS If you choose an "accountant", double check the work. A couple years ago, when I sold a bunch of ESPP stock all at once, I went to H&R Block to avoid this mess. The result is that they said I owed IncomeTaxRate * NetProceeds, completely forgetting both (a) short-term vs. long-term, and, more importantly, (b) COST BASIS.
W Shouldn't there be an app for that?
Dheeraj Yup, I had to deal with all of this this year also - many ESPP lots that were also wash sales. And lucky me - I happened to sell all those fractions of shares dating back all the way to 2003. So I had to put in many, many entries (and do many calculations), for .32 shares, .68 shares, etc. What makes me feel better is that I independently came to the same conclusions as you did in your post :)
Brad Further, Fidelity does not let you specify specific lots when you are selling your stock via a covered call option. Those are always FIFO and there is no way to specify a particular lot. You can find the record of which shares you specified (if you entered it on the sell transaction) on the individual trade confirmation slip (available as a PDF on Fidelity's site.)
Eric is helpful.
S Thanks for your very helpful post. This year, I have all of the above including the covered call assignment. When I called Fidelity to inquire, the rep told me the "12/31/2009w" would imply the stocks in the ESPP period ending 12/31/2009. This didn't seem right as my calculations for DSQDSP didn't match what is reported on the W2. Only after reading this post, I realize fidelity "helpfully" tries to adjust the Date acquired too and the rep gave me incorrect information!
SS @ Eric, I was wondering what would fidelity do to "Date Option Granted" in case of Wash sale adjustment. Does that get adjusted too like Date Option exercised? If only the date exercised is moved back as basis adjustment but date Option granted is not, there could be cases where the sale may remain DQDSP. Example: you sold ~ 3years old stock for a loss, then got another lot within 30 days which you sold in next month or so. So if Exercise date moves back 3 years but date granted does not, this is still DQDSP though per general wash sale rule, this should have become long term loss. What do you think?
mw Awesome! Thanks
Brandon Zahl Eric, thanks so much for this advice! I'll be passing it along to people at work. I suspect nearly all of us are "blindly accepting" fidelity's numbers.
Brad @ Eric - thanks for this super helpful info! Just wanted to add that Fidelity now adds an extremely helpful "Supplemental Stock Plan Lot Detail" to your 1099 Tax Form (which I can get to from the website). As far as I can tell, this has done the calculation perfectly for my Qualifying dispositions - it has the ordinary income computed with the share price at the beginning of the offering period and the cost basis calculated with that value plus the purchase price.
Eric Indeed, the Fidelity Supplemental Stock Plan Lot Detail info they added is useful. Another great resource is

< Eric's Blog Home

©1998-2024 Eric Lawrence