One goes to a probate solicitor and a figure emerges after probate. But who calculates the tax due on probate? I'd guess HMRC but don't know.
It is up to the executor of the estate to calculate the tax due from the estate. They may appoint a probate solicitor if the estate is large or complex. The executor then fills in a tax return, and this is processed by HMRC in much the same way to any other tax.
There may be several components of the tax bill, often the largest is inheritance tax, (40% of the estate above a threshold of £325,000) However the deceased may have other outstanding taxes, or they may continue to make capital gains, or earn money through royalties post mortem.
So it is the executor who calculates the tax due, and HMRC who check and collect. If the executor appoints a probate solicitor then the solicitor calculates, and HMRC check and collect.