A company I held shares in forced a buyback of a portion of my shares in them. Within 30 days, I then bought back that same number of shares to maintain my holding and basis. However, taking the two transactions together (the forced repurchase plus my subsequent buy back) I now have a net profit. Do I now decrease my basis in this stock, or do I treat the net profit as a capital gain in the current tax year? And what if I had made a net loss?
The reason for the sale doesn't matter. You sold shares. If those shares were sold for a profit, you have a capital gain, and tax due. If the shares were sold at a loss, your repurchase inside of 30 days was a wash sale, and the basis is adjusted. The loss is delayed until the next sale.