In the past five years, T.J. Maxx parent TJX (NYSE:TJX) and Ross Stores (NASDAQ:ROST) have posted consistent comparable-store sales growth. Both companies have mastered the off-price retail business model, whereas traditional retailers -- especially mall-based chains -- have struggled in the face of rising competition from (NASDAQ:AMZN).

However, a widespread panic about Amazon's growth has swept across the retail landscape in the past year. It has pulled down even off-price retailers like TJX and Ross Stores that seem to be relatively Amazon-proof. Shares of TJX now sit about 18% below their 52-week high; Ross Stores stock is more than 20% below its 52-week high.

TJX Chart

TJX vs. Ross Stores stock performance; data by YCharts.

This panic selling isn't justified by either retailer's financial performance or outlook. As a result, the recent pullback in TJX and Ross Stores shares is a great buying opportunity for long-term investors.

Strong long-term track records

Both TJX and Ross Stores have long track records of comp sales growth. At TJX, comp sales increased by 5% in each of the past two years (fiscal 2016 and fiscal 2017), following a 2% gain in fiscal 2015. Ross Stores has produced similarly strong sales trends, with comp sales rising at a compound annual growth rate of about 4% over the past five years.

TJX and Ross Stores are also adding stores at a steady pace. At the beginning of this fiscal year, TJX had 3,812 stores in operation, up from 3,050 four years earlier. Meanwhile, Ross Stores had 1,533 stores, up from 1,199 four years earlier.

The combination of expansion and comp sales growth has led to impressive revenue growth at TJX and Ross Stores. Both companies have increased their revenue by about 40% in the past five years alone. Earnings per share have grown at an even faster rate, with Ross Stores posting a particularly impressive 81% increase in EPS over the past five years.

TJX Revenue (TTM) Chart

TJX vs. Ross Stores revenue and EPS growth; data by YCharts.

Are the off-price giants running out of momentum?

Most of the declines in TJX and Ross Stores shares have come since they released their first-quarter earnings reports in May. While Ross Stores produced a solid 3% comp sales increase last quarter, comp sales growth decelerated to 1% at TJX.

At first glance, this might seem to support bears' fears that is finally starting to undermine TJX's growth. However, TJX was facing a very tough year-over-year comparison, having posted a stellar 7% comp sales increase in the prior-year quarter. It also had to contend with unfavorable weather trends during Q1, particularly in the northern part of the United States.

Even with this slower comp sales growth, TJX was still able to grow EPS about 8% year over year last quarter. EPS growth should accelerate later this year, as wage growth will slow and TJX will lap some of its recent investments in new distribution centers. For the full year, analysts currently expect EPS to rise 10% at TJX and nearly 12% for Ross Stores.

Plenty more growth ahead

Thus far, TJX and Ross Stores have shown no measurable vulnerability to disruption by Amazon. In fact, Ross Stores has thrived despite not even having an e-commerce site. Off-price retailers have very low costs, and they drive a steady flow of customer traffic by quickly reacting to consumer trends and shipping new merchandise to stores every week.

A Ross Dress for Less store

Ross Dress for Less still doesn't sell any merchandise online. Image source: Ross Stores.

Furthermore, the two off-price giants have long runways for growth, with opportunities to expand their store bases by 50% or more over time.

Despite these considerable long-term growth prospects, TJX and Ross Stores shares are now valued at a discount to the broader market. TJX stock trades for about 18 times the company's projected earnings for the current fiscal year; Ross Stores shares are slightly cheaper, at about 17 times current-year earnings.

These bargain valuations aren't likely to last long. Investors should consider adding shares of these two retail leaders to their portfolios while they're still cheap.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.