When you inherited the stock, you received what is commonly referred to as a stepped-up cost basis. That means your relative's low basis in the stock is forgotten, and instead, your new basis is the stock's value on the date of death.
Technically, your cost basis is the average of the stock's high and low trading prices on the date of death, not the stock's closing price. If your relative died on a weekend or holiday, then a weighted average of the two nearest open market trading days is used to determine your cost basis. For instance, if your relative died on a Saturday, the average of the high and low trading price on Friday is multiplied by two-thirds, and the Monday high and low average is multiplied by one-third. The two resulting numbers are added together to arrive at the new cost basis.