Dividend stocks are a great way to earn passive income, but they offer another benefit as well. Companies that generate enough cash to consistently pay a dividend tend to be highly profitable. That often translates into market-beating returns for shareholders, especially when those companies raise their dividends regularly.

For instance, dividend payers Microsoft (MSFT -0.68%) and American Tower (AMT -1.16%) generated a total return of 304% and 110%, respectively, over the last five years, while the S&P 500 gained just 84%. In addition to market-beating returns, Microsoft and American Tower have also made a habit of raising their dividends on a consistent basis. That makes these stocks a great option for investors looking to generate sustainable passive income.

Here's what you should know about these two dividend stocks.

1. Microsoft: Taking market share in cloud computing

Microsoft is best known for productivity software. Applications like Word and Excel are mission-critical for many enterprises, and Office 365 is the most popular office software suite on the market. In fact, it's the most popular enterprise software of any kind as measured by total customers. That means Microsoft is uniquely positioned to drive the adoption of adjacent products like Dynamics 365 for customer relationship management, Teams for communication and collaboration, and Defender for cybersecurity.

Microsoft is also gaining momentum in cloud computing due in part to a robust offering of data and artificial intelligence services. In the second quarter, Microsoft Azure captured 24% of cloud infrastructure spend, up from 22% in the prior year, making it the second-most-popular vendor behind Amazon Web Services. That bodes well for the future. Cloud computing spend is expected to grow at nearly 16% per year to surpass $1.5 trillion by 2030, according to Grand View Research.

Financially, Microsoft has delivered solid results like clockwork, and that trend continued over the past year, in spite of macroeconomic headwinds. Revenue climbed 18% to $198 billion, and free cash flow jumped 16% to $65 billion. Moreover, investors have good reason to believe that momentum will continue.

Microsoft has big opportunities in cloud computing and cybersecurity, and it recently partnered with Netflix in digital advertising. Specifically, it will provide the ad-tech platforms for Netflix's ad-supported streaming service, which will probably launch in 2023. Despite recent headwinds, Netflix is still the most popular premium streaming service, and its foray into ad-supported content could materially strengthen Microsoft's position in the digital ad industry.

What about passive income? Microsoft is by no means a high-yield dividend stock. Its quarterly payout sits at $0.62 per share, which equates to a dividend yield of 0.9%. But Microsoft has paid shareholders a quarterly consideration for the last 18 years, and it has upped the payout each year since 2011. I expect that trend to continue, and I wouldn't be surprised to see Microsoft eventually join the ranks of the Dividend Aristocrats.  

2. American Tower: Powering 4G and 5G networks around the world

American Tower is a real estate investment trust (REIT) that specializes in communications infrastructure. Its portfolio includes more than 220,000 tower sites -- 42,800 in North America and 178,800 in international markets -- and 27 data center sites. The company primarily generates revenue by leasing tower space to wireless carriers like Verizon, as well as radio and television broadcasting companies.

American Tower's business model benefits from inherent operating leverage and high switching costs. Each tower can support equipment from multiple carriers, and once a tower site has been established, it costs American Tower very little to add new tenants or equipment. That means the operating margin on each tower rises as space is utilized more efficiently. To add, once equipment has been installed on a tower, removing it would be time-consuming and costly for the carrier. That dynamic has kept churn quite low -- just 1% to 2% of tenant billings each year.

More broadly, American Tower has benefited from steady demand over the long term, as carriers have invested in their networks to support the proliferation of mobile devices and growing data consumption. That has translated into strong financial results for American Tower. In the past year, revenue rose 19% to $10.2 billion, and funds from operations soared 30% to $5.8 billion. And investors have good reason to be optimistic about the future.

In the coming years, American Tower should continue to benefit from the transition to 5G network technology in developed markets like North America and Europe, as well as the densification of 4G networks in emerging markets like Latin America, India, and Africa. Those tailwinds give American Tower a great shot at generating market-beating returns for shareholders, but the company also pays a modest dividend. 

The quarterly payout currently sits at $1.43 per share, which puts the dividend yield at 2.16%. But American Tower has raised its dividend every quarter since the beginning of 2012, meaning shareholders have good reason to believe the payout will keep climbing. That's why this dividend stock is worth buying now and holding for the long haul.