Your “basis” for calculating capital gains taxes is what you paid for the stock or the real estate. For real estate, the basis gets raised by the amount of any capital improvements you make to the property. When you sell your primary residence you may exclude the first $500,000 of gain if you’re a couple or $250,000 if you’re single. The $500,000 exclusion for a couple get extended for a sale occurring up to two years after a spouse dies.
For gifts you receive of appreciated stock or real estate during the donor’s lifetime, no capital gains tax is payable, however the donee receives the donor’s basis. It is generally considered better to wait, if possible, and pass the gift to the donee at death, due to the “stepped-up basis”. The basis of any inherited property is “stepped-up” to date of death value. If the property is sold within six months of the date of death, then the sale price is deemed to be the date of death value.
If the property is going to be held for some time it is helpful to get date of death values to establish the new basis. For real estate, this means getting an appraisal from a licensed real estate appraiser (not a real estate broker!). For stocks, you simply ask the company holding the stocks to provide this information.