Amazon posted better-than-expected third-quarter sales on Thursday, sending its shares 5 percent higher.
The world’s largest retailer posted revenue of $17.1 billion in the third quarter, up from $13.8 billion a year earlier. Analysts had expected it to post sales of $16.8 billion on average.
Amazon is trying to turn itself from an online retailer into a broader technology company offering gadgets like tablets to consumers and cloud computing services to corporations and governments.
The evolution has entailed big investments in technology, content from videos to music, and all while building distribution centers across the United States and expanding in competitive overseas markets such as China.
It is spending billions of dollars on this expansion, which has taken a toll on earnings. But investors believe the move will pay off as spending tapers and margins expand.
Net loss was $41 million in the third quarter, or $0.09 per diluted share, narrowing from a net loss of $274 million, or $0.60 per diluted share, in the third quarter of 2012.
Shares in the company have gained 30 percent this year. It is now valued at 131 times 2014 earnings, among the highest in the market. In after-hours trading on Thursday, Amazon shares climbed to about $350 from a close of $332.21 on the Nasdaq.