Hillary Clinton and Bernie Sanders are trying to one-up each other over how best to tax dead millionaires and billionaires.

This is part of their competition to show who cares more about economic inequality. But neither Democratic candidate's plan to increase estate taxes would get at the root of the problem: Few people pay these taxes anymore, thanks to myriad deductions, exclusions and loopholes that tax lawyers easily exploit.

Even if the loopholes are closed, the estate tax is an ineffective way to close the economic divide created by the accumulation of wealth of those at the top of the income scale. Both Clinton and Sanders are overlooking a fairer and more productive way to tax inheritances.  

Clinton would increase the estate-tax rate to 45 percent from 40 percent and decrease the amount excluded from $5.45 million now to $3.5 million. Sanders would exclude the same amount but, not to be outdone, raise the top rate to 55 percent, with a special 65 percent rate for billionaires.

But about 99.8 percent of U.S. deaths trigger no estate tax, says a 2015 report by the Joint Committee on Taxation. When an estate does pay up, the effective rate -- after taking advantage of ways to shield assets -- is about 17 percent. In 2014, estates paid $16 billion in tax.

What about those iconic family farms and small businesses that lawmakers cite as victims of the "death tax?" They're as mythical as the unicorn: A grand total of 20 owners of small farms and businesses left taxable estates behind in 2013; their average tax rate was a mere 5 percent.

President Barack Obama's fiscal 2016 budget would increase the estate-tax yield by taxing the appreciation of stocks, bonds and other assets held by an estate. Take the example of an owner of 1,000 shares of stock bought for $25 a share in 1990. If the stock is worth $100 a share when he dies, the $75,000 gain ($100,000 minus $25,000) wouldn't be subject to tax under existing rules. His heir would pay the 20 percent capital-gains tax if and when she sold the shares, but only on the increase in value while she owned them. Obama would tax all the unrealized gains. (Congress hasn't taken up this idea.)

Even that approach wouldn’t get at the real challenge: Over the next 30 years, U.S. non-spousal heirs are expected to inherit more than $6 trillion, on which little tax will be paid, allowing estates to grow ever bigger with investment.

It makes sense to tax wealth in a way that doesn't begrudge success but aims to make sure it doesn't hamper upward mobility and opportunity for others.

A good way to do this would be to substitute inheritance taxes for estate taxes. Such an approach wouldn't tax the entirety of an estate all at once at the time of death, but instead would tax individual recipients when they receive their money. And rather than apply one national tax rate, inheritances would be taxed at each heir's ordinary income-tax rate. The gaming that now takes place would be minimized -- although not eliminated -- because there would be less to gain by preserving wealth through generations with trusts and other artifices.    

It would also be highly progressive: Those who earn more than $415,000 in regular income would pay the top income-tax rate of 39.6 percent on inheritances. Those with incomes below that would pay inheritance taxes at lower income-tax brackets. 

New York University Professor Lily Batchelder, a former staff member of the U.S. Senate Finance Committee, proposes such a system. She would tax inheritances at ordinary income-tax rates, plus a 15-percent surtax. She would exclude amounts below about $2 million and, like Obama, include unrealized capital gains, except she would tax the full gain after an heir sells the stock or bond, not at the time of the donor's death (to avoid forcing heirs to sell assets to pay inheritance taxes). To prevent manipulation, such as a beneficiary who quits a high- paying job to get into a lower tax bracket, she would average the previous five years of income to determine an individual's rate.