Part of being a long-term investor is learning how to weather volatility. Of course, no one likes to see a stock in their portfolio suffer a price plummet, but those downturns can actually be buying opportunities if it's a company you believe in.

For instance, the stock prices of Airbnb (NASDAQ:ABNB) and Appian (NASDAQ:APPN) are down 33% and 37%, respectively, from their 52-week highs. But both stocks still look like good long-term investments. Here's why these are two great stocks you can buy on sale.

1. Airbnb

Airbnb is disrupting travel and tourism, an industry that accounted for over 10% of global GDP in 2019. The company's platform connects potential guests and hosts, allowing travelers to browse rental properties and book stays in thousands of cities around the world.

Investor reading the newspaper.

Image source: Getty Images.

Of course, traditional hotels already do that. So what makes Airbnb special? With a network of 4 million hosts, potential guests have access to a much wider range of unique and immersive accommodations. For instance, you could book a private cottage along the coast, a secluded cabin in the mountains, or a castle in the English countryside. You could even stay in a cave that's been converted into a cozy hideaway. Those types of experiences simply aren't possible with hotels.

Last year, the travel industry was hit hard by the pandemic, and Airbnb's revenue dropped 30%. Even so, the company still fared better than rivals like Marriott and Hilton, which saw revenue plunge 50% and 54%, respectively. That underscores one of Airbnb's key advantages: resilience.

In fact, business appears to be rebounding already. Airbnb's revenue rose 5% to $887 million in the first quarter, and gross booking value surged 52% to $10.3 billion. Investors should look for those trends to accelerate as the pandemic fades.

What's more, some fallout from the pandemic could actually create opportunities for Airbnb. For instance, remote work is already reshaping the travel industry, affording people the flexibility they didn't have in the office. In fact, CEO Brian Chesky recently noted: "People can travel anytime, they are traveling to more places, and they are staying longer."

To capitalize on those trends, Airbnb recently upgraded its platform. Guests can now search for stays with flexible dates and destinations, and new hosts can sign up more quickly. While these are small changes, both could bring new users to the platform, helping Airbnb capture more of its $3.4 trillion market opportunity.

2. Appian

Appian's low-code tools simplify software development, enabling clients to build enterprise-grade applications with a visual interface, using flowcharts instead of computer code. The Appian platform also integrates robotic process automation (RPA) and artificial intelligence (AI), allowing clients to automate tasks and complex workflows.

For example, clients could use Appian's tools to extract data from a document (e.g. an invoice, application, or email), then automatically integrate that data into a custom application for further processing, eliminating the need for human involvement.

Why does that matter? Custom software can play an important role in helping enterprises differentiate themselves, and Appian makes the development process more efficient. In fact, Appian believes its platform allows users to build applications 10 times faster and at half the cost of traditional solutions.

That value proposition has been a key growth driver for Appian.

Metric

2017

Q1 2021 (TTM)

CAGR

Revenue

$176.7 million

$314.6 million

19%

Data source: Appian SEC filings. TTM = trailing-12-months. CAGR = compound annual growth rate.

Also noteworthy, Appian has achieved a cloud subscription renewal rate of 98% over the last three years, meaning it keeps the vast majority of its customers. Likewise, Appian outranked all rivals in the most recent Gartner Peer Insights report, indicating a greater degree of customer satisfaction. In both cases, Appian's good rapport with clients bodes well for the future.

Going forward, management puts Appian's market opportunity at $37 billion, giving the company plenty of room to grow. And as more enterprises seek efficiency through low-code development and automation, Appian should benefit from increased demand. That's why investors should consider adding this stock to their portfolios.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.