tax basis for inherited stock
I'm not sure this is the proper place for this question. In 1964, my grandfather died and left, among other things, 100 shares of Baukol-Noonan Inc. (BNI) valued at $125 ($1.25/share). The stock went into a residuary trust which remained operative until 1988 when my grandmother died. At that time, the BNI stock was valued at $19 a share and the trust had 318 shares as the result of stock dividends over the years. A few months later, BNI was acquired by Minnesota Power, and the 318 shares of BNI became 254 shares of Minnesota Power. The Minnesota Power shares were distributed to me when the trust closed. In 1995 Minnesota Power bought ADESA. In 1999, there was a 2 for 1 stock split and I got 508 shares of Minnesota Power, which was renamed Allete. In 2004, Allete spun off ADESA, with ADESA valued at 60% and Allete at 40%. I got 1 share of ADESA for each share of Allete, so I ended up with 508 shares of ADESA. In 2007, ADESA was acquired by KAR and I sold my shares.
Is my basis the 1964 value when the stock went into the trust, the 1988 value when my grandmother died, or the 1989 value when the stock was actually distributed out of the trust?