Warren Buffett is one of the greatest investors of all time. From 1965 through 2024, Buffett guided Berkshire Hathaway stock to an astounding 5,502,284% cumulative return, smashing the S&P 500 index's 39,054% return.

Although Buffett will be retiring at the end of this year, Berkshire's stock holdings are full of competitively strong companies that can grow your savings. Amazon (AMZN -0.94%) and Apple (AAPL 0.53%) are dominant tech firms with millions of loyal customers. If you have $1,000 to invest right now, these are excellent stocks to anchor a well-diversified portfolio.

Warren Buffett.

Image source: The Motley Fool.

1. Amazon

Berkshire has held a stake in the leading e-commerce and cloud computing provider since 2019. Amazon has multiple high-margin revenue streams that make it a solid investment for a long-term investor. The stock has returned 66% over the last five years and should continue to grow in value.

Amazon's e-commerce and cloud services form a potent combination. It's important to understand that e-commerce is the largest revenue driver, totaling 38% of the company's $650 billion of trailing-12-month revenue, but Amazon Web Services (AWS) generates most of the company's $71 billion of trailing operating profit.

AWS is seeing strong demand for its artificial intelligence (AI) services for enterprises, but Amazon is also leveraging this technology for its e-commerce business.

For example, the company uses AI to forecast demand for products and allocate its inventory where it is needed most. This ultimately leads to faster delivery speeds, satisfied customers, and greater cost efficiencies that benefit profit margin.

Amazon's operating income increased 20% year over year in the first quarter. The strong growth it is seeing in other profitable businesses like advertising and third-party fulfillment services is also having an impact on Amazon's bottom line and could justify a higher share price.

Berkshire still held 10 million shares of Amazon in the first quarter. The stock's price-to-earnings multiple of 35 is the lowest in over 10 years, making it a compelling buy right now.

Apple's iPhone.

Image source: Getty Images.

2. Apple

Buffett originally invested in Apple stock in 2016, and it's been one of Berkshire's most successful investments in its history. Even after Berkshire reduced its stake last year, Apple remains its largest investment.

Apple stock is down about 20% year to date, as iPhone sales have flattened over the last year. Sales have been weighed down by weak demand in China. However, a key signal that shows Apple's business is still holding strong is the growth in services. Apple's services business raked in $26 billion in revenue last quarter, or 28% of the company's total revenue. This was an increase of 12% year over year.

Apple is bringing more personalization and improvements to the user interface in iOS. This was highlighted by last year's launch of Apple Intelligence, which brings new AI features to the company's devices like writing tools and text summaries. These features have the potential to grow sales of its devices, especially as the company invests in more powerful chips that can handle on-device AI processing.

Apple has a major advantage with a growing installed base of devices of more than 2.3 billion. The company was recently ranked the most valuable brand in the world by Brand Finance. This puts Apple in a strong position to deliver returns for shareholders.

Apple is a highly profitable business that generated $97 billion in net profit over the last four quarters. It has plenty of resources to make its products better, and that will ultimately lead to more shareholder returns. Analysts forecast earnings to grow at an annualized rate of 10% over the long term.