Amazon has long focused on spending the money it makes to grow and expand into new areas. In one of its most high-profile moves, Amazon is introducing its own smartphone, the Fire, which starts selling Friday.
The company has been heavily investing in services for its loyalty program, Prime, which costs $99 a year, and includes free two-day shipping on many items. It has added a grocery delivery services and music streaming for Prime Members as well as offering original TV shows and apps. It also expanded Sunday deliveries and recently began offering a set-top video streaming box.
Amazon doesn't disclose how many Prime members there are but it said it added more Prime members in the second quarter than it did in the second quarter last year, despite the fact that it raised the cost for Prime by $20 earlier this year.
Investors are usually accepting of Amazon's thin profit and focus on strong revenue growth. But not this quarter.
The Seattle-based company's shares fell $35.17, or 9.8 percent, to $323.44 in Thursday's aftermarket trading.
Amazon posted a loss of $126 million, or 27 cents per share, compared with $7 million, or 2 cents per share, in the same quarter a year earlier. The average estimate of analysts surveyed by Zacks Investment Research was for a loss of 13 cents per share.
The company said revenue rose 23 percent to $19.34 billion from $15.7 billion in the same quarter a year earlier. Analysts expected $19.33 billion, according to Zacks.
Looking forward, the company expects third-quarter revenue between $19.7 billion and $21.5 billion. Analysts expect $20.81 billion, according to FactSet.
Amazon's results come as the company is in a public squabble with publisher Hachette, reportedly over e-book prices. Amazon did not give an update about the talks.
Amazon shares have dropped 10 percent in 2014, while the Standard & Poor's 500 index has climbed 7.6 percent.