Shares of The TJX Companies, (TJX 0.98%) were slammed this week after the company missed its earnings guidance for the first time in several years. The stock had been trading for more than $58 before the earnings report came out on Tuesday, and fell to $54 by the end of the day.

TJX Chart

The TJX Companies, YTD Stock Chart, data by YCharts

The sell-off was a big overreaction, and it has left TJX shares more than 10% below their highs from early 2014. This has created an opportunity for long-term investors to snap up shares at a bargain price -- which is exactly what I did on Tuesday.

Steadily gaining share
TJX has a higher earnings multiple than most department stores, such as Macy's (M -1.52%). Whereas Macy's currently trades for around 13 times its expected earnings for this year, TJX trades for almost 18 times expected current-year earnings.

Macy's is a great company in its own right, but TJX is worth a significant premium due to its superior growth potential. Comparable store sales declined at Macy's last quarter, although the company expects growth of 2.5%-3% for the full year.

Low single-digit sales growth is the best that Macy's shareholders can hope for

Total sales growth will be very similar to comparable store sales growth at Macy's, because it isn't expanding. The company has plans to open 3 new stores and relocate another one this fall, but it also closed 5 stores earlier this year. Macy's CFO Karen Hoguet recently told investors to expect a similar pattern in the future -- Macy's will invest in high-performing stores, but it will continue to close weaker ones.

By contrast, TJX is growing at a healthy clip. Comparable store sales grew just 1% last quarter, but total sales rose by 5%. That's because TJX has been steadily adding new stores -- it increased its total square footage by about 5% last year. Solid sales growth has allowed TJX to meet (and exceed) its target of a double-digit long-term EPS growth rate.

TJX will keep crushing department stores
In the long run, TJX will continue to win market share from department stores like Macy's. The off-price business model gives it 3 key advantages: 1) lower prices; 2) lower up-front capital costs; and 3) convenience.

TJX has 3 big weapons that will help it keep gaining market share from department stores

Low prices are the key to TJX's success. Its 3 major U.S. chains -- T.J. Maxx, Marshalls, and HomeGoods -- put value at the center of their messaging. By buying opportunistically rather than offering consistent, full collections (as a department store like Macy's would) TJX can offer better prices on the same merchandise.

TJX is also more nimble than most department stores because its stores require less up-front capital investment. Mid-range and upscale department stores need to spend lots of money to make new stores look attractive -- and then they periodically need to invest more money to renovate them.

TJX has lower capital requirements because its stores have a "stripped-down" look compared to department stores. Macy's and TJX are similar in size today, and both companies are spending about $1 billion annually on CapEx. However, TJX is growing its store count by about 5% annually on that budget, whereas Macy's is not growing at all!

TJX sees plenty of room for long-term growth in its store footprint

Lastly, TJX can offer superior convenience with its smaller and more numerous stores. Macy's is the largest department store chain in the U.S. by sales, and it has fewer than 850 stores. By contrast, TJX operates about 2,500 stores in the U.S. across its 3 major nameplates, and expects to grow that store fleet to nearly 4,000 stores in the long run.

Foolish bottom line
Compared to department store competitors like Macy's, TJX typically offers lower prices and more convenient locations. Moreover, low capital requirements for each store will enable TJX to continue expanding, becoming even more convenient and improving its purchasing scale. Thus, TJX is well positioned to continue gaining market share at the expense of department stores.

One bad quarter at TJX is no reason for investors to go running for cover. The company expects faster sales growth this quarter, as Q1 sales were depressed by bad weather in the northern U.S. and it is spending more on marketing.

Based on TJX's long-running track record of meeting and beating its guidance, it's unlikely that last quarter's slower growth is indicative of any broader problems. At 18 times earnings, TJX's valuation is roughly in-line with the broader market despite its superior growth potential. That makes it a great bargain for investors today.