Earnings season is upon us, with many stocks on the move this month. As a result, now is an excellent time to diversify your portfolio by investing in companies that are on promising growth paths. 

Inflation has eased for nine consecutive months, hitting 5% in March after rising 6% in February and 9% in June 2022. While still high, the improvement has gradually boosted countless stocks and will likely continue to do so for the rest of the year.

With many companies still suffering from reduced spending from consumers and businesses, this month is a potentially lucrative time to pick up some bargain stocks that could provide substantial gains over the long term. Here are two top stocks to buy in May. 

1. Amazon 

This tech giant has changed the world with its e-commerce business, revolutionizing how consumers shop. During the height of the COVID-19 pandemic, Amazon (AMZN -1.65%) provided an invaluable service by allowing consumers to stay home while getting the goods they needed.

However, steep rises in inflation over the last year have burdened the company's core segments, stealing what it gained during the pandemic. Reduced consumer spending has hurt its e-commerce earnings, while a pull-back from businesses has slowed growth in its cloud platform, Amazon Web Services. 

As a result, the company's stock is down 11% since 2020. However, the company remains a solid investment for those in it for the long haul.  

According to Statista, the e-commerce market is projected to hit $4 trillion in 2023 and $6.3 trillion by 2027. Meanwhile, Amazon holds a leading 38% market share in the industry. For reference, the second-largest share is Walmart, with 6%. Amazon's dominance in e-commerce will likely pay off substantially as inflation eases and the market expands. AWS should similarly profit from an improving economy as businesses are able to increase cloud service budgets. 

The company's vast potential is represented in analysts' average 12-month price target of $138, up about 32% from its current price. The company has stumbled over the last year but continues to have a bright long-term outlook, making Amazon's stock an immensely compelling investment this month.

2. Warner Bros. Discovery

Warner Bros. Discovery (WBD -1.07%) has had a rocky start since its founding in April 2022. The merger of WarnerMedia and Discovery saddled the new company with $43 billion of debt, with an economic downturn only further burdening its financial prospects. As a result, the entertainment giant's stock is down 26% year over year despite rising 38% since Jan. 1.

The declines have come as the company's advertising revenue has dwindled alongside reduced spending from businesses and costly restructuring moves. In Warner Bros. Discovery's first quarter of 2023, revenue of $10.7 billion soared 239% year over year but still missed analyst forecasts by $70 million. Meanwhile, operating losses came to $557 million. 

Despite the less-than-stellar results, Warner Bros. Discovery shares have climbed about 3% since the earnings release on May 5. Investors have been encouraged by growth in its streaming business and increasing success with its media offerings.

CEO David Zaslav previously promised WBD's streaming segment would break even by 2024 and become profitable by 2025. However, the first quarter of 2023 saw the direct-to-consumer business turn a profit for the first time, hitting $50 million. Zalsav followed the news by saying the entertainment giant's streaming business would be profitable for the year now, 12 months ahead of projections.

Moreover, the company's HBO series, The Last of Us, premiered on Jan. 15 and saw viewership climb 75% throughout the season. Then in February, Warner Bros. launched the Harry Potter-themed video game Hogwarts Legacy on consoles and PC, which proved a massive hit. The new title raked in $1 billion in Q1 2023 and is the best-selling game this year. 

With projects in the works to expand franchises like Game of Thrones, Harry Potter, and its DC brand, the company's recent success seems to have it on a lucrative path. Analysts' average 12-month price target of $22 for Warner Bros. Discovery's stock indicates a potentially sharp run-up from current levels, making its shares too good to pass up this May.