Hewlett-Packard Co. (NYSE:HPQ) reported first-quarter earnings Thursday that blew past analyst estimates despite slumps in sales of PCs, printers, services and software as a result of CEO Meg Whitman’s massive cost-cutting.

The Palo Alto, Calif., computer giant, the world’s largest, also issued its first bullish forecast since Whitman took over as CEO in September 2011. “Our turnaround is starting to gain traction,” she said.

Whitman also slightly raised her forecast for the current quarter and predicted that HP will return to profit for the year ending Oct. 31, with operating earnings ranging between $3.40 a share and $3.60 a share.

In the period ended Jan. 31, HP reported operating earnings of 82 cents a share, compared with analyst estimates of only 71 cents. Net income slipped 16 percent to $1.2 billion, or 63 cents a share, from $1.5 billion, or 73 cents a year earlier. Revenue fell 6 percent to $28.4 billion, compared with estimates of $27.76 billion from analysts cited by Thomson Reuters.

Despite lower sales across all of HP’s principal categories, the company reported total costs and expenses fell nearly $1.4 billion, part of Whitman’s effort to streamline operations and trim the workforce about 10 percent by mid-2014.

Shares of HP jumped about 7 percent in after-hours trading. They closed at $17.10, up 40 cents. They’ve already gained 20 percent this year.