(Adds segment details, shares; compares with estimates)
Nov 1 (Reuters) - China's Alibaba Group Holding Ltd reported a better-than-expected 40% rise in second-quarter revenue on Friday, powered by strong growth in its e-commerce and cloud computing businesses.
The company's U.S.-listed shares rose more than 2% to $180.25 in trading before the bell.
Alibaba primarily earns by selling advertising and promotional services to third-party merchants that list products on Taobao and Tmall, two of its e-commerce sites.
The biggest Chinese e-commerce company and rival JD.com Inc have been looking to diversify as online sales slow amid saturated markets in China's biggest cities and consumer confidence takes a hit from the ongoing U.S.-China trade war.
Sales from the company's e-commerce business rose about 40% to 101.22 billion yuan, while its cloud computing business posted a 64% jump in revenue to 9.29 billion yuan.
Total revenue rose to 119.02 billion yuan ($16.91 billion) in the second quarter ended Sept. 30 from 85.15 billion yuan a year earlier. Analysts were expecting revenue of 116.8 billion yuan, according to IBES data from Refinitiv.
The company's net income attributable to ordinary shareholders rose to 72.54 billion yuan from 20.03 billion yuan, a year earlier due to a one-time gain related its stake in Ant Financial.
Excluding items, Alibaba earned 13.10 yuan per American Depository Share. Analysts were expecting 10.65 yuan per ADS, according to IBES data from Refinitiv.
$1 = 7.0384 Chinese yuan renminbi Reporting by Akanksha Rana in Bengaluru and Josh Horwitz in Shanghai Editing by Saumyadeb Chakrabarty