Amazon (AMZN -1.64%) and Walmart (WMT 1.32%) are retail powerhouses that generate hundreds of billions in consumer sales every year. More recently, the two have begun capitalizing on an incremental revenue source that has the potential to boost overall profit margins. 

Given that marketers spent approximately $763 billion trying to influence purchasing decisions in 2021, the efforts of these two retail giants to expand their advertising sales efforts and make ad revenue a bigger part of overall operations make some sense. 

Amazon boasts 200 million Prime members 

Indeed, in its most recent quarter (ended March 31), Amazon reported $7.9 billion in advertising revenue. That was 25% higher than in the same quarter in the prior year. Over the previous four quarters, Amazon reported over $30 billion in ad revenue.

Amazon boasts over 200 million Prime members who get access to expedited "free" shipping on millions of items as part of their subscription. In the quarter ended in March, $98 billion in sales flowed through the Amazon platform. Such a massive base of shoppers with such a magnitude of purchasing power will undoubtedly attract advertisers who want to promote their products and services to these users.

Walmart is the world's largest retailer 

Walmart is a little more private when it comes to disclosing its advertising revenue. However, it did note that the segment grew by 30% in its most recent quarter. Additionally, Walmart has said that the advertising business is one of its higher-margin initiatives.

Similar to Amazon, Walmart has a lucrative customer base. That might be an understatement. Walmart shoppers have spent at least $500 billion at its stores in each of the last five years, culminating at $572 billion in its most recently completed fiscal year.

Higher profit margins in the works 

GOOG Operating Margin (Annual) Chart

GOOG Operating Margin (Annual) data by YCharts.

Advertising revenue tends to deliver higher profit margins than retail sales. In the chart above, the operating profit margins of two tech giants that get most of their billions in revenue from advertising sales, Meta Platforms (META -0.52%) and Alphabet (GOOG 0.74%) (GOOGL 0.55%) highlight the potential addressable market for Amazon and Walmart. 

AMZN Operating Margin (Annual) Chart

AMZN Operating Margin (Annual) data by YCharts.

Contrast the profit margins from Alphabet and Meta Platforms with those from Amazon and Walmart, and you will see the distinction. Of course, Amazon and Walmart will not derive most of their revenues from advertising the way that Alphabet and Meta Platforms do. Still, as the segments grow to a more significant portion of overall sales, it could lift Amazon's and Walmart's margins over the next several years. 

It's helpful that the advertising addressable market is big enough for multiple winners. Marketers spent $763 billion on advertising in 2021, which was 22.5% higher than the previous year. But the sheer magnitude of their customer bases and purchasing power give Amazon and Walmart an advantage in attracting a meaningful share of the market.

Is now a good time to consider buying Amazon and Walmart stock?

AMZN PE Ratio Chart

AMZN PE Ratio data by YCharts.

Signs of a robust and growing advertising business could be yet another reason to buy Amazon and Walmart stock. The two have delivered excellent returns to shareholders over the years and could continue doing so in the future. The stock market sell-off in 2022 has each valued inexpensively. It's as good a time as any to consider adding Amazon and Walmart stocks to your portfolio