Dollar Tree (DLTR) beat Wall Street's fourth-quarter earnings expectations but said Wednesday it will close as many as 390 Family Dollar Stores this year and re-brand 200 others to Dollar Tree Stores.

Dollar Tree reported a fourth-quarter loss of $2.31 billion, or $9.66 a share, compared with a profit of $1.04 billion, or $4.37 a share, a year earlier, as the retailer recorded a $2.73 billion goodwill impairment charge related to the Family Dollar business.

Adjusted earnings for the quarter were $1.93 a share, up from $1.89 a share a year ago and ahead of analysts' expectations of $1.92. Sales for the quarter totaled $6.21 billion, compared with $6.36 billion a year ago. Wall Street was looking for $6.2 billion in sales.  The company said it recorded a $13 million charge in the fourth quarter to write down certain store assets, including $6.1 million associated with impairment of favorable lease rights.

Same-store sales increased 2.4% during the fourth quarter, beating analysts' forecasts of 1.5%. Same-store sales at Family Dollar rose 1.4% , while the Dollar Tree brand increased 3.2%  in the quarter.

Full-year sales increased 2.6% to $22.82 billion from $22.25 billion a year ago.  Same-store sales for the Dollar Tree banner increased 3.3%, same-store sales for the Family Dollar banner increased 0.1%.

Looking ahead, Dollar Tree said it expects first-quarter revenue ranging from $5.74 billion to $5.85 billion, with earnings a share in the range of $1.05 to $1.15. Analysts' are looking for revenue of $5.81 billion. 

Shares of Dollar Tree were up 3.62% to $98.93 in trading Wednesday.

For the full year, the company said it expects consolidated net sales to range from $23.45 billion to $23.87 billion, while Wall Street is looking for sales of $23.89 billion. Earnings are expected to range from $4.85 to $5.25 a share, and includes discrete costs of about $95 million, or 31 cents a share. Earnings per share in fiscal 2019 are burdened by roughly 18 cents a share due to the expected tax rate being 22.6% instead of 19.9%, excluding the goodwill impairment charge, in fiscal 2018. The company expects a low single-digit increase in same-store sales and approximately 1.0% square footage growth.