This answer is under U.S. law, with one detour to Canadian tax law. Only the more general rules are stated. Most of the rules stated in the post have exceptions, although they rarely apply.
Estate and Inheritance Tax Valuation
For federal estate tax purposes, assets are valued on date of death unless the estate elects to use the "alternative valuation date" instead which is six months after the date of death. Treasury regulations govern the valuation of marketable securities if a decedent died on a day when the securities markets weren't open for business which basically involves averaging the immediate pre-death and immediate post-death valuation, and on determining the value when the value changes during the course of the date of death.
State inheritance taxes vary on this question. Most states have neither estate taxes nor inheritance taxes. Most state level estate and inheritance taxes still on the books, are either state estate taxes of historic interest only (giving the state a share of the federal estate taxes due under a state tax credit that no longer exists), or are state inheritance taxes imposed upon what an heir or devisee receives (an heir receives an inheritance through intestate succession, a devisee is a named beneficiary of a will) rather than based upon the size of the aggregate estate. Inheritance taxes are usually based upon date of distribution values.
Federal Income Tax Valuation
For purpose of income taxation, and in particular, capital gains taxation, capital assets are assigned a deemed purchase price (called the "basis" of the asset) equal to fair market value on the date of death (subject to some minor anti-evasion rule to avoid phantom tax losses and in cases where assets are transferred to the decedent on the eve of death and then inherited by the person who gave them to the decedent). The basis adjustment is tax free and death does not generally trigger realization of accrued capital gains in capital assets in the U.S.
This rule is called the "step up in basis" at death, even though it could, in principle, lead to an increase or a reduction in the value of the asset for capital gains tax purposes. Inventory does not receive a step up in basis. Neither does intangible income that accrued before death but was paid after death, which is called "income in respect of a decedent", the most common examples of which are retirement accounts, which are valued for purposes of income taxation at the time of distribution as income to the person receiving it post-death.
Footnote On Canadian Taxation Of Unrealized Capital Gains
In Canada, the general rule is that capital assets of a decedent with unrealized gains and losses (e.g. stock or real estate that was purchased and hasn't been sold) is deemed sold at the date of death for fair market value and that the decedent's estate has liability for the income taxes that would have been due if that had actually happened. At times, historically, there has been a discount of the amount of tax due on the gains payable at death, but I do not know if that is still the state of Canadian capital gains taxation at death.
Valuation For Purposes Of Distribution
Valuation for purposes of distribution depends upon the language of the instrument making the devise of the asset. There are different formulas that treat post-death appreciation or depreciation differently that estate planners can use and they used to put a lot of thought into which formula to choose when estate taxation impacted more people. These formulas typically allocated estate assets between two trusts, one usually called a "family trust" or "credit shelter trust" and the other one usually called a "marital trust" or "QTIP trust" (for qualified terminable interest trust", even though the acronym makes the use of the word trust redundant). In the mid-1990s, amount excluded from gift and estate taxation used to be $600,000 per person per lifetime of combined gifts and bequests, and not inheritable by a spouse. It is now about $11.5 million per person per lifetime of combined gifts and bequests, with unused exclusions inheritable by a spouse. Thus, the percentage of estates impacted by the gift and estate tax in the U.S. has declined precipitously, and are used far less in estate planning than they used to be.
When the governing instruments aren't unambiguously clear, and in cases where there is no will, the valuation date is established by state statutes and case law. This is not terribly consistent from state to state, and since this issue is determined in the first instance by the personal representative (a.k.a. executors) of the estate, or by the trustee of a trust, subject to objections by interested persons, the black letter law frequently isn't applied very consistently in small estates. Often even when a fiduciary gets it wrong, the amount of the error is so small that it isn't worth litigating in an objection to the distribution amounts.
Most wills and most intestacy statutes, in most cases, mandate that the estate be divided in proportions, rather than in fixed dollar amounts. The most common practice is for the executors to liquidate all of the assets of the estate into a common fund in an estate account, and then to make cash distributions from the common fund in the designated proportions when the estate is closed, effectively valuing the assets at the time of distribution.
The same thing can be done when a will makes specific devises (e.g. "I leave my house to my aunt Eunice") and then divides the residuary estate after payment of expenses and specific devises in proportions (e.g. "I leave my residuary estate to my descendants by representation") when the residuary estate is liquidated with inheritances distributed in cash. So, in those cases, the valuation date is not material.
A governing instrument that makes a specific devise that is charged against a devisee's proportional share of inheritance, or otherwise makes the timing of the valuation material, would be unusual. In the rare cases when it comes up, the majority rule is probably that distributions in kind are valued at the time of distribution, but I haven't done a 50 state study of the issue, nor have I ever seen one.