The U.S. income tax code is in such a shambles that both voters and congressmen are thinking seriously about throwing it out and starting over. Last week, Sen. Robert Dole (R-Kan.) held three days of hearings on ways to simplify the system and loosen the ties that bind the average taxpayer to his accountant or tax preparer.

The so-called flat tax has most caught the popular imagination. Under a flat tax, everyone would pay exactly the same percentage amount on income. Instead of taxing people at higher rates as their income rises -- as is the case today -- everyone would pay, say, a flat 20 percent. Doesn't that sound fair?

No, not to me it doesn't. The flat tax is clean, simple and monstrously unfair. It would cut taxes sharply for the rich while raising them for taxpayers in the middle and lower brackets.

Many people who like the sound of the flat tax have a wrong notion of how the present tax system really works. They think that the rich get away with murder. That they slip through loopholes and pay no taxes. A flat tax is supposed to force them to pay their fair share.

A tiny minority of the rich do indeed get away with murder. "But most of them pay an awful lot of tax," says Tom Field of Tax Analysts.

Last year, for example, President and Mrs. Reagan reported a gross income of $412,730 and paid $165,291 in taxes. The tax bite: 40 percent of their total income.

A well-to-do couple with two children and a $63,605 income paid $15,696 -- nearly 25 percent of their gross income.

By contrast, a couple with two children, earning $22,105, paid only 12 percent of their income in federal taxes. A single woman earning $11,830 paid less than 10 percent.

These figures are from a sampling of tax returns provided by H & R Block, and they all tell the same story: Under our present tax system the rich pay more -- not only in dollars but in percentage amount.

Official IRS figures also tell the story: In 1980, people making $50,000 and more accounted for only 16 percent of all taxpayers but paid 31 percent of all the personal taxes collected. It is simply not true that the rich get away scot-free.

Under a flat tax, however, the rich would make out like bandits.

Say, for example, that Congress simplified the present tax system by throwing out all the deductions and tax credits and applying a flat tax to the remainder. In that case, it would take a flat tax of 20 percent to raise the same amount of revenue that the government gets from the present tax system, according to an estimate by Joseph Pechman of the Brookings Institution.

A 20 percent flat tax would raise taxes sharply for the lower earners in the tax examples given above, according to calculations by H & R Block. The $11,830 earner would pay 97 percent more in taxes -- a devastating increase given her low income. The $22,105 family would pay 39 percent more.

Now look what happens to the two higher-earning families in our example. Under a 20 percent flat tax, the $63,605 couple get a tax reduction of 24 percent, worth $3,775 in hard cash. President and Mrs. Reagan would get a tax cut of 50 percent, for an enormous saving of $83,353.

Various levels for a flat tax have been proposed. But by any calculation, they shift a good part of the national tax burden away from the rich and onto the shoulders of the middle class. That's why supply-side economists like the flat tax so much. They believe that cutting taxes for the rich will encourage much more saving and investing, which in turn is supposed to make the country grow.

Assuming that Congress can resist the surface simplicity and hidden unfairness, of the flat tax, there are two other tax-reform ideas that do merit attention. They're often included with flat-tax schemes but would work just as well in a system where the rich are required to pay more.

One good idea is to get rid of most of the deductions and tax credits littering the tax code. Deductions and credits are what make everything so complicated. It takes four pages of fine print in the IRS tax guide, just to explain the adjustment for moving expenses.

The other good idea is to tax all sources of income alike. Money received from capital gains, veterans' benefits or Social Security should be treated exactly the same as wage income -- so that people receiving the same amount of money would pay the same amount of tax. That's fair. And because people with tax-favored income would no longer get away scot-free, tax rates could come down for everyone.