Steven R. Weisman, vice president for publications and communications at the Peterson Institute for International Economic, is the author of “The Great Tax Wars,” a history of the income tax, and “The Great Tradeoff: Confronting Moral Conflicts in the Era of Globalization.”

Hillary Clinton and Donald Trump met for the first presidential debate. (Photo by Melina Mara/The Washington Post)

Donald Trump handed Hillary Clinton a great political gift last week with his ill-advised interjection at their presidential debate. When she suggested that he didn’t pay his federal income taxes, Trump replied, “That makes me smart.” With that declaration, Trump appeared to admit that, as many suspected, he used various legal loopholes to pay no federal income tax in certain years. (Clinton paid $3,624,455, or 32.4 percent of her income, in federal taxes in 2015).

Trump seemed to assume that Americans would admire his savvy. He’s almost certainly wrong. Since the federal income tax was introduced during the Civil War, U.S. citizens have complained about their taxes. But they’ve also told pollsters that they think they pay about the right amount — the average American family contributes 20 percent of their income to federal taxes, according to the nonpartisan Tax Policy Center. More than half of Americans surveyed by the Pew Research Center last year said their rate was fair.

What they can’t stomach is the idea that the rich are taking advantage of the system. “Most Americans are OK with the amount of tax they pay,” Drew DeSilver of Pew wrote earlier this year. “It’s what other people pay, or don’t pay, that bothers them.” Six in 10 Americans said they were upset that “some wealthy people” and “some corporations” don’t pay enough.

So Trump bragging about how smart he’d be if he didn’t pay income tax may have sounded like he was getting one over on the rest of us.

[I sold Trump $100,000 worth of pianos. Then he stiffed me.]

The question of who should pay taxes, and what’s “fair,” has always been tricky in the United States. After all, the American Revolution began as a protest against unfair taxation. In our early history, leaders avoided the question of income tax altogether, choosing instead to raise federal revenue with import tariffs.

Thinking shifted during the Civil War, when leaders imposed an income tax to fund the conflict. At the time, President Abraham Lincoln’s administration emphasized that the rich should shoulder more of that burden. The New York Herald agreed, arguing that the tax was necessary so that “millionaires like W.B. Astor, Commodore Vanderbilt” — the Donald Trumps of their day — would “contribute a fair proportion of their wealth” to the fight, especially because many Union businesses profited from the war effort.

The income tax disappeared when the war ended. But it returned on the eve of World War I, enabling President Woodrow Wilson to raise the marginal income tax rate to 70 percent. Wilson called paying taxes a “glorious privilege” and a way for the businesses profiting from military buildup to give back. Sen. Hiram Johnson of California even attacked “the skin-deep dollar patriotism” of those who favored war but opposed taxes on the wealthy.

Rates stayed high through much of the Cold War. President John F. Kennedy was reportedly reluctant to cut income tax rates as urged by his Keynesian economic team — they wanted to stimulate the economy — questioning whether his Inauguration Day call for sacrifice (“Ask not what your country can do for you”) would be undercut by a gift to taxpayers. (He eventually did reduce the rate.)

[I never worry I’ll be shot in Chicago. After all, I’m white.]

Americans’ mood shifted during the double-digit inflation and high unemployment of the 1970s. Families were feeling strapped, and their anxiety ignited a popular tax revolt that began in California and consumed the Republican Party nationwide. The antipathy toward taxes on the right helped elect Ronald Reagan to the White House in 1980. As president, Reagan masterfully equated high taxes with a punishment on hard-working Americans.

When he was an actor, he wrote in his memoir, “the IRS took such a big chunk of my earnings that after a while I began asking myself whether it was worth it to keep on taking work. Something was wrong with a system like that: When you have to give up such a large percentage of your income in taxes, incentive to work goes down.” Reagan’s claim that taxes discourage job creation and slow the economy has been a rallying cry for Republicans ever since.

But today, many Americans see things differently. Sixty-three percent say income inequality is a major issue in our country. And more than half say the rich should be taxed more heavily to address this disparity. The idea that the wealthy should do more to defray a national crisis echoes throughout American history.

Mitt Romney, the 2012 Republican presidential nominee, learned this the hard way. During the campaign, he was caught complaining to donors and supporters that 47 percent of Americans pay no federal income tax. That was true, although many of them do pay federal payroll taxes for Social Security and Medicare. Romney was trying to stoke the well-known conservative resentment that lower income groups “don’t pay” taxes — and yet benefit from an array of government safety-net programs.

But in the same election cycle, it was revealed that the Romneys paid just under $2 million in income tax, an effective tax rate of 14.1 percent, lower than many Americans in the middle class. Obama’s reelection campaign exploited these facts, painting Romney as a person who attacked others for not paying taxes while exploiting the system. This image — of Romney as a selfish plutocrat — stuck, and probably contributed to his defeat.

Trump is facing the same issues. The Republican nominee is clearly hoping that Americans will understand that by amassing great wealth, he was doing more for the economy than he would by paying taxes. As he noted in the debate with Clinton, were he to pay taxes, “it would be squandered, too, believe me.”

We may never know for sure what Trump’s taxes look like — he has so far refused to release his returns, unlike every other presidential candidate in modern history. If this conversation revives a debate about tax fairness and tax loopholes, leading to reforms of both the income and corporate tax rates, Trump may end up doing the economy and the American political system some good. But for now he probably has miscalculated, ignoring a fundamental truth: Americans may not love paying taxes, but what they hate even more is rich people not paying their fair share.