Grocers like Kroger, Whole Foods and Safeway have reported significant revenue growth over the past year.

This revenue growth occurred at the same time as a significant drop in shopper traffic at general merchandise retailers such as Target and Wal-Mart.

The growth in grocers’ revenues parallels the massive growth in Amazon.com’s revenue.

Grocers’ revenue is growing because consumers are no longer shopping at department stores and big box discounters.

Grocers are growing because fresh food is one of the few things the average American cannot order online.

In recent months, three intriguing trends in retail have caught my eye. The first is the astounding growth of online retailers led by Amazon.com Inc. (NASDAQ: AMZN); the second is a big increase in revenue at traditional grocers such as Kroger (NYSE: KR) and Safeway (NYSE: SFWY); and the third is a drop in shopper traffic at department and discount stores.

There is an interesting correlation between these three trends. The numbers show that the growth of online retail has coincided with the resurgence in sales at traditional grocers and a drop in foot traffic at general merchandise retailers.

In terms of revenue growth, Amazon.com has been on a tear in recent years. “The Everything Store” reported a TTM revenue figure of $85.25 billion on Sept. 30, 2014. That made for an increase of $15.12 billion from September 2014, when Amazon reported a number of $70.13 billion. As I have noted elsewhere, Amazon’s TTM revenue figure is higher than Target’s (NYSE: TGT) for the first time.

Grocery Bucks Retail Trends

Now for the interesting part: on Oct. 31, 2014, Kroger reported a TTM revenue figure of $106.48 billion. That number was a $7.21 billion increase over October 2013, when the nation’s largest grocer reported a TTM revenue figure of $99.17 billion.

Nor was it just Kroger that was growing in the grocery business. Safeway reported a TTM revenue figure of $36.77 billion on Sept. 30, 2014. That marked a $2.14 billion increase over September 30, 2013. Whole Foods Market (NASDAQ: WFM) reported a TTM revenue of $14.19 billion on Sept. 30, 2014, a $1.27 billion increase over September 2013. Organic grocery upstart Sprouts Farmer’s Market (NASDAQ: SFM), which operates on a smaller and regional level, also displayed impressive growth. Sprouts reported a TTM revenue of $2.841 billion on Sept. 30, 2014, a $532 million increase over September 2013, when it reported $2.309 billion in TTM revenue.

What’s fascinating is that the growth in the grocery business seems to be running counter to prevailing trends in the retail business. ShopperTrak reported that shopper visits to stores fell by 5% between July 2013 and July 2014, according to The Wall Street Journal. Forbes reported that ShopperTrak calculated that store traffic in September 2014 was 17% lower in September 2014 than it had been just a year earlier.

The drop in sales traffic appears to be across the board. Walgreen (NSDAQ: WBA) reported that traffic in the non-pharmacy area of its drugstores fell by 2.6% in July 2014. Target reported that its customer traffic had been falling for six straight quarters on the same day. Not even the successful dollar stores were immune to the trend; Family Dollar Stores (NYSE: FDO) reported that traffic declines led to a 1.8% drop in sales. Another small box store operator, Alco, which operated 198 stores in 23 states, has declared bankruptcy and shut down completely.

The only big box retailer or discounter that seems to have bucked this trend is Costco Wholesale (NASDAQ: COST). The club store giant reported a TTM revenue of $114.49 billion on Nov. 30, 2014, an increase of $8.03 billion over November 2013, when it reported a TTM revenue of $106.46 billion.

The interesting thing about that figure is that Costco is largely a grocer. It specializes in selling organic items and bulk amounts of groceries.

Why Grocers Benefit from Online Retail’s Growth

What is the correlation between online retail’s growth and grocers’ growing revenues? The answer is a rather simple one: the grocery store is the one large retail outlet that most people still have to visit on a regular basis.

You can buy a TV set, a pair of shoes, a ream of paper, a smartphone, a box of diapers, an ink cartridge, underwear, socks, a full set of china, a dress, a box of detergent or an insurance policy online. Yet unless you live in a few cities where companies like Amazon.com and Kroger are experimenting with grocery delivery, you cannot order a pound of hamburger, a head of lettuce, a gallon of milk or a box of TV dinners online.

The average American can now order most of the stuff he or she used to buy at Wal-Mart (NYSE: WMT) or Target online and have it delivered. If you order a certain amount (more than $50 at Walmart.com), you can usually get free shipping.

That eliminates the need to make the run out to the Wal-Mart Supercenter or Target to pick up diapers, socks, underwear, laundry detergent, a new frying pan and a new printer. Instead, the busy soccer mom only has to go to the neighborhood supermarket to pick up some food, fill the gas tank or perhaps pick up a prescription at the pharmacy.

It is no coincidence that both Target and Walmart have reported declines in shopper traffic over the past few years. The incentive to drive to such locations is gone, and shopper behavior has changed. The habit of making one weekly or biweekly run to the big box is fading.

That puts Kroger and Safeway, which will soon be folded into Albertsons to create a new mega grocer to rival Kroger, in a great position. These chains’ neighborhood locations put them in an ideal position to cash in on this trend. This also explains why Wal-Mart is investing so heavily in its Neighborhood Market (grocery store) concept. The nation’s largest retailer doubled its investment in those stores in the last year. The nation’s largest retailer recognizes that supercenters might be a thing of the past.

The lesson for investors here is that traditional grocers are actually benefiting from the rise of online retail. As more and more shoppers go online for more of their purchases, the neighborhood grocery store is becoming a valuable piece of real estate.

Expect to see this trend accelerate in the years ahead and grocers’ revenues to expand accordingly. Also expect to see retailers that lack a strong online or neighborhood market presence such as Target to suffer and contract over the next few years.