Asset Cost Basis
Cost basis represents, in essence, how much an asset cost the owner to acquire. Typically, when an asset is sold, taxes are due on the difference between the sale proceeds and the cost basis. See Manage Asset Cost Basis for information about automatically tracking cost basis with EstateExec.
Step-Up in Basis
The good news is that most assets enjoy a "step-up" in cost basis upon the owner's death, meaning that whatever the decedent paid for something, an heir will be able to report a cost basis equal to its value on the date of death (see Determining Asset Value). For example, if John inherited stock worth $500 on the day of the previous owner's death, when John eventually sells stock he will only owe taxes on any gains above $500 ... even if the previous owner originally paid only $100 for it. This works in the other direction, too: John will be able to take credit for losses if he later sells it for less than $500.
A tax-deferred account (typically a retirement account such as a standard IRA or 401K) enabled the original owner to contribute pre-tax money during his or her lifetime, which then grew tax-deferred. When this money is withdrawn, it is taxed as income (see IRS inherited IRA guidelines).
So for these types of assets, the cost basis is usually irrelevant and can essentially be treated as $0. In some cases, however, the original owner contributed post tax-money to a standard IRA, and if so, that part of the funding can be treated as the cost basis (which is beneficial when considering taxes).
Note that a Roth IRA is not considered a tax-deferred account for these purposes (because these IRAs are funded with post-tax money), so no taxes are due upon withdrawal, as long as the heir follows all the rules, and the decedent owned the Roth IRA for at least 5 years. Under these circumstances, the heir would not be asked for the cost basis of withdrawals, so in essence the cost basis would treated as equal to whatever amount was withdrawn. However, if you do not follow all the rules, then you may need to pay taxes on withdrawals, in which case it can be beneficial to know the amount of post-tax money that was used to fund the Roth IRA, and that amount can be used as the cost basis.
An annuity is an investment that pays a fixed amount every year. Unfortunately, annuities do not get the "step-up" in cost basis enjoyed by most other assets. A "Qualified Annuity" is funded with pre-tax dollars, so everything it pays out is considered income; therefore its cost basis is considered to be $0. A "Non-Qualified Annuity" is funded with post-tax dollars; its cost basis is the amount of post-tax dollars used to fund the annuity.
Note that while overall annuity cost basis is therefore straightforward, the timing of tax obligations can be a bit more complex if the payout from a "Non-Qualified Annuity" is not taken in a lump sum, and is instead taken in multiple payouts over time. If the estate or the heir receives periodic (e.g., monthly) payouts, only the percentage of each payment that comes from earnings is usually taxable. If the payouts are non-periodic, the IRS typically treats each payout as taxable earnings, until all earning have been distributed, after which further payouts are treated as return of the purchase amount, and therefore not taxable.
A trust is a fiduciary arrangement that allows a third party, a trustee, to hold assets on behalf of beneficiaries. The cost basis of a trust depends on the cost basis of the assets contributed to the trust, and subsequent trust activity. A revocable trust benefits from a step-up in cost basis upon the creator's death, while an irrevocable trust that has its own tax identification number does not.
The cost basis of cash is the cash itself. By definition, you can't have a gain or loss on cash.
"Cash" held in a deposit account is treated similarly to most assets: the cost basis is the value at the time of death, and any subsequent interest earned is subject to potential taxation.
Note that foreign currency should not be considered "cash", and any realized gains or losses due to exchange rate fluctuations must generally be reported as income (see Federal Statute 26 USCS § 998). If your estate includes sizable amounts of foreign currency you may want to seek the advice of a tax professional.
Assets Purchased by Estate
If an estate purchases an asset during the settlement process (perhaps as part of an interim investment strategy), the cost basis of the purchased asset is simply the purchase price (in general). See also IRS: Cost Basis of Assets.
If you sell an asset for the estate, you will want to report any gains or losses (compared to the cost basis) on the estate's income tax returns. If you distribute an asset to an heir, it's nice to give the heir whatever information you have on the asset's cost basis, but it is ultimately the heir's responsibility to handle this whenever he or she eventually sells it.
If you are dealing with a sizable estate, worth millions of dollars and which will owe federal estate tax, you have an option to establish an Alternate Valuation Date for the assets (see Big Estate Tax).
Finally, note that all the information on this page is aimed at the general case. If you have special circumstances, that may impact the cost basis of a given asset.
See also IRS Publication 551 for a discussion of cost basis in general.