* JD.com revenue up 41 pct vs 36 pct expected by analysts
* JD Finance spinoff expected in Q2
* JD annual active customer accounts up 40 pct (Recasts, adds details of the results)
BEIJING, May 8 (Reuters) - JD.com Inc, China's second-largest e-commerce firm, said first-quarter revenue grew 41 percent from a year earlier, benefiting from a rapid expansion into goods like household supplies and food that has brought in new users.
Diversifying into data, cloud and artificial intelligence services amid fierce competition, the company also swung to a profit from a loss in the quarter.
"Margins benefited from our rapidly growing scale across all of our product categories," JD's Chief Financial Officer Sidney Huang said in a statement.
Quarterly revenue came in at 76.2 billion yuan ($11 billion), compared with an average estimate of 73.5 billion yuan from 14 analysts surveyed by Thomson Reuters. Active customer accounts increased by 40 percent to 237 million in the year ended March.
Net profit was 355.7 million yuan for the quarter, compared with a loss of 867.3 million yuan for the same period a year earlier.
It also said it expects the spinoff of its financial arm to be completed in the second quarter.
JD said in November that it would seek to split off the unit making it a fully Chinese-owned entity, allowing it to apply for licenses that Chinese laws forbid foreign-listed firms from holding, including mutual funds and securities.
Under the restructuring, CEO Richard Liu will be one of the buyers and JD.com will receive 40 percent of any pre-tax profit, an arrangement that bears similarities to the spinoff of Alipay from Alibaba in 2011, which has since been re-branded as Ant Financial.
JD expects second-quarter revenue to fall between 86.6-89.1 million yuan excluding JD Finance, representing a growth rate of 33-37 percent, in line with analyst predictions of 36 percent.
JD made a net profit of 0.17 yuan per American Depository Share in the first quarter, compared with a loss of 0.66 yuan a year earlier. ($1 = 6.9030 Chinese yuan) (Reporting by Cate Cadell in Beijing and Ismail Shakil in Bengaluru; Editing by Randy Fabi and Edwina Gibbs)