Companies are paying higher wages, spending more for materials and absorbing record freight costs, pushing up economic inflation gauges. They are also reporting some of their best profitability in years.

Executives are seizing a once in a generation opportunity to raise prices to match and in some cases outpace their own higher expenses, after decades of grinding down costs and prices.

Industries...

Companies are paying higher wages, spending more for materials and absorbing record freight costs, pushing up economic inflation gauges. They are also reporting some of their best profitability in years.

Executives are seizing a once in a generation opportunity to raise prices to match and in some cases outpace their own higher expenses, after decades of grinding down costs and prices.

Industries from retail and manufacturing to biotech have seen their profits rise. Other industries, largely those still climbing out of pandemic lockdowns, such as travel, or those too weighted with inflationary costs, have raised prices but not experienced a profit boost.

Mattress maker Sleep Number Corp. has pushed through three major price increases this year. So has Carrier Global Corp. , a manufacturer of heating and cooling equipment, which typically changes its prices once a year.

Nearly two out of three of the biggest U.S. publicly traded companies have reported fatter profit margins so far this year than they did over the same stretch of 2019, before the Covid-19 outbreak, data from FactSet show. Nearly 100 of these giants have booked 2021 profit margins—the share of each dollar of sales a company can pocket—that are at least 50% above 2019 levels.

A Carrier natural gas furnace in Utah. The company has raised prices three times.

Photo: George Frey/Bloomberg News

“Honestly, this is a very unprecedented environment. We haven’t seen this in probably 30 years,” said Glenn Richter, the chief financial officer of International Flavors & Fragrances, a supplier to big food companies.

Widespread inflation makes it easier to broach the topic of raising prices with customers, Mr. Richter said. IFF’s profits increased during the most recent quarter compared with the same quarter two years ago, in part because of its acquisition of DuPont de Nemours Inc.’s nutrition business; its net margin dipped over the same period. The company expects to boost its profit margins next year.

Profit margins often rise with inflation. The risk to companies is that they overreach, raising prices faster than their competitors, or farther than customers will tolerate, losing sales and market share that may take years to recover.

The risk to the economy is that price hikes not only stick, but convince customers more increases are inevitable, spurring inflationary demand and sparking a vicious cycle. How long inflation is likely to last is a central concern for economists and politicians.

Inflation hit a 31-year-high last month. Americans are paying more for an array of products and services, including necessities: food, gas, rent and furniture. The consumer-price index, a key economic indicator, increased in October by 6.2% from a year ago. That was the fastest 12-month pace since 1990 and the fifth straight month of inflation above 5%.

President Biden’s administration has maintained that inflation is temporary, and tied the rising costs to the effects of the pandemic on supply chain holdups and labor shortages.

Asked if prices would be down by next fall, Treasury Secretary Janet Yellen said Sunday on CBS’s “Face the Nation” that “it really depends on the pandemic. The pandemic has been calling the shots for the economy and for inflation.” She said if issues around labor supply and demand normalize, prices could “go back to normal” sometime next year.

However, some economists have said some degree of higher inflation could stick around for the next few years. Entrenched inflation could mean Federal Reserve officials might have to raise rates sooner or more than they expected to, potentially dampening growth. It’s also a sign of American spending power from large savings amassed during lockdowns and from federal payouts.

“Whenever you have a strong economy, companies will try to capture a greater share of the pie,” said

Gregory Daco, chief U.S. economist for consulting firm Oxford Economics. “If they have a strong market position and strong demand, then they have the leeway or capacity to increase prices.”

His data show that a measure of profits for all U.S. corporations, as a share of gross domestic product, in the second quarter of this year was the second highest recorded since 1960. One quarter in 2012 came in slightly higher than this year.

Higher prices aren’t the only factor pushing up profitability, economists and executives say. Intense demand for many kinds of goods—including computers, automobiles and luxury goods—has been a major driver of both economic growth and corporate profitability. As volume rises and fixed costs like rent and equipment are spread out more, most businesses make a bigger profit on each sale.

“The starting point is the strong demand,” said Parag Thatte, a strategist at Deutsche Bank. While some parts of the economy still lag—including recreation, transportation and restaurants and hotels—three-quarters of the S&P 500 companies, as measured by market value, are in industries where output is significantly above where it would have been absent the pandemic, thanks to intense demand, he said. “That has enabled companies to raise prices.”

The maker of Coach handbags and Kate Spade dresses has been spending more money on airfreight to ensure it has enough goods in stock for the crucial holiday season. Despite those added costs, Tapestry Inc. has increased its year-to-date profit margin to 14.5% from 10.7% in 2019, FactSet data show.

“For Coach, the rise in [prices] isn’t really about inflation,” said Todd Kahn, Coach’s CEO. “It’s about reducing discounting,” as well as emphasizing the brand’s value to customers, he said.

A Tapestry spokeswoman said the company’s own adjusted measure for operating margin was 19.9% in the quarter ended Sept. 21, compared with 12.3% in the same quarter of 2019.

Ametek Inc., a manufacturer of industrial instruments for aerospace, medical and other companies, says its price increases have been able to more than offset the expenses from supply chain snags and worker shortages this year.

“In the third quarter, our pricing continued to more than offset inflation,” CEO David Zapico said earlier this month on an earnings conference call. “We’re going to stay up ahead of inflation, and I expect that to be true next year.”

Ametek’s operating-profit margin—which generally compares income before interest and taxes to overall sales—rose to 23.4% so far this year, from about 22.8% in the first nine months of 2019, according to the company. The margin growth would have been even higher if not for recent acquisitions, the company said.

Sleep Number’s price increases are expected to offset $140 million in elevated labor, shipping and commodities costs this fiscal year, but will also result in profit margins 3 percentage points above 2019 levels, finance chief David Callen said. Stronger demand and improved efficiency are also contributing to the margin expansion, the company said.

“Each time we’ve seen this build, we’ve taken additional pricing,” he said. The company expects prices to increase by around 6% for the year, compared with estimates earlier in the year of somewhere in the low-single digits. So far the price increases haven’t affected consumer demand, Mr. Callen said.

Corteva Inc., a maker of agricultural chemicals and seeds, said price hikes in its seed business will more than make up for higher materials costs. In a statement, a Corteva spokeswoman said the price increases reflect the value the company is delivering to customers, and have helped increase profit margins together with supply-chain and productivity initiatives.

Not every business has been able to push up prices fast enough to keep pace with inflationary pressures. Profit margins at Carrier have declined to 8.7% this year from 11.9% in 2019 despite its three price hikes. Carrier said its profit margins declined because of its separation last year from United Technologies Corp. The company expects to push through additional price increases before the year is out.

“I have certainly not gotten the impression that the additional price increases have been more difficult,” Carrier finance chief Patrick Goris said in an interview. “Everyone, including customers, recognizes that in the current environment, there is little choice to get those increases and to pass them on.”

There are some signs that demand is cooling, and with it, consumers’ and businesses’ willingness to absorb price hikes, said Mr. Daco of Oxford Economics. Once supply bottlenecks ease and consumer spending shifts, he said, it could dampen companies’ ability to raise prices further.

“You may be left with cooling demand and hotter supply,” Mr. Daco said. “We should not necessarily be falling into the trap of projecting what we’re living through today and assuming it’s the new normal.”

—Suzanne Kapner and Nina Trentmann contributed to this article.