As Americans grapple with the highest consumer prices in 40 years, not to mention wages that aren’t keeping up with inflation, we can take solace that the country’s chief executives are making fat stacks.

The typical compensation package for CEOs running S&P 500 companies jumped by 17.1% last year to a median $14.5 million, according to data compiled for the Associated Press.

This compares with a 4.4% increase in wages and benefits for private-sector workers through 2021, which was the most since 2001.

Inflation was running at 7% as of the end of last year. It’s now 8.3%.

Sky-high CEO pay isn’t new. Compensation for most chief execs is tied to stocks, and stocks, until recently, have been on a tear.

Even so, it’s a kick in the teeth for many working families that bosses are raking in piles of cash as many if not most people are living paycheck to paycheck.

At many of the companies surveyed for the study, it would take the average worker at least 186 years to make what the CEO did over a span of 12 months.

Take, for example, Mary Barra, CEO of General Motors. Her company, like nearly all carmakers, has seen sales plummet amid a global shortage of computer chips.

Yet her compensation last year climbed by more than 25% last year to $29.1 million.

Then there’s Jamie Dimon, CEO of JPMorganChase. He received compensation last year of — wait for it — $84.4 million.

That’s up 167% from a year before.

Worth every penny, Chase’s board decided.