Tech giants Apple (AAPL 2.88%) and Microsoft (MSFT -1.44%) have a lot in common. Both are among the biggest companies in the world by market cap, have delivered amazing returns to longtime shareholders, and have plenty of growth opportunities to exploit. However, though they aren't known primarily for their dividends, both stocks are excellent choices for income-seeking investors.

1. Apple

Building a solid economic moat is one of the keys to success and longevity for any business. That's precisely what Apple has done over the years. Part of the company's competitive edge now comes from its brand name, which it has built into one of the most valuable in the world. The brand loyalty of its customers allows it to charge outrageous prices for its products, none of which are necessary goods consumers can't live with.

Still, Apple sells tens of billions of dollars worth of iPhones and other devices every quarter regardless of economic conditions. Detractors will quickly point out that in its fiscal 2023, which ended on Sept. 30, Apple's net sales declined by about 3% year over year to $383.3 billion. All that means, though, is that the tech company isn't completely immune to economic pressures, but it can still perform reasonably well among these challenges.

Apple's earnings per share increased slightly to $6.13 in fiscal 2023, up from $6.11 in its fiscal 2022. Also, the company had its best fiscal Q4 ever for iPhone sales, and its services unit's revenue set an all-time high -- and those are the company's most important businesses. Further, Apple's financial results have been solid over long periods.

AAPL Revenue (Annual) Chart

AAPL Revenue (Annual) data by YCharts.

Apple also benefits from relatively high switching costs. Customers who join the company's ecosystem enjoy perks that range from the connectivity between its devices to the lure of its services. Switching to an Android smartphone is possible, but it's a headache. That's partly how Apple's installed base has grown to over 2 billion active devices.

This installed base also represents one of Apple's most important opportunities, as the company will continue finding ways to monetize its ecosystem. One of the company's goals is to make headway in the healthcare sector by adding medical-related functions to some of its gadgets. For instance, it has been working on creating a continuous glucose monitoring system that it can add to the Apple Watch.

Apple has also made headway in fintech. Whatever the company decides to pursue, its track record, massive customer base, and strong ability to generate cash inspire confidence. Apple should continue delivering excellent returns for a while. What about the company's dividend? While its yield isn't impressive -- just 0.51% at the current share price -- compared to the S&P 500's average of 1.62% -- Apple has raised its payouts by 120% in the past 10 years.

The company's cash payout ratio is just 15.1%, so management has substantial capacity to hike the dividend further. That makes Apple a great dividend stock and, coupled with the rest of its business, an excellent stock to buy and hold forever.

2. Microsoft

Microsoft benefits from a similar economic moat to Apple, one that starts with a strong brand. In the computer operating system market, Microsoft leads by a wide margin. It also famously offers a wide range of productivity tools that are used daily by millions of people and businesses.

It's hard to imagine any rival dethroning Microsoft in these markets, especially since its productivity programs also carry high switching costs. All such programs have a learning curve, making it hard for customers, especially businesses with many employees, to switch to a competitor. In addition to its legacy computer OS business, Microsoft boasts key growth opportunities.

The first is cloud computing infrastructure, a market where its Azure segment is one of the leaders. This business unit is increasingly becoming one of Microsoft's most important, and a significant contributor to its top-line growth. In its fiscal 2024 first quarter, which ended on Sept. 30, Microsoft's total revenue increased by 13% year over year to $56.5 billion. Azure's revenue growth rate was more than double that at 29%.

The cloud computing industry still has ample white space, providing a nice tailwind to Microsoft. The company is also looking to become the leader in generative artificial intelligence (AI). Microsoft has partnered with OpenAI, the company behind ChatGPT, for years, and it doubled down on this partnership at the beginning of the year. Beyond these two opportunities, Microsoft should remain a major player in other areas, including gaming.

The company has an impressive long-term financial performance that shows its ability to profit from growth opportunities.

MSFT Revenue (Annual) Chart

MSFT Revenue (Annual) data by YCharts.

Microsoft can also give dividend investors what they want, even with a yield of just 0.79% at its current share price. The company has increased its payouts by nearly 168% in the past 10 years, yet its payout ratio remains conservative at 32%. Growth and income-oriented investors focused on the long term can't go wrong with Microsoft.