Target on Tuesday posted same-store sales growth of 3.4 percent during the holiday season, topping an expected range of 0 to 2 percent, and raised its fourth-quarter and full-year earnings outlook.

The news comes as retailers across the board, including American Eagle Outfitters, Lululemon, Kohl's and J.C. Penney, are benefiting from stronger consumer confidence, lower unemployment and higher wages.

Target's stock gained more than 3 percent Tuesday morning on the news.

"As we look ahead to 2018, we will build on the foundation we established this year by launching additional exclusive brands, enhancing our digital capabilities, opening approximately 30 small-format stores and tripling the size of our remodel program to more than 325 stores," CEO Brian Cornell said in a statement.

The company said tax reform legislation should create additional cash flow in 2018 it will use for capital investments, dividends and share repurchases. The new tax laws will also boost Target's profits, similar to an announcement Macy's made earlier this week.

Target now expects fourth-quarter adjusted earnings per share to fall within a range of $1.30 to $1.40, compared with a prior range of $1.05 to $1.25. For fiscal 2017, Target is calling for adjusted earnings per share of $4.64 to $4.74, compared with previous estimates of $4.40 to $4.60.

Target said fourth-quarter comparable sales should climb closer to 3.4 percent, compared with a prior estimate of 2 percent growth. That would mean fiscal 2017 comparable sales rise a little more than 1 percent, compared with a prior forecast calling for as much as 1 percent.

Same-store sales during the November-December months in home, apparel, food and beverage, hardlines and essentials categories all accelerated from the third quarter, Target said.

The company said online sales are on track to grow more than 25 percent in 2017, marking the fourth year Target's digital business surpasses that milestone.

With one eye on e-commerce, Target has also invested more in its stores, pouring money into both renovating existing locations and rolling out a fleet of smaller-format stores in urban markets. Cornell said Tuesday that Target's stores fulfilled 70 percent of all digital orders during the holiday season.

"We've positioned our stores at the center of a continually expanding suite of convenient fulfillment options," he said.

Just last month, Target announced plans to acquire grocery delivery service and Instacart competitor Shipt, with the goal of offering same-day delivery of groceries, home furnishings, electronics and other products, starting as early as this year. Target also recently bought transportation technology company Grand Junction, expanding its last-mile fulfillment capabilities.

"Digital was an undoubted success with robust online growth underpinning performance," GlobalData Retail Managing Director Neil Saunders wrote in a note to clients.

"However, we also think Target needs to make stores more compelling so that those customers collecting items in shops browse and buy more while doing so," Saunders said.

Target shares are down about 2.5 percent from a year ago.