Off-price retailers have been taking advantage of a strong consumer spending environment all year, posting strong sales gains. On Tuesday morning, TJX Companies (TJX -0.64%) and Ross Stores (ROST 0.45%) confirmed that this trend continued in the third quarter, as both companies delivered solid growth.

That said, TJX's third-quarter numbers easily surpassed its smaller rival's performance. As a result, while both stocks got pummeled on Tuesday in the midst of a broader stock market rout, TJX stock held up much better.

TJX Price Chart

TJX and Ross Stores Tuesday Stock Performance, data by YCharts.

TJX delivers stellar sales again

Earlier this week, I noted that TJX was in good position to achieve high single-digit comp sales growth in the third quarter. Consumer sentiment has been strong, several major retailers have gone out of business or closed large numbers of stores this year, and TJX was facing a very easy year-over-year comparison.

Sure enough, the leading off-price retailer reported 7% comp sales growth for the third quarter. That included a 9% increase at domestic T.J. Maxx and Marshalls stores and a 7% comp sales gain for the HomeGoods chain. TJX posted more modest comp sales increases of 5% and 3% in Canada and its other international markets, respectively.

The strong performance in the U.S. helped drive a 12% increase in TJX's total sales for the third consecutive quarter. As a result, pre-tax income rose 6.1% to $1.08 billion, excluding a one-time pension settlement charge, despite headwinds from rising freight and labor costs. Adjusted earnings per share reached $0.63, beating the average analyst estimate of $0.61. That was up from just $0.50 a year ago, driven mainly by tax reform.

Looking ahead, TJX said that full-year EPS is on track to come in between $2.43 and $2.45, excluding the $0.02-per-share pension settlement charge. That represents a slight increase over its prior outlook, adjusted for a recent stock split. However, analysts are expecting EPS of $2.47.

Ross Stores continues its steady performance

For the third quarter, Ross Stores reported a more moderate 3% comp sales increase and a 7% rise in total sales. While these sales results were a good deal weaker than what TJX reported, difficult comparisons accounted for much of the discrepancy. Whereas TJX posted flat comp sales in the year-ago period, Ross Stores had achieved a solid 4% comp sales gain.

The exterior of a Ross Dress for Less store.

Ross Stores was facing a tough year-over-year sales comparison last quarter. Image source: Ross Stores.

Like its larger rival, Ross Stores pointed to rising wages and freight costs as significant earnings headwinds. As a result, pre-tax earnings ticked up just 0.7% last quarter. Nevertheless, EPS surged to $0.91 from $0.72 a year earlier, primarily due to tax reform. This came in just ahead of the average analyst estimate of $0.90.

Ross Stores increased its EPS forecast for the fourth quarter by $0.07 compared with its previous outlook -- to a new range of $1.09 to $1.14 -- due to an expected one-time tax gain. Adjusting for the tax gain, that's a little below the average analyst estimate of $1.08.

The sell-offs are misguided

Shares of TJX and Ross Stores have now fallen significantly from the all-time highs they reached just two weeks ago. Given that sales growth isn't a problem, it appears that investors are very concerned about the two companies' rising costs.

It's true that both companies are facing margin compression on a pre-tax basis right now. In addition, the tailwind from tax reform is about to disappear at the end of this year.

However, rising labor costs and rising freight costs are both symptoms of a strong economy. As a result, TJX and Ross Stores should be able to offset much of the current cost pressure through a combination of higher sales growth and fewer markdowns.

Investors aren't seeing the benefit of faster sales growth in either company's earnings forecast, because TJX and Ross Stores tend to give very conservative guidance. Both companies are likely to outperform their forecasts for the fourth quarter and the upcoming year, continuing a multiyear run of strong sales and earnings growth.