SAN FRANCISCO -- Battling a declining demand for personal computers, Hewlett-Packard, the PC maker, reported lower quarterly earnings on Thursday.
The earnings were significantly higher than analysts had expected, however.
"The turnaround is starting to gain traction as a result of the actions we took in 2012 to lay the foundation of H.P.'s future," Meg Whitman, the chief executive, said in a statement accompanying the earnings. "I feel good about the rest of the year."
H.P. said net income fell 16 percent to $1.2 billion, or 63 cents a share, from the year-ago quarter.
The company said revenue fell 6 percent, to $28.4 billion.
Wall Street analysts had expected net income of 71 cents a share and revenue of $27.8 billion, according to a survey of analysts by Thomson Reuters.
H.P., based in Palo Alto, Calif., is one of the world's largest suppliers of both PCs and computer servers. Demand for PCs has been shrinking, because of the popularity of tablets and smartphones, which H.P. doesn't make. Servers face shrinking profit margins as more companies look beyond brand names and buy low-priced machines in bulk from Asian vendors.
Under Ms. Whitman, H.P. has focused on restructuring its printers and high-end server business to incorporate more data-analysis software that searches for documents and compiles reports like the energy use of the data center. She has warned, however, that the turnaround may take until 2017. In 2012, the company announced it would lay off 29,000 employees.
H.P.'s earnings announcement followed by two days a report of lower revenue and earnings by Dell Computer, H.P.'s main American rival.
Dell said its first-quarter revenue fell 11 percent, to $14.3 billion, while net income was off 31 percent, to $530 million, or 30 cents a share.
Michael Dell, Dell's founder, has proposed taking his company private, for about $24.4 billion, to focus on restructuring the company away from the eyes of Wall Street.
This article originally appeared in The New York Times.