Target’s profits plunged in the final months of its fiscal year as the company absorbed the twin blows of a nightmare data breach that drove shoppers from its stores, and losses tied to its rocky expansion in Canada.

Frigid temperatures punishing its northern markets didn’t help.

The nation’s No. 2 discount retailer pledged to win back customers as it released year-end earnings Wednesday, and investors appear to have moved beyond the shocking hacker attack.

Shares of the discount giant jumped after Target said it expects to perform in line with Wall Street expectations for 2014, minus unknown costs from the hacker attack, through aggressive cost-cutting and working out the merchandising kinks in Canada.

Unlimited Digital Access. $1 for 4 weeks.

Target shares gained more than 7 percent Wednesday to close at $60.49.

The Minneapolis-based retailer offered a particularly optimistic outlook for Canada, saying it expects sales there to double in 2014.

“We’ve definitely got to up our game on all fronts,” Target CEO Gregg Steinhafel told analysts. “We’re going to deliver … just some eye-popping irresistible deals.”

The company wasn’t able to give a longer-term estimate of breach-related costs, as investment analysts hoped. In its first attempt to quantify damage from the attack, which hit in the middle of the crucial holiday shopping season, it said it spent $61 million in the fourth quarter, and that it expects insurance to cover about $44 million of it.

The company posted profits of $520 million, or 81 cents per share, for the fourth quarter ended Feb. 1. That beat the consensus Wall Street estimate of 79 cents a share, but was down 46 percent from $961 million, or $1.47 a share, in the same period a year ago.

Overall sales of $21.5 billion fell 3.8 percent from a year earlier, with same-store sales down 2.5 percent, in line with the company’s guidance in early January after the news of the cyberattack affected holiday store traffic.”

For the year, Target earned $1.97 billion — down 34 percent from 2012 — or $3.07 per share.

While the data breach generated bigger headlines, the losses at the more than 100 stores Target opened in Canada last year had a bigger effect on its bottom line. Target said its fourth-quarter profit was reduced by 40 cents a share because of the Canadian stores. The data breach reduced profits by about 20 cents a share.

Altogether, it lost $941 million in Canada for the full year.

The total cost of the breach to Target may not be known for years, given litigation, and could reach into the hundreds of millions of dollars.

Banks and credit unions across the country estimate they have spent more than $200 million as of February reissuing credit and debit cards for customers, costs they clearly intend to try to recoup from Target.

Much depends on the outcome of the investigations into the attack on Target’s network.

A key question is whether Target failed to comply with basic payments industry standards for handling cardholder data.