you need the donor's tax basis, the date the donor acquired it and also the fair market value on the date of gift.
you get the donor's holding period + any period you held the stock for determining the holding period.
if the FMV when gifted is greater than the tax basis you use the tax basis to determine gain/loss.
If the FMV when gifted was less than the original basis, and you later sold the stock for:
a) More than the original basis: use the original basis
b) More than the FMV at the time of the gift but less than the original basis: your selling price becomes the cost basis. You won't report a gain or loss in this situation
c) Less than the FMV at the time of the gift: use the FMV at the time of the gift
Q. What if I don't know the giver's (donor's) cost basis?
A. You have to report the sale on your tax return. Lacking any cost basis, the IRS will consider the entire sale amount as taxable. So, you need to make your best effort to determine the original cost basis, even if (worst case) it's a guess. Historical prices of publicly traded stocks are readily available on the internet and should, at least, satisfy the IRS that your basis wasn't zero; just "google" “Historical Stock Prices". I use http://bigcharts.marketwatch.com/historical/. The stockholder relations dept. at the company may be able to help.
Unknown Basis
https://ttlc.intuit.com/community/investments/help/how-do-i-find-a-stock-s-cost-basis/00/25750