A technical change in the Republican tax bills adds up to a significant tax increase over time. The legislation would change the way tax brackets are adjusted for inflation each year. The new measure of inflation, called the chained CPI, would be less generous than the old one. As a result, each year slightly more people would move into higher tax brackets than under the current measure.

The Tax Policy Center estimates this shift would bring in $125 billion in extra revenue over the next decade — which helps Republicans reach their goal of cutting taxes by no more than $1.5 trillion. President Obama suggested he might be willing to use the chained CPI to calculate the annual cost-of-living adjustments for Social Security, too. Over time that would lead to lower spending on the program.

Many economists believe that the current Consumer Price Index overstates inflation and that the chained CPI is a more accurate measure. However, opponents of moving to the chained CPI for Social Security say that it understates inflation among the elderly, but it’s not clear they’re right — and even less clear that a better measure exists.

If Social Security checks and tax brackets should be adjusted each year for inflation, they ought to be adjusted by the best measure we have. That’s the best argument for what Republicans are doing on taxes and what Obama suggested doing on Social Security. But maybe inflation is not a sufficiently generous index in either case. It might be better to let tax brackets and Social Security payments rise with wages instead.

When tax brackets are indexed only to inflation, it leads to “real income bracket creep.” Because wage gains move people into higher brackets, average tax rates increase and the federal government gets a disproportionate share of any economic growth — and both effects occur without a deliberate vote for them.

If brackets rose at the same rate as average wages, on the other hand, neither effect would occur. People who made higher-than-average wage gains would move closer to the next-higher tax bracket, and people who made lower-than-average gains would move further away from it.

Letting cost-of-living adjustments for Social Security rise faster than inflation each year, meanwhile, would have the beneficial effect of causing people to get benefits with a higher real value as they age. When they are 85, they will have more financial support than when they are 70.

More generous indexing for taxes and Social Security would, of course, make future deficits worse. Ideally, we should implement these changes anyway and make up for them in other ways. Rather than having stealthy tax increases on auto-pilot, we should legislate tax increases, spending cuts or some combination of the two.

And while we should let retirees’ Social Security checks rise in real value each year they get them, we should also freeze the real value of initial benefit levels. The way Social Security now works, tomorrow’s retirees will get bigger checks, even accounting for inflation, than today’s retirees, and they in turn get higher benefits than yesterday’s.

What I’m advocating here, for both Social Security and taxes, amounts to short-term pain for long-term gain. Taxes might have to be set a little higher up front, but then they would grow at a slower rate. Initial Social Security benefit levels for the person who retires in 2030 would be lower than they are scheduled to be, but over time the checks would grow.

Ramesh Ponnuru is a Bloomberg View columnist. He is a senior editor at National Review, visiting fellow at the American Enterprise Institute and contributor to CBS News.