In this article, I decided to look at the recent developments surrounding Amazon and its decision to buy Whole Foods for $13.7 billion.

The transaction may seem odd to investors at first glance, but when you consider all that Amazon has done recently, it may actually be a great idea.

There are plenty of risks here and investors should not anticipate rapid development of Amazon’s operations, but if it does things right, it could own retail in the future.

June 16th was one heck of a day for shareholders in a number of retail outlets and, especially, for shareholders in Amazon (NASDAQ:AMZN) and Whole Foods Market (NASDAQ:WFM). After news broke that Amazon had agreed to buy Whole Foods in a multi-billion dollar deal, shares of both went up while the share prices of other players in the retail space, particularly those that have exposure to the grocery space, took a beating. In what follows, I will give my thoughts on the deal and say what I believe this seems to mean for investors in the relevant entities moving forward.

A look at the deal… and the fallout

According to a press release issued by both Amazon and Whole Foods, Amazon has agreed to buy up Whole Foods for $42 per share. This represents a roughly 27% premium over where the company’s shares traded for previously and values the business at approximately $13.42 billion. This excludes debt, which will bring the deal’s value up to $13.7 billion. Amazon has stated that the transaction will be all cash in nature, but we will have to wait and see about whether or not the firm will take on debt to make the deal work. As of the end of its most recent fiscal quarter, Amazon’s cash and cash equivalents stood at $19.33 billion and its marketable securities came out to $6.65 billion, so they technically can do this without debt, but do they want to give up valuable liquidity and the prospect of a tax shield?

As a result of this announcement, the retail industry tanked for the day. Shares of Walmart (NYSE:WMT) closed down 4.7%, but it was the least-hit of the major players. Target (NYSE:TGT) fell by 5.1% while Costco (NASDAQ:COST) dropped 7.2%. Of course, the hardest hit player for the day was Kroger (NYSE:KR), which saw its share price plummet 9.2% after having seen, in the prior trading session, its stock drop 18.9% on lackluster guidance, for a two-day decline of 26.4%. According to CNBC, companies in this space lost a total of $40 billion in market value for the day, with Walmart alone accounting for a decline of around $11.1 billion. The market perceived the news as a positive for Amazon, sending its shares higher at the close by 2.4%, while Whole Foods’ stock went up 29.1% to close at $42.68 per share. This ascent beyond the agreed-upon purchase price has stoked speculation in the market that this may be the start of a bidding war for the entity.

Some major implications for Amazon and Whole Foods

If this purchase goes through, the implications for both Amazon and Whole Foods as an entity could be meaningful. For years, Whole Foods has been growing its physical presence, but the picture over the past couple of years has been mixed. While sales have continued to grow, comparable store sales for the retailer fell by 2.5% in 2016, and management has said that comparable store sales for this year could range between -2.5% and 0%.

WFM Revenue (Annual) Chart

WFM Revenue (Annual) data by YCharts

On the bottom line, things have been even worse. Since 2014 ended, store sales have dropped, falling from $722,000 per location each week, on average, to $682,000 per location last year. This appears to have come about despite management’s desire to open larger stores. As of the end of last year, the retailer operated 456 locations (436 of which are in the US), with an average square footage of 39,000. At the end of 2016, the firm had another 98 locations in development with an average square footage of 42,000, which indicates that sales per store have shrunk despite focusing, recently, on larger locations. This drop in sales per store each week may be one reason why the firm’s bottom line, as shown in the graph above, has been fairly flat for the past few years. As sales per square foot decline, margins should contract, as can be seen in the table below, which shows Whole Foods’ cost of goods sold over the past five years.

*Created by Author

Now, to be fair, matters have started to improve for Whole Foods to some degree. While this year is slated to be a wash or to be negative in terms of comparable store sales, the company’s free cash flow (not counting growth capex) has held up quite well. In the first half of this year, the entity’s free cash flow came in at $475 million, up from $434 million the same time last year. This compares to free cash flow for all of last year $795 million and implies a price/true free cash flow ratio that Amazon is paying for the business of 16.9. That’s not great, but it’s also not bad.

For investors who don’t follow Amazon too closely, this deal may be a head-scratcher. After all, why would an e-commerce business want to own, lock, stock, and barrel, a physical retail outlet? Simply put, it comes down to future potential. You see, there are two things about Amazon that make Whole Foods (or really any retailer) an attractive prospect, both of which can generate meaningful synergies and growth prospects for Amazon down the road.

For starters, we know that Amazon has been focused on ultra-fast delivery. Just the other day, for instance, the firm announced that it had expanded its Prime Now services to the Denver, Colorado, area by partnering up with Sprouts Farmers Market. Through the deal, the company will offer free two-hour delivery of not just food products but also non-food items for…