Per IRS Publication 551 Basis of Assets, page 9:
To figure the basis of property you receive as a gift, you must know its adjusted basis (defined earlier) to the donor just before it was given to you, its FMV at the time it was given to you, and any gift tax paid on it.
If the FMV of the property at the time of the gift is less than the donor's adjusted basis, your basis depends on whether you have a gain or a loss when you dispose of the property. Your basis for figuring gain is the same as the donor's adjusted basis plus or minus any required adjustment to basis while you held the property. Your basis for figuring loss is its FMV when you received the gift plus or minus any required adjustment to basis while you held the property (see Adjusted Basis, earlier).
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.