Inflation is running rampant in the U.S. and many other countries around the world. The latest consumer price index (CPI) reading for the previous 12 months indicates that prices rose at an 8.2% annual rate in the U.S. on top of a 7% rise in 2021. This is a major change from the past decade, when inflation was relatively stable at about 2% or less each year.

Rising prices can squeeze a business's profit margin. Companies that have major labor, commodity, or transportation costs have generally seen narrowing profit margins this year, which can hurt stock prices. If you're worried about inflation wrecking your portfolio in 2022 and beyond, it might be time to consider buying shares of Visa (V -0.23%) because it actually benefits from inflationary pressures. Here's why. 

Q4 earnings: The return of cross-border payments

Visa is the largest digital payments network in the world, processing more than $14 trillion across its various services each year. The company provides a network for almost anything that isn't physical cash payments (including cryptocurrency) and has ridden the transition from physical to digital payments over the past few decades.

In its latest quarter -- Q4 2022 of the fiscal year ended Sept. 30 -- Visa's revenue increased 22% year over year (or 24% when taking into account foreign exchange movements). Payments volume was up 10% year over year, which is a slowdown from 17% growth in 2021. At first glance this may seem like a cause for concern, but investors should remember that in 2021 the economy was digesting huge stimulus checks getting sent out directly to citizens. This was a one-time boost to payment volume for card networks that was not repeated in 2022. Looking at Visa's results in this light, 10% year-over-year growth is very respectable and highlights the long-term tailwind that is digital payments.

Revenue is outpacing volume growth at the moment because of the return of cross-border transactions, which are more profitable for Visa than domestic purchases. Cross-border payments outside of European-to-European transactions were up 49% year over year as people returned to traveling with the COVID-19 pandemic slowly fading into the background. If this trend continues, Visa's revenue should increase 15% to 20% or higher each year even if transaction volume is only growing 10%.

Why Visa benefits from inflation

Visa makes money by taking a cut of every transaction processed through its networks. This cut is typically about 2.5% of every transaction, with Visa only keeping 0.14% and the rest getting paid out to the card issuers (i.e., banks) and checkout processors like Shopify or Block's Square. This percentage may change for different purchases like cross-border transactions.

Since Visa's revenue is based on a percentage of the payment volume it processes each year, rising consumer prices are good for its business. If that sandwich you buy for lunch now costs $10 instead of $8, Visa will earn more on that transaction. This gets repeated in the billions and billions of transactions that go through its network every year.

Visa doesn't care whether people are spending money on extravagant vacations in a booming economy or hunkering down and putting more toward increasing gasoline and food prices. As long as transaction volumes rise, Visa's revenue will rise along with it.

Incremental margins and returning cash to shareholders

Inflation will have a positive impact on Visa's revenue but could have an even bigger effect on its bottom line. Why? Because of the business's extremely high incremental margins. Running the Visa network has minimal variable costs, with processing and professional fees coming in at less than 5% of revenue. This means that for every extra dollar in revenue Visa earns, its operating profit grows even faster. Right now, Visa's operating margin sits at about 67%. Other than during the height of the COVID-19 pandemic, this number has risen during the past 10 years. If inflation stays high for the foreseeable future, Visa's operating margin should continue widening in future years.

V Operating Margin (TTM) Chart

V Operating Margin (TTM) data by YCharts

Visa generated $3.9 billion in net income in the latest quarter and $15 billion for its full fiscal year. With all these profits, management is consistently returning cash to shareholders through dividends and repurchases. In fiscal 2022, Visa repurchased $11.5 billion worth of stock and paid out $3.2 billion in dividends. It also just announced a new $12 billion share repurchase program. These capital returns can help boost shareholder returns for long-term owners of Visa stock. 

If you want a company in your portfolio that will do well despite high inflation, look no further than Visa.