President Trump's trade war is making life uncomfortable for some large American corporations, but they have found a way to reduce the pain: Pass it on to customers.

The Trump administration's tariffs have pushed up the prices of steel and aluminum and have raised costs for companies that make everything from cars and tractors to dishwashers. These companies face a choice. They can bear the higher costs themselves and report weaker profits, which might crater their stocks. Or they can charge more for their products, in effect making their customers bear much of the financial burden of the tariffs, at least for a while.

Many companies are opting for the latter.

More from The New York Times:

How to fix social media's big problems? Lawmakers have ideas

The Moonves #MeToo merger catalyst

With clock ticking faster on its cases, the SEC faces a quandary

As they report second-quarter earnings, they are going out of their way to let their shareholders know that it is customers who are paying.

Caterpillar, while reporting record profits on Monday, predicted that tariffs would add as much $200 million to its costs in the second half of this year. The company added, however, that it would try to partly offset the hit by increasing the prices of its products. Whirlpool, which uses steel and aluminum in its dishwashers and washing machines, said it had hoisted its prices this year. Coca-Cola said last week that it had increased prices in the United States in part because of tariff-related cost increases.

"It's been very hard for companies to pass costs through to prices for many years," said Ed Yardeni, chief investment strategist at Yardeni Research. "The thing about tariffs is that they make a very good excuse: Blame it on Trump."

The impact of the tariffs, and who bears their brunt, could have big implications for the wider economy. The tariffs are raising expenses at a time when companies are paying more for other materials and labor. If most of these costs are passed on to consumers, inflation, already rising after being dormant for years, could accelerate. What is more, since the metals tariffs have been in effect only since the start of June, their full impact has not been felt.

Some companies can't foist higher prices on their customers because of the risk to their sales. General Motors, for instance, slashed its profit forecast last week in part because of higher steel prices.

And telling investors that customers will pay up does not mean they will believe you.

Still, some economists say companies may be able to get away with charging more for a while longer. With the economy buoyant, there may be enough customers who can afford the increases. David Rosenberg, chief economist at Gluskin Sheff, noted that a deeper dig into wage data showed strong rates of growth, and, he added, a recent survey showed that consumers appeared to be stepping up purchases of big-ticket items in anticipation of price increases.

The Federal Reserve is raising interest rates to prevent the economy from overheating. But the tariffs, along with other pressures, could prompt the Fed to tap the brakes more firmly, which could spook the stock market.

"We are seeing tariffs adding to classic late-cycle inflation pressures," Mr. Rosenberg said. "This may force the Fed to do more than the market has priced in."

Much depends on whether President Trump follows through on his proposed trade policies. To some extent, the strength of corporate earnings has bolstered America's position in its trade fights. Profit margins for companies in the Standard & Poor's 500-stock index are at their highest in many years, in part because of Mr. Trump's tax cuts, Mr. Yardeni noted. But the longer the trade war drags on, the harder it will be for corporate America's bottom line to hold up.

"Trump gave companies a record profit margin, and now he might take some of that away," Mr. Yardeni said.