Earlier this week, TJX Companies (TJX 0.64%) reported record sales for the final quarter of its 2022 fiscal year, lifted by strong consumer demand. However, the off-price giant's profit slipped, compared to pre-pandemic levels, due to severe cost headwinds.

As a result, TJX stock fell to a 52-week low following the earnings report, ending the day down 4% on Wednesday. This marks a 19% decline from the all-time high reached in early January. Considering TJX's excellent long-term growth prospects, this pullback looks like a great buying opportunity.

Double-digit sales growth continues

TJX reported robust sales growth throughout fiscal 2022. Excluding stores that were temporarily closed due to pandemic-related restrictions, comparable sales rose 16%, compared to fiscal 2020 -- i.e., the year before the pandemic -- in the first quarter, 20% in the second quarter, and 14% in the third quarter.

TJX Revenue (TTM) Chart

TJX Companies TTM revenue, data by YCharts. TTM = trailing 12 months.

The strong sales trends continued last quarter, as open-only comp sales rose 10% from two years earlier, including a 13% gain in the U.S. (Shopping restrictions in TJX's international markets led to flattish comp sales there in Q4.) Total sales rose 13.5% over the same period.

Continuing the trend from recent quarters, TJX's HomeGoods unit led the company with a 22% comp-sales gain in Q4. Still, HomeGoods' growth moderated, compared to the rest of fiscal 2022: The unit posted a 34% comp-sales increase in the third quarter and even stronger growth in the first half.

Margin pressure hits hard

Despite TJX's solid sales last quarter, earnings per share (EPS) slipped to $0.78 from $0.81 two years earlier, as the off-price retailer's pre-tax margin fell to 9% from 10.9%. This result fell well short of the analyst consensus of $0.91.

Management attributed the margin pressure primarily to sky-high freight costs and investments in distribution capacity and wage increases. Those factors negatively impacted TJX's pre-tax margin by 4.4 percentage points. Higher-than-expected shrink (the cost of lost and stolen merchandise) and incremental costs related to the pandemic also contributed to the company's margin contraction.

Notably, despite its stellar growth, the HomeGoods unit experienced greater margin pressure than the company as a whole. It recorded an 8.4% segment margin, down by 4 percentage points from the two previous years. Surging freight costs likely had a particularly severe impact on HomeGoods' profitability, as home merchandise tends to be bulky relative to its value.

The exterior of a HomeGoods store.

Image source: Author.

Don't worry about the short-term pain

For the current year (fiscal 2023), TJX expects to post 3% to 4% comp-sales growth in the U.S. Management is planning for total sales between $52.6 billion and $53.1 billion, up roughly 8% to 9% year over year.

The company didn't provide formal earnings guidance but said it expects to come close to the 9.6% full-year pre-tax margin it logged in fiscal 2022. This suggests that TJX should at least match (and most likely exceed) the adjusted EPS of $2.85 it posted last year.

Looking further ahead, margins should return to pre-pandemic levels or better within a few years. Management is optimistic about TJX's ability to offset higher labor costs with higher pricing while continuing to offer sizable discounts relative to competitors like department stores. Meanwhile, it expects freight costs to subside over the next year or two.

Highlighting management's confidence, TJX continues to expand its HomeGoods unit at a rapid pace, despite its near-term margin weakness. The company plans to open 60 new HomeGoods and HomeSense stores in the U.S. this year, increasing the store count by nearly 7%. It's also adding distribution capacity for the fast-growing home-furnishings chains.

In the past, TJX has periodically accepted temporary margin contraction to keep its growth trajectory intact. That's a big reason why it has more than doubled its revenue over the past decade. Similarly, the current margin pressure is likely to be temporary but will support permanent market-share gains. That makes TJX stock look like a bargain for long-term investors following its recent dip.