Amazon has long focused on spending the money it makes to grow and expand into new areas. The company introduced a smartphone due out this week, for instance, expanded Sunday deliveries and recently began offering a set-top video streaming box.
Investors are usually accepting of Amazon's thin profit and focus on strong revenue. But not this quarter.
The Seattle-based company's shares fell $25.63, or 7.1 percent, to $332.98 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, and beat Wall Street forecasts. 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.