The world's largest personal-computer maker also provided an earnings and revenue outlook for its current quarter that is ahead of analysts' expectations.
HP shares rose about 2 percent Friday.
Net income in its fiscal third quarter rose to $1.78 billion, or 66 cents per share, from $1.38 billion, or 48 cents per share, a year earlier. Excluding items, HP earnings came in at 71 cents per share.
Revenue in the quarter rose to $25.4 billion from $21.9 billion a year earlier.
Analysts, on average, expected earnings per share before certain items of 66 cents and revenue of $24.1 billion, according to Reuters Estimates.
"HP had an unbelievable quarter. They generated $1 billion in upside in revenues in an environment of nervous consumer spending," said Brent Bracelin, an analyst at Pacific Crest Securities. "Very positive results."
HP has benefited along with competitors including Dell and Apple from sharp price declines for computer memory, disk drives and microprocessors this year amid a supply glut, analysts say. HP also has cut 15,000 jobs in the past two years, and is consolidating data centers and selling real estate to cut costs.
For its fiscal fourth quarter, HP forecast net income per share of 75 cents to 76 cents, profit before items of 80 cents to 81 cents per share, and revenue of $27 billion to $27.2 billion.
Analysts, on average, expect profit before items of 78 cents per share and revenue of $26.5 billion.
"HP is beginning to show signs of realizing its full potential," Chief Executive Mark Hurd said on a conference call with reporters. "We've improved our cost structure over the last two-and-a-half years."
Third-quarter revenue in HP's personal systems group, which includes PCs, rose 29 percent to $8.9 billion, while operating profit was $519 million, or 5.8 percent of revenue compared with 4.0 percent a year earlier.
In imaging and printing, one of HP's biggest profit drivers, revenue rose 8 percent to $6.8 billion. The unit's operating profit was $981 million, or 14.5 percent of revenue, up from 14.2 percent a year ago.
Enterprise storage and server revenue climbed 10 percent to $4.5 billion and operating profit was $464 million, or 10.2 percent of revenue, up from 7.2 percent a year earlier.
HP's services revenue climbed 8 percent to $4.2 billion and operating profit in the business was $430 million, or 10.3 percent of revenue, up from 9.4 percent.
In software, revenue rose 74 percent to $554 million and operating profit was $81 million, helped by last year's $4.9 billion acquisition of Mercury Interactive.
HP, based in Palo Alto, Calif., said in July it planned to buy software company Opsware Inc for $1.6 billion to bolster its business of helping corporate customers manage computer systems.
Shares of HP trade at 17 times expected 2007 earnings per share, compared with 16 for IBMand Dell's 20.