I participate in an ESPP which purchases company stock at a 15% discount every 6 months. I have accumulated a few thousand shares of company stock this way. (It is a small percentage of my portfolio.) For the last few years, the stock has steadily declined, so I have been selling the stock as soon as it is purchased to lock in the 15% profit. This is taxed as regular income. Would it be better to sell an equal amount of previously accumulated stock to claim a long term loss on my taxes instead? If I do, have I lost the 15% profit? As a side note, I've already sold a mutual fund this year and will max out the losses I can take for this year and probably have some to carry forward.