Two of the biggest mass-merchandise retailers, Wal-Mart (WMT -0.65%) and Target (TGT 1.28%), are often seen as competitors, even though they target different demographics. Target is best known for its "cheap chic" product line, which often includes tie-ups with designers. It focuses on categories like kids and wellness and tends to target urban millennials.

Wal-Mart, on the other hand, tends to draw lower-income consumers and has most of its stores in suburban and rural parts of the country, especially across the South. More than half of its sales come from grocery. Both of these stocks have struggled in recent years as the bulk of the gains in retail have gone to companies like Amazon.com and Costco Wholesale. Wal-Mart and Target aren't standing still as the retail landscape changes -- both have made investments in e-commerce and adapted their physical store strategy.

Let's take a closer look at how each company is doing to see which is the better buy today.

An investor checks pie charts with a pen

Image source: Getty Images.

A whole new Wal-Mart

Wal-Mart has made several changes in the last two years to revamp the company and bring back sales growth. It raised its base wage to $9/hour last year and $10/hour this year, a move that will cost it $2.7 billion annually. The company expects profits to fall this year due in part to that investment, but it's helped drive same-store sales up for nine quarters in a row. In the third quarter of this year, comparable sales grew 1.2%.

On the e-commerce front, it also made a splash with its $3.3 billion acquisition of Jet.com earlier this year. Management hopes the deal will jump start online sales at Wal-Mart, thanks to Jet.com's "smart basket" technology, which lowers prices based on decisions customers make like foregoing returns or paying with a debit card.

Jet Founder Marc Lore has also agreed to stay at the retailer for five years, and he's begun putting his own imprint on the company; several former e-commerce executives are leaving Wal-Mart, and he's brought in his exec from Jet.  

In the third quarter, Wal-Mart's e-commerce sales jumped 21%, its best performance in over a year, and contributed 50 basis points to comparable sales growth. Looking ahead, the company is scaling back on new store openings to focus on e-commerce and improving its current fleet of stores. It's also found success with its grocery pickup program, which allows customers to order groceries on the internet and pick them up from a parking lot kiosk. Those investments are expected to return the company to profit growth by 2018.

An investor checks business stats on his computer

Image source: Getty Images.

Trying to hit the bullseye

Target shares skyrocketed earlier this week after its earnings report came out, but the 7% jump was more the result of lowered expectations rather than strong results. Same-store sales fell for the second quarter in a row, but did better than expectations, dropping 0.2% against estimates of a 1.1% slide. There were other promising signs, including a 22% increase in adjusted earnings per share, and the company raised its full-year guidance, though that came after lowering it in the previous report. Online sales were up 26% in the quarter, but the company sees comparable sales roughly flat for the holiday quarter.

While Target is executing in its Signature Categories, which include baby, home, and wellness, with 3% comparable sales growth, it's struggling elsewhere. Its entry into groceries has been plagued by low-volume sales, resulting in spoilage, and the company has been raising prices at a time when many of its competitors are lowering them. In fact, it promised to do a better job on implementing the second half of it "Expect More. Pay Less" slogan.

The retailer has also seen several executives leave recently in what could be a sign of discord in the C-suite. Management plans to open hundreds of small-format stores in cities, and opened 10 such stores in the last quarter. Those could reach an untapped market, but competitors, namely Wal-Mart, have been unable to pull off such a transition. CEO Brian Cornell expressed confidence in the strategy, but driving traffic to its current store fleet will continue to be the key determinant of the company's success.

And the winner is...

Both companies are fighting uphill battles as the retail landscape shifts, and the two stocks offer similar valuations and dividend yields. However, Wal-Mart seems to have a better strategy for long-term growth. Its acquisition of Jet.com and expansion of grocery pickup should help fuel e-commerce sales, and investments in stores should keep comparable sales increasing.

Target may perform better in the near term as Wal-Mart is still forecasting flat earnings growth next year, but over the long term I'd expect Wal-Mart to be the better buy of the two.