SEATTLE — For Apple and Amazon, the holidays are the time to shine, the period when shoppers have the greatest appetite to buy their devices and, in Amazon’s case, anything else that can be stuffed into a box and delivered to homes.
During the final few months of last year, neither disappointed.
Both companies singled out the booming sales of their devices in the quarterly financial results that they reported on Thursday. Apple boasted of its highest revenue ever for a new lineup of iPhones, which included the high-priced iPhone X. Amazon raved about the demand for gadgets like the Echo, which runs its intelligent voice assistant, Alexa.
“Our 2017 projections for Alexa were very optimistic, and we far exceeded them,” Jeff Bezos, the chief executive of Amazon, said. “We don’t see positive surprises of this magnitude very often — expect us to double down.”
Amazon, a company once known for routinely posting losses, more than doubled its profit thanks to strong growth in its cloud computing division and a newer business for the company — advertising. It also benefited from a large gain resulting from changes to the United States tax code.
For the quarter that ended Dec. 31, Amazon said, net income rose to $1.86 billion, the highest profit in its history and more than double the $749 million from a year earlier. A big part of the increase, $789 million, came from the tax benefit. Revenue jumped 38 percent to $60.45 billion from a year earlier.
Amazon’s shares soared nearly 6 percent in after-hours trading following the release of the results. “Amazon’s best-in-class large-cap growth story remains unchanged,” Colin Sebastian, an analyst at Robert W. Baird & Company, wrote in a research report.
While Amazon’s online store sales grew 20 percent from a year earlier, the company’s total retail growth benefited from its acquisition of Whole Foods Markets. That deal, announced in June, added much of the $4.52 billion in physical store revenue for the quarter.
Yet the biggest revenue growth came from a category generically named “other,” which includes advertising services and rose 62 percent to $1.74 billion from a year earlier.
By far the most profitable big business for the company was Amazon Web Services, the cloud computing unit. Its revenue rose 45 percent to $5.11 billion, and its operating income increased 46 percent to $1.35 billion.
Amazon kept with its tradition of secrecy by refusing to reveal exactly how many of its Echo family of devices it sold, saying only that it sold “tens of millions” of them last year. The company priced the devices aggressively over the holidays — its cheapest was only $29. The devices probably did not yield much profit, though they are an important part of Amazon’s effort to establish a technology ecosystem that could result in other benefits, such as enabling customers to make impulse purchases with their voices.
Apple, in contrast, is without equal in making profits from tech hardware.
For the company’s fiscal first quarter, it reported a record for quarterly net income — $20.07 billion, up 12 percent from a year earlier. Revenue rose 13 percent to $88.3 billion. The gains were notable considering that Apple’s fiscal first quarter was a week shorter than the previous year’s 14-week fiscal first quarter.
While Amazon is content to price its devices near its costs for making them, Apple is known for charging a premium for its smartphones, tablets and computers. The iPhone X, which uses facial recognition to unlock the device, is the most expensive in its history, starting at almost $1,000.
“Customer satisfaction is literally off the charts on iPhone X,” Timothy D. Cook, Apple’s chief executive, said on the company’s earnings call.
Mr. Cook noted that the iPhone X was the company’s top-selling phone in the quarter despite its November release, roughly a month and a half after Apple’s other new iPhones.
The company sold 77.3 million iPhones over the quarter, which was down 1 percent from the longer quarter a year earlier. Yet revenue was higher largely because of the pricing of the new iPhones: In addition to introducing the iPhone X, Apple raised the price of the base model of its iPhone to $699, up from the $649 starting price for past iPhones.
Sales in its “other products” category, which includes the Apple Watch, grew 36 percent to $5.5 billion. Apple declined to disclose sales of the Apple Watch for competitive reasons, but Mr. Cook noted on the earnings call that revenue for the Apple Watch had grown 50 percent.
Apple also highlighted money generated from services, which include the App Store and Apple Music, with revenue rising 18 percent to $8.5 billion. Apple said the App Store continued to be the top destination for smartphone customers to buy apps.
Apple sold 13.2 million iPads, up 1 percent — notable because iPad sales declined for many consecutive quarters over the last few years. But Mac sales shrank about 5 percent to 5.1 million units.
Despite strong sales of the pricey iPhone X, some analysts remained concerned that its sales were slowing. Ahead of the earnings call, some news reports said Apple was slashing production of the iPhone X for the quarter that ends in March. The reports cited supply chain partners that said Apple had cut orders for parts.
But in years past, Apple has warned investors that activities of its complex supply chain were an unreliable metric for overall sales. The company also typically slows down iPhone production after the holiday quarter, which is the peak shopping season.
Last month, Apple also unveiled plans to bring the vast majority of its $252 billion in cash held abroad back to the United States, paying a one-time repatriation tax of $38 billion. Because the company had already earmarked $36.4 billion in anticipation that it would eventually have to pay taxes on its foreign earnings, Apple did not see much impact from the recent tax code changes.
Luca Maestri, Apple’s chief financial officer, said that in light of the new tax code, the company would announce plans for its repatriated cash, including dividends and buybacks, in April.