SEATTLE — So just how impatient are shoppers? Enough to bolster sales at Amazon.

This spring, Amazon announced plans to make one-day shipping standard for Amazon Prime customers, a major logistics investment it said would cost $800 million in the second quarter alone. The growth of Amazon’s core retail sales had been slowing, so investors hoped that offering millions more items available faster would get customers to spend more on its site.

On Thursday, the company said it had $63.4 billion in sales in its latest quarter, up 20 percent from the same period last year. Profit for the quarter was $2.6 billion, up 4 percent. Amazon beat Wall Street’s expectations for sales, but it fell short on earnings, as costs rose and Amazon’s cloud computing business grew more slowly than in the past. Shares fell as much as 2 percent in after-hours trading.

Brian Olsavsky, the company’s chief financial officer, said the costs for the rapid delivery were higher than he had anticipated. Productivity was “a bit off” in Amazon’s vast fulfillment network as the company expanded its ability to ship more products in a day.

“Millions more one-day packages went out this quarter than last,” he said. “Customers are responding, and they like it.”