* Shares rise in after-hours trade
* Forecasts sales of up to $26.5 bln in second quarter
Oct 24 (Reuters) - Amazon.com Inc posted a narrower quarterly loss and grew sales by a better-than-expected 24 percent on Thursday as it expanded aggressively at home and made inroads overseas, sending its shares up 8 percent.
The revenue performance indicated strong momentum of the world's largest Internet retailer going into the crucial U.S. holiday season, which some experts say could be the slowest in years.
Rival Ebay Inc gave a disappointing holiday forecast last week, saying the U.S. economic environment, including consumer confidence, had deteriorated in part because of the U.S. government shutdown.
Amazon forecast sales of between $23.5 billion to $26.5 billion, which analysts called conservative.
"It'll be a somewhat difficult macro environment in the fourth quarter," said Morningstar analyst R.J. Hottovy. "But it looks like the revenue momentum will continue into the fourth quarter."
Much of that growth came from its home market, where net sales leapt 31 percent to $10.3 billion as a faster delivery by a growing network of distribution or fulfillment centers drove customer demand, Amazon said. International sales also expanded 15 percent, up from 13 percent in the previous quarter.
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, and content such as videos and music, and all while building distribution centers across the United States and expanding in competitive overseas markets such as China. Its Kindle Fire tablets went on sale this month and will compete with Apple Inc's iPad and Microsoft Corp's Surface.
It is spending billions of dollars to expand and that has taken a toll on earnings. But investors believe the move will pay off as the 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.
Executives said they will continue to invest in distribution abroad and on buying and creating content for the Instant Video service, which has helped drive the success of Prime, its $79-a-year, two-day shipping service that also offers free video streaming.
Amazon grew Prime members, who typically spend more on goods of all kinds, by several million in the past 90 days, executives said without elaborating. Expanding free-streaming video is also attracting Prime members.
"It's helping the Prime membership increases that you're seeing, and we think it's interesting and we're investing there," Chief Financial Officer Tom Szkutak told analysts on a conference call.
Amazon becomes the latest tech name to have outperformed in an otherwise dreary earnings season. about 84 percent of technology companies that have reported so far have beat on earnings, and 63 percent on revenue.
It 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's gross profit margin - a closely watched measure of earnings that excludes several expenses - was 28.6 percent in the second quarter, one of the highest in over a decade by analysts' reckoning.
Third-quarter profit margins came in about 27.6 percent, in line with what analysts had expected and down from the previous quarter as Amazon ramped up investments in preparations for the holidays.
Data firm ShopperTrak has forecast the slowest holiday sales growth since 2009, and last week, September retail sales showed U.S. shoppers were cautious, following a disappointing second quarter for many retailers. But unlike eBay, Amazon sounded upbeat on the coming shopping season.
"We're getting ready for an exciting holiday season and that includes having to make sure we have the right amount of employees, the right capacity in place," Szkutak said.
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 $360 from a close of $332.21 on the Nasdaq.
"The takeaway is that the third-quarter sales shows that the Amazon value proposition is striking a chord with consumers," Hottovy said.