Adam Orvos
Executive Vice President and Chief Financial Officer at Ross Stores
Thank you, Barbara. As previously mentioned, our comparable store sales were down 7% for the quarter as a decline in the number of transactions versus the prior year was partially offset by an increase in the size of the average basket. Second quarter operating margin was 11.3% compared to 14.1% in 2021. This decline was due to a combination of deleveraging effect on expenses from the decrease in same-store sales, higher markdowns and ongoing headwinds from higher freight costs that did not begin to escalate until the second half of 2021. These expense pressures were partially offset by lower incentive costs that were much higher last year when we significantly outperformed our plans.
We also saw a decline in COVID expenses versus last year's second quarter. Cost of goods sold during the period increased by 320 basis points. Merchandise margin declined 205 basis points due to both higher ocean freight costs and markdowns. Distribution costs increased 85 basis points due to a combination of unfavorable timing of packaway-related expenses and deleverage from our new distribution center, while occupancy and domestic freight rose by 55 and 35 basis points, respectively. Partially offsetting these higher costs were buying expenses that improved by 60 basis points, again due to lower incentives.
SG&A for the period levered by 40 basis points as deleverage from the lower comparable sales was more than offset by lower incentive and COVID costs. During the second quarter, we repurchased 2.9 million shares of common stock for an aggregate cost of $235 million. As previously announced, we expect to buy back $950 million of common stock during fiscal 2022 under our two-year $1.9 billion repurchase program that extends through fiscal 2023.
Now let's discuss our outlook for the remainder of 2022. As Barbara noted in today's press release, given our recent results as well as the increasingly unpredictable macroeconomic landscape in today's more promotional retail environment, we believe it is prudent to adopt a more conservative outlook for the balance of the year. We are now forecasting comparable sales for the 13 weeks ending October 29, 2022, to decline 7% to 9% on top of a strong 14% gain last year. For the fourth quarter, same-store sales are planned to be down 4% to 7% versus a 9% increase in the last quarter of 2021.
As noted in our press release, if the second half performs in line with these updated sales assumptions, earnings per share for the third quarter is projected to be $0.72 to $0.83 versus $1.09 last year and $1.04 to $1.21 for the fourth quarter compared to $1.04 in 2021. Based on our first half results and second half guidance, earnings per share for fiscal 2022 are now planned to be in the range of $3.84 to $4.12 versus $4.87 last year.
Now let's turn to our guidance assumptions for the third quarter of 2022. Total sales are forecasted to decline 4% to 7% versus the prior year. We expect to open 41 locations during the quarter, including 29 Ross and 12 dd's DISCOUNTS locations. Operating margin for the third quarter is planned to be in the 7.8% to 8.7% range versus 11.4% in 2021, primarily reflecting the deleverage on the same-store sales decline. In addition, merchandise margin is forecast to be pressured by ongoing increases in ocean freight costs. We are also projecting higher markdowns to right-size our inventory levels given the lower revenue forecast and adjust pricing as we expect an increasingly promotional retail environment.
Lastly, third quarter operating margin also reflects unfavorable timing of packaway-related costs. Interest expense is estimated to be approximately $400,000. The tax rate is projected to be about 24% to 25% and diluted shares outstanding are expected to be approximately 345 million.
Finally, I want to emphasize that Ross continues to be in a strong financial position with significant resources to manage through today's challenging economic and retail landscape. Our healthy balance sheet includes $5.2 billion in total liquidity with $3.9 billion in cash and $1.3 billion in untapped borrowing capacity. We also continue to return large amounts of cash to stockholders with a cumulative total of $1.4 billion expected to be paid out under our stock repurchase and dividend programs in 2022.
Now I will turn the call over to Barbara for closing comments.