One thing you should always consider when choosing a stock is how profitable the underlying business is. If its profit margins are low, then it could easily swing to a loss if it faces headwinds or the economy as a whole struggles. A higher profit margin can also create an important buffer for the business, allowing it to reduce prices if it needs to be more competitive or to better handle inflationary pressures.

Three businesses that are performing exceptionally well with profit margins of 20% and higher include AbbVie (ABBV 1.06%)Nvidia (NVDA -10.01%), and Visa (V -0.59%). These are stocks that should do well this year regardless of inflation and could make for excellent long-term investments.

1. AbbVie

Drugmaker AbbVie has reported $13.3 billion in earnings over the trailing 12 months, which is nearly one-quarter (23%) of its top line of $57.8 billion during that time. The business has been expanding over the years, helped by its $63 billion purchase of Botox-maker Allergan in 2019, which diversifies its operations and gives it a new growth opportunity.

Between immunology, oncology, aesthetics, neuroscience, eye care, and other products, AbbVie's business looks solid and poised for more growth in the years ahead.

While investors are concerned with the looming patent cliff for Humira, its top-selling rheumatoid arthritis medication, management is confident that immunology drugs Skyrizi and Rinvoq combined can ultimately make up for the loss in revenue.

The healthcare company's rock-solid operations have enabled AbbVie to generate free cash flow of just under $22 billion over the past year, putting it in great shape to withstand any headwinds that may come up.

2. Nvidia

Chipmaker Nvidia has made for a solid growth investment over the years, and it hasn't compromised profitability along the way. Sales for fiscal 2022 (which ended on Jan. 31, 2022) totaled $26.9 billion and were more than double the $10.9 billion that the company reported just a few years earlier.

The growing popularity of crypto and more companies moving more of their operations online, in part due to the pandemic, have led to stronger demand for faster and better computers.

What's impressive is that at $9.8 billion, the company's profit margin was an incredible 36% of its top line during its most recent fiscal year. Although profits have come under pressure due to rising labor costs and worsening supply chain issues, its profit margin has still been impressive at 21% over the trailing 12 months.

Concerns about softening demand for personal computers has made many investors bearish on the stock of late, but in the long run this is still a fantastic business to invest in -- Nvidia is a top name in graphics cards and that's not likely to change anytime soon.

3. Visa

Credit card companies are among the most profitable businesses in the world. While there's always a risk of consumer default, these businesses are good at hedging risk and setting aside money for that danger. 

In January, Visa released numbers for its fiscal 2023's first quarter (ended Dec. 31, 2022), and net revenue grew 15% to $7.9 billion when excluding the impact of foreign currency. Profits totaling $4.2 billion were up by just 6% but still represented an impressive 53% of the top line.

With Visa generating numbers like that amid inflation and when concerns are rising about the health of the consumer, those are some impressive results. Although it may not be as high of a growth rate as in previous quarters for Visa, the business still looks to be in fantastic shape.

And as the economy strengthens, its bottom line could improve even further, making this an even better buy right now before that happens.