Thinking long term remains one of the best mindsets for investing in stocks. To that end, choosing companies that are well positioned within their respective industries is essential. Furthermore, it makes sense to look at industries that will likely be in strong demand over the long run. Overall, I like tech and groceries.
Technology is an ever essential part of today’s living, and isn’t going anywhere. The other business that isn’t going anywhere is food. Groceries and retail in general aren’t something that’s going to disappear. Because of the demand for these two areas, I’ve chosen two essential stocks that will likely remain strong over the next few decades.
1. Microsoft
Over the long term, it’s hard to go wrong with Microsoft (MSFT -0.59%). Gaming, AI, the cloud — there are multiple avenues where Microsoft can continue to develop its offerings, and the success is present in its five-year return of roughly 160%. An added bonus here is that Microsoft shares are much more fairly valued than others, such as Nvidia.
Microsoft finished fiscal 2024 with revenue up 16%, operating income up 24%, and net income up 22%. Between fiscal 2020 and 2024, revenue grew from $143 billion to $245 billion.
Fiscal 2025 looks to be continuing the trend of solid growth across multiple avenues in the business. In the company’s first quarter of fiscal 2025 (ended Sept. 30, 2024), revenue increased 16% year over year to $65.6 billion, along with an 11% increase in net income.
What I like about Microsoft is the breadth of its product lineup. Its finances are procured over a multitude of business segments including Microsoft Cloud, AI, Microsoft 365, LinkedIn, servers and corresponding products, Windows OEM, revenue from search and advertising, along with the classic Xbox console and corresponding services, which saw their sales increase a whopping 61%.
Over the last several quarters, Microsoft had a tendency to surprise to the upside on earnings, but analyst estimates are calling for 2025 earnings of $13.09, which would give the stock a forward P/E ratio of just under 33 times earnings. When you consider some of the high premiums that tech stocks are going for, this seems pretty reasonable given Microsoft’s positioning within all of these different business segments.
2. Walmart
That’s right! It might not be flashy, but Walmart (WMT 1.01%) continues to be a steady performer over time. Sure it might have an off quarter every now and then, but over the long haul the retailer delivers for shareholders. According to YCharts, it was the second best performing Dow Jones Industrial stock in 2024, gaining just under 72%, and its diversified approach to delivering goods to consumers makes me think it will still be crushing it in 20 years.
Walmart is up 163% over the last five years, roughly doubling the S&P 500. It has done this by continuing its traditional brick-and-mortar business, while creating online options that complement, rather than work against its traditional approach. Whether you want to buy in the store, order online and pick it up, or have it delivered, Walmart has something going.
Through Q3 of fiscal 2025 (ended Oct. 31, 2024), Walmart has been doing well. Total revenue was up 5.4% to $500.43 billion through the first nine fiscal months of the year, while earnings per share jumped 41.1% to $1.75 per diluted share. Analyst estimates are calling for $2.48 per share in fiscal 2025, giving Walmart a forward P/E ratio of 37 times earnings. The company’s guidance for fiscal 2025 is calling for similar adjusted earnings of $2.42 to $2.47.
I’m a firm believer that no one form of retail will dominate over time, and rather that a diversified business is what customers are after. Walmart’s large spread of physical stores are the envy of many, and set it up to be able to quickly supply goods via delivery and order/pickup. This setup positions Walmart perfectly for continuing to dominate retail over the coming years, and leads me to believe it continues to be a strong stock to own for the long term.
David Butler has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Microsoft, Nvidia, and Walmart. The Motley Fool recommends the following options: long January 2026 $395 calls on Microsoft and short January 2026 $405 calls on Microsoft. The Motley Fool has a disclosure policy.