The first half of the year is officially over, and that also marks the close of the 2023 second quarter. Many U.S. companies will be reporting their financial results throughout July and August, which will offer investors insight into their businesses.

It's never a good idea to invest for short-term gains, nor is it advisable to bet on the contents of an upcoming earnings report. But some companies have a track record of beating expectations, which makes them a great investment over the long run.

Datadog (DDOG 4.95%) and DigitalOcean (DOCN 3.30%) are two great examples. Both companies are due to report their Q2 results in early August, so this month might be a great time for investors to start accumulating a long-term position. Here's why.

1. Datadog

Cloud computing is the technology that enables companies to run their operations online, including their sales channels. Its benefits are broad; a business can reach a global customer base, and it can hire remote employees located anywhere in the world. But the cloud also has a few drawbacks. It creates mountains of data the average business can struggle to properly utilize, and it can be difficult to deliver a positive experience for thousands of faceless customers online.

Datadog is a cloud monitoring solution to help solve those challenges. It provides companies with a full-stack overview of their entire cloud infrastructure, from backend servers to customer-facing applications. For example, an entertainment company that offers a streaming platform or a popular game will draw substantial value from Datadog, especially if it serves users in multiple countries. 

Here's another example: A company might experience a glitch in one particular geographic location, affecting a small handful of customers, and the company wouldn't be aware of the issue until customers started giving negative feedback. But Datadog can monitor the company's applications around the clock and spot technical issues before they snowball into bigger problems. And it's used in dozens of industries, including financial services, retail, healthcare, and education.

In fact, Datadog serves 25,500 businesses, and that number will grow in lockstep with cloud adoption over time. At the end of the first quarter, 2,910 of those customers were generating annual recurring revenue of $100,000 or more on Datadog's platform, which highlights the need for cloud monitoring within larger organizations.

Those customers helped drive Datadog's Q1 revenue to $482 million, up 33% year over year and comfortably above its $470 million forecast. As a result, the company increased its full-year revenue projection to $2.09 billion (at the midpoint), up from $2.08 billion previously. It followed an incredible 2022 that featured three guidance increases, even in the face of tough economic conditions.

Investors should look for that momentum to continue when Datadog releases its second-quarter results in August, and also in the long run. Since Datadog stock is still down 49% from its all-time high after the tech sell-off last year, this might be a great time to buy in. 

2. DigitalOcean

Speaking of the cloud, DigitalOcean serves as an on-ramp to cloud computing for over 614,000 businesses in 190 different countries. It helps them host websites, develop software, and stream video content to users (among other things), and it specifically targets small to midsize enterprises with under 500 employees. This is a niche segment of the cloud market that DigitalOcean believes is underserved by industry giants like Amazon Web Services, which is backed by its trillion-dollar parent company, Amazon.

DigitalOcean differentiates itself from its larger competitors by offering personalized service to businesses that might be jumping into the cloud for the very first time. It also provides a digital library with thousands of resources to help users get the most out of their experience. Additionally, DigitalOcean has designed a pricing structure that caters to enterprises even in the start-up phase, with a focus on transparency so they always know exactly how much they're spending.

About 486,000 of DigitalOcean's customers are spending just $15 per month with the company. It relies on a small portion of those customers becoming fast-growing success stories, called "scalers," which have much larger budgets. At the end of the first quarter, DigitalOcean had 15,000 of those customers spending an average of $1,962 per month.

Despite scalers making up just 2.4% of the overall customer base, they accounted for more than half of DigitalOcean's $165.1 million in total revenue in Q1. That result was slightly above the company's prior revenue forecast of between $163 million and $165 million. Considering it beat expectations in three out of four quarters in 2022, investors can expect more of the same going forward this year.

DigitalOcean estimates its addressable market will be worth $98 billion in 2023, so it has barely scratched the surface of that opportunity, and the market could double to $195 billion by 2026 as the cloud becomes more accessible to small and midsize businesses.

Despite a 54% bounce this year, DigitalOcean stock is still down 69% from its all-time high, which might spell opportunity for investors. After all, it's hard to go wrong owning shares in a company that consistently exceeds expectations. The company will have the chance to do so again when it reports Q2 results in early August.