One of the best investments you can make is to buy shares of a financially strong company that makes products millions of people use every day.

Amazon (AMZN 3.43%) and Apple (AAPL -0.35%) are two such companies that come first to mind. These are hugely successful businesses that churn out billions of dollars in free cash flow, an important measure of profitability, and they each have made shareholders a lot of money over the years. Here's why these two stocks are ideal buy-and-hold investments.

1. Amazon

There are not many businesses as entrenched and positioned for above-average growth over the long term as Amazon. Last year, it controlled a 37% share of the U.S. e-commerce market, according to Statista. Walmart was a distant second with only a 6% share. This puts Amazon in a great position to capture more retail spending that will shift online. E-commerce made up just 15% of U.S. retail sales in 2023.

When you're going to invest in a company with the intention of holding it forever, it's ideal to choose a business with a large customer base. Amazon checks that box, with more than 200 million Prime members and counting.

It's also important to invest in companies that generate growing free cash flow. Amazon's free cash flow dipped in 2022 as the company accelerated investment in its delivery speed and transportation network. With those investments behind it, Amazon generated $32 billion in free cash flow on $574 billion of revenue last year.

AMZN Chart

AMZN data by YCharts

Amazon continues to expand its inventory selection and same-day delivery. It's also investing heavily to increase streaming content for Prime Video. These are important advantages that attract new Prime members and ultimately deliver returns to shareholders.

Amazon is also investing heavily in artificial intelligence (AI), which management sees as an opportunity to reinvent its customer experiences in retail and its cloud business. Investors like the company's progress, which is why the stock is up 77% over the last 12 months and close to a new all-time high. But there's still a huge opportunity in e-commerce for new investors to do well with Amazon over the long term.

2. Apple

Apple is another top brand that will make a rewarding buy-and-hold investment. The number of active Apple devices hit another all-time high last quarter at more than 2.2 billion.

It might be difficult to see how Apple can continue growing with so many users already, but the smartphone market is expected to increase by $75 billion by 2028 to be worth $542 billion. This gives the tech titan a tailwind to gradually grow its iPhone revenue, which is its largest business. iPhone revenue rose 6% year over year last quarter, driven by a record number of people upgrading.

AAPL Chart

AAPL data by YCharts

Where Apple really makes its money is selling users additional services, such as subscriptions to Apple Music and iCloud plans. Apple services generate twice the gross profit margin as devices, which is a long-term catalyst to continue growing the company's tremendous $106 billion in annual free cash flow.

Apple won't rest on its laurels. Like Amazon, it is investing in AI that could transform the user experience on the iPhone and may even win over new converts from other brands. Apple is reportedly in discussions with Google to bring generative AI features to iPhones.

New product releases will also keep its installed base of devices growing. Its new Vision Pro headset may take a few years to catch on with the public, but Apple has major ambitions to influence how people interact with apps and computing tasks for decades to come, much like it did with the first iPhone in 2007.

After climbing 48% in 2023, the shares have pulled back this year, providing a good buying opportunity for new investors. Apple's strong brand and growing free cash flow are reasons the stock will remain a rewarding investment.