(Compares with analyst estiamtes, adds details on Q4 results)
Feb 22 (Reuters) - First Solar Inc reported a lower-than-expected loss in the fourth quarter on Thursday as the largest U.S. solar panel maker sold more solar modules to corporate and utility customers.
However, the company's 2017 net sales missed its forecast and it lowered the gross margin outlook for 2018, sending the shares down 4.3 percent to $63.41 in after-market trading.
The company reported 2017 full-year net sales of $2.94 billion, below its forecast of $3 billion to $3.1 billion.
First Solar said it expects 2018 gross margin forecast to be in the range of 21.5 percent to 22.5 percent, down from its prior forecast of 22 percent to 23 percent.
The solar panel maker, however, raised 2018 earnings per share forecast to between $1.5 and $1.9 from $1.25 to $1.75.
Demand for solar modules in the United States remained strong due to the government's policy that allows taxpayers to deduct 30 percent of solar installation charges from federal taxes.
The company's net loss narrowed to $432.45 million, or $4.14 per share, in the quarter ended Dec.31, from $750.79 million, or $7.22 per share, a year earlier.
First Solar said it booked a charge $408 million due to changes in the U.S. tax law.
Excluding items, the company lost 25 cents per share, beating the average analyst estimate of 31 cents per share, according to Thomson Reuters I/B/E/S.
Net sales rose 2.5 percent to $339.18 million. (Reporting by Taenaz Shakir in Bengaluru; Editing by Arun Koyyur)