Hewlett-Packard Co., the largest personal-computer maker, forecast fiscal second-quarter profit that exceeded analysts’ estimates, helped by cost-cutting measures and a smaller-than-projected drop in service sales.

Profit, excluding some items, will be 80 cents to 82 cents a share for the current quarter, which ends in April, the Palo Alto, California-based company said Thursday. That beat analysts’ average 77-cent estimate, according to data compiled by Bloomberg. The shares rose the most in more than a year.