The TJX Cos. Inc. beat analysts’ estimates on earnings and sales for the fiscal fourth quarter as customer traffic drove shoppers into the stores.

TJX, parent of TJ Maxx, Marshalls and Home Goods, reported net income of $666 million, or 99 cents in earnings per diluted share, topping the FactSet estimate of 94 cents a share. The company delivered net sales of $9 billion, an 8 percent increase over last year and beating the FactSet estimate of $8.7 billion.

“Once again, customer traffic drove our entire consolidated comp increase. It was also the primary driver of our comp increases at every division in the fourth quarter and full year as we continued delivering consumers a differentiated offering at extreme value,” said Ernie Herrman, chief executive officer and president of TJX.

For the full year, net sales increased 6 percent to $30.9 billion. Comparable-store sales increased 5 percent over last year’s gain of 2 percent. Last year was the company’s 20th consecutive year of increases in comp sales and earnings per share. The gross profit margin for the fourth quarter was 28.7 percent, up 0.5 percent versus the previous year.

TJX said total inventories at the end of January were $3.7 billion, a jump over last year’s $3.2 billion. The company also noted that it plans to take advantage of the opportunities it is seeing in the market to buy more goods.

Even with all that good news, TJX doesn’t expect fiscal 2017 to be easy. The forecast for the fiscal first quarter is expected to be flat over last year. Earnings per share are guided to the range of 68 to 70 cents, inline with last year’s 69 cents a share. For the full fiscal year of 2017, earnings per share are projected to be in the range of $3.29 to $3.38, which is roughly a 1 percent decrease to 2 percent increase over 2016.

The company said its wage initiative will negatively impact earnings growth by 3 percent in the first quarter. Foreign currency is expected to hurt the fiscal year by 4 percent.

“The year is off to a strong start and we have many initiatives planned to continue driving sales and traffic. Our business is very healthy, and similar to last year, our plans for earnings per share growth reflect the negative impact of foreign currency and our previously announced wage initiative,” Herrman said.