This page sets out the rules for UK "gift tax" (a subset of inheritance tax)
UK Gift tax is specifically designed to prevent people circumventing inheritance tax by giving gifts to their heirs just before they die. One of the conditions is that the tax rate depends on when you die:
No tax is due on any gifts you give if you live for 7 years after giving them.
Gifts given in the 3 years before your death are taxed at 40%.
Gifts given 3 to 7 years before your death are taxed on a sliding scale known as ‘taper relief’.
Given that nobody schedules their own death (or at least not many) when is this tax levied? Do you pay it when the gift is given and apply for a refund if you live longer than 7 years? Or do you pay it out of your estate if you die early?