# Calculating capital gains and cost basis after acquisition

I had Aetna stock that has gone through the CVS acquisition.

87.815 shares of Aetna. Value with final stock price of \$212.70 is about \$18,678. Cost basis of \$2,160.

CVS acquisition resulted in .8378 shares of CVS for each share of Aetna, plus a cash payment of \$145 per Aetna share, plus cash in lieu of fractional shares.

I got 73 whole shares of CVS (87.815 * .8378), \$43.79 cash in lieu of about .57 of a share of CVS, and a (87.815 * \$145) \$12,733 cash payment.

With a CVS closing price of \$78.91 (on the statement) that is (73 shares * \$78.91) \$5,760 + \$43.79 + \$12,733 = right about the 18,600 or so value of the Aetna stock. So far, so good.

My problem/question is I don't know what I pay taxes on and what the basis for the new CVS stock is.

I want to say I treat the \$12,777 cash (\$12,733 + \$44) minus the \$2,160 cost basis = \$10,617 as a long term capital gain, and declare the new CVS stock to have a \$5,859 cost basis, but I'm not sure that is how it is done. It doesn't seem like it ought to be so unintuitive and difficult.

Any guidance, thoughts, or resources appreciated.

Edit: Based on Bob's comment below, it looks as if I add up the value of the new CVS shares, the cash payment, and the cash in lieu (about 18,540) and subtract my Aetna cost basis (2,160) giving me a capital gain of 16.377k. Then I treat things as if I had cashed out completely and turned around and purchased the CVS stock with cash (making my cost basis in it the \$5,760.43 figure). I had read that but wasn't really tracking. @Bob-Baerker - if you put that comment in as an answer with the relevant paragraph pasted in, I'll mark it accepted.