Image caption Hewlett-Packard hopes to save up to $3.5bn a year

Hewlett-Packard, the world's largest maker of personal computers, is to cut 27,000 jobs by the end of 2014.

The company said the cuts - about 8% of its workforce - will reduce costs by up to $3.5bn (£2.2bn) a year.

HP said in a statement that the money would be reinvested into the company.

The move was part of a "productivity initiative designed to simplify business processes" and comes as rival products such as the iPad tablet computer eat into HP's sales.

As part of the changes, the head of HP's Autonomy division, Mike Lynch, is being replaced by Bill Veghte, HP's chief strategy officer. Mr Lynch will leave after what HP called a "transition period".

Mr Lynch founded software company Autonomy as a small start-up and turned into one of the UK's largest technology companies.

It was bought by HP last year for more than $10bn.

HP employs about 350,000 people worldwide and about 20,000 in the UK. A spokesman said it was too early to say exactly where the job cuts would hit, but no part of the business would escape some losses.

"We have not yet announced specific plans with regards to specific locations. We do expect the workforce reduction to impact just about every business and region," the spokesman said.

'Exceeded outlook'

Analysis It's difficult to imagine Autonomy without Mike Lynch. The student who left Cambridge University without a penny to his name dominated the culture of the firm. He built Autonomy after getting a £2,000 loan from a man in a pub. His drive and entrepreneurial flair was fundamental to the growth of the firm. Although many people found him difficult and demanding to work for, he was held in awe by rank-and-file staff. That's why Autonomy's 300 Cambridge staff are worried about the future. One man, who declined to be identified, said: "Without Mike, we have a grim outlook. He was the reason many people work here. A brain drain of senior people is already under way." Autonomy's new leader, Bill Veghte, is due to speak to staff in Cambridge on Friday. Many are sceptical that he will be able to rekindle Autonomy's entrepreneurial culture.

News of the job losses overshadowed the release on Wednesday of HP's latest quarterly results. The company's profits and revenues were both better than analysts had estimated.

California-based HP reported a 31% fall in profits in the second quarter to $1.6bn. Revenue in the period fell 3% on a year ago to $30.7bn.

Meg Whitman, HP's chief executive, said: "This quarter we exceeded our previously provided outlook and are executing against our strategy, but we still have a lot of work to do."

The former chief executive of eBay joined HP in September, vowing to turn around the company after a series of problems including a failed tablet computer and an announcement that it was considering an exit from the PC business.

Her predecessor, Leo Apotheker, was ousted after just 11 months on the job.

HP's shares, which fell as much as 5% on Wednesday and closed 3% down, were up 6.6% in after-hours trading on Wall Street.