Shares in H-P rose 10% in extended trading as it reported a $390m, or 13 cents a share net profit for its fourth fiscal quarter. This compares with a $505m loss in the same period a year ago, if one counts results from Compay, which Hewlett-Packard acquired in May.
The earnings in the quarter to October, excluding exceptional charges, came to 24 cents per share. Analysts had expected Hewlett-Packard to earn 22 cents a share.
Sales in the quarter edged down to $18bn from $18.2bn but were higher than the figure expected by Wall Street analysts. The company that revenues in the current quarter would rise slightly.
It reported better than expected sales from its printing and imaging business. It cut losses in its desktop and high end computer business.
CEO Carly Fiorina said the quarterly report provides early proof that H-P is meeting or exceeding goals related to the $19bn Compaq merger, despite continued technology market weakness.
"We still have a lot more work to do," Fiorina said. "We won't be satisfied till each of our businesses is strongly profitable and increasing its market share, and we fully achieve $3bn in cost savings."