Source: Walmart.

If you read the headlines about Wal-Mart Stores (WMT -1.75%), then you've likely read about its target customer not spending as much due to reduced government benefits and higher taxes. These are surely negatives. Fortunately, Wal-Mart is setting itself up for future success with its small-box stores and e-commerce growth. Let's focus on the latter.

E-commerce growth
Wal-Mart's e-commerce sales increased 30% in fiscal year 2014 to more than $10 billion. The primary reasons for this growth included 13 e-commerce acquisitions over the past three years, price optimization tools, and improved mobile applications.

In regard to acquisitions, in order to compress data and improve website speeds, Wal-Mart acquired the following companies in 2013: Torbit, OneOps, Tasty Labs, and Inkiru. In 2012, it acquired a 51% interest in Newheight Holdings, which owns Yihaodian.com -- an online Chinese retailer.

In the first quarter, Yihaodian's traffic increased in the triple digits year over year, with the average ticket increasing thanks to sales of food and general merchandise. Yihaodian sells more than 3 million items online, and it sold more than 1 million liters of imported milk in a 24-hour period, which was a Guinness World Record. This is a testament to the strength of Yihaodian's supply chain. Yihaodian also generated $1.89 billion in sales in 2013 -- approximately 19% of overall Wal-Mart China sales. 

Wal-Mart also acquired Stylr, an app that allows shoppers to locate clothes in nearby stores. And it will roll out Pangaea, a global e-commerce platform that aims for streamlined functionality, later this year.

Wal-Mart's e-commerce sales increased 27% in Q1 2015 over the year-ago quarter.  However, let's go back to 2013, which provides a bigger sampling, and compare it to other big retailers that are competitive threats.

E-commerce competition
According to InternetRetailer.com, in 2013, U.S. e-commerce sales increased about 16.9%, while total retail sales increased approximately 3.7%. These stats are only domestic, but the trend is obvious: E-commerce sales are growing faster than total retail sales.

Amazon.com (AMZN 1.30%) is far and away the largest online retailer in the world. Its e-commerce sales totaled $67.8 billion in 2013 -- more than its next 10 competitors combined. From a distance, this would make you think that Amazon is invincible. While that might be true, Amazon's e-commerce sales "only" increased 20% in 2013, whereas Wal-Mart's e-commerce sales during the same period increased 30%. Wal-Mart also has more free cash flow to commit to this initiative:

AMZN Free Cash Flow (Annual) Chart

Amazon Free Cash Flow (Annual) data by YCharts.

Then again, Amazon doesn't have 11,000 physical stores to worry about in regard to capital investments.

InternetRetailer.com ranked Wal-Mart No. 4 in e-commerce by sales in 2013. Amazon is still well ahead of all threats at No. 1, but Wal-Mart is a rising threat, and it's well ahead of Target (TGT -0.36%), which was ranked No. 18 for 2013.

Target has implemented several initiatives to improve its online presence. These include a streamlined digital-checkout process, improved product information and images, and enhanced in-store mobile features. Target's savings app, Cartwheel, also allows customers to bring digital coupons into stores. Will it matter? 

If you're looking at these two companies in a broader sense in regard to investment consideration, then note that Wal-Mart has consistently delivered a higher return on invested capital than Target:

WMT Return on Invested Capital (TTM) Chart

Wal-Mart Return on Invested Capital (TTM) data by YCharts.

If you're thinking that Wal-Mart might have a shot at stealing the No. 1 e-commerce spot from Amazon in the future, then you might be asking for too much. Not only would Wal-Mart have to catch Amazon, but it would have to pass Apple (AAPL 0.64%), which took the No. 2 spot from Staples in 2013. 

Apple's online sales increased 24% to $18.3 billion in 2013. In addition to digital sales from the App Store and iTunes, Apple began selling hardware online for the first time. This is what led to the increased growth. While Wal-Mart is good at generating free cash flow, which can help lead to future growth opportunities, Apple is in another league:

WMT Free Cash Flow (Annual) Chart

Wal-Mart Free Cash Flow (Annual) data by YCharts.

Therefore, it's unlikely Wal-Mart will be capable of catching Apple in e-commerce sales at any point in the near future. For instance, Wal-Mart expects its e-commerce sales to surpass $13 billion in fiscal year 2015. This is a big jump from last year, but still nowhere near Apple ($18.3 billion last year) or Amazon ($67.8 billion last year), for that matter.

The Foolish conclusion
Wal-Mart might not be a dominant e-commerce retailer, but it's growing quickly. With consistent positive free cash flow generation, Wal-Mart should be able to invest more in this growth avenue going forward, which should lead to a positive compounding cycle. Given Wal-Mart's impressive history of return on invested capital, it's likely that Wal-Mart will succeed in its e-commerce initiative. Taken together, the above information is a positive for Wal-Mart investors.