There are certain types of companies that tend to perform well in an inflationary environment. They include companies that sell essentials which consumers need to buy under any circumstances. The energy sector typically outperforms during these periods since demand doesn't change too much, and prices rise.

Ironically, they can also include luxury goods companies, which target affluent customers who don't feel the pinch of inflation as much as others.

If any other companies do well when there's inflation, it's a good indication that the company is well-run and has enough brand power to charge prices customers are willing to pay. Airbnb (ABNB -0.36%) falls into this category, and there's one reason buying its stock could be a genius move.

Achieving phenomenal results under pressure

Airbnb has demonstrated an incredible recovery since it suffered severe declines at the beginning of the pandemic. That has continued in the face of challenging macroeconomic conditions that are hurting scores of great companies.

In the 2022 second quarter, Airbnb posted a 58% year-over-year revenue increase and $379 million in net income. Those are huge strides for a company that, as recently as last quarter, posted a loss, and in the face of tough comps from last year as well as under challenging circumstances.

There are many factors that helped Airbnb achieve these results. Specifically, it operates a differentiated travel platform that is agile and asset-light. That means it can quickly offer lodgings that meet shifting demand, as opposed to hotel operators that are stuck wherever they are, even when travelers are somewhere else.

This has been very clear over the past two years when travelers were vacationing locally and exploring experiences close to home. But it has not let up as travel restrictions have started to ease up. As suburban nights and experiences booked continue to make a strong showing, urban bookings are beginning to rise as well. This points to stickiness, and if Airbnb is doing things right, users will continue to enjoy its platform under any conditions. 

Why Airbnb is in great shape right now

However, there's more to it. In two words, it's called pricing power. Companies that are succeeding now are doing so because they have been able to mitigate higher costs with increased prices. Airbnb's average daily rate (ADR) increased 40% vs. last year to $164, and that was also a slight increase over the 2022 first quarter. That was important in the quarter because urban destinations rebounded, and urban destinations tend to have a lower ADR than non-urban ones.

In this environment, people are willing to shell out more money because they're itching to travel after a long period of time staying home. Many people are opting for drivable locations so as to avoid flying, which has been beset by delays, long lines, and flight cancellations. That's a boon for Airbnb, which can offer such accommodations in so many areas. 

Airbnb's fastest-growing category in terms of length of stay is stays of 28 days or more, and with a higher ADR, these stays contribute to higher revenue both in the number of days booked as well as a higher average rate per day.

The ADR isn't likely to continue increasing as fast as it did in the second quarter. As urban destinations keep recovering, the ADR should begin to moderate. But for investors, this is an important element to keep in mind as it relates to the strength of the overall business.

Should you buy Airbnb stock now?

Management made a bold move when it brought the company public at the end of 2020. That's because it was the height of its revenue decline when the pandemic shuttered travel. However, it was also a time of gluttony in the markets, and investors devoured the initial public offering (IPO), making it the biggest IPO of the year in terms of funds raised.

As growth stocks have deflated, so has Airbnb stock. Its lofty valuation made it susceptible to a large price drop, slumping 30% this year. But now at a much reasonable level -- and with a strong business despite the current inflation -- the stock looks like a buying opportunity for long-term investors.