NEW YORK — Hewlett-Packard Co. (NYSE: HPQ) on Wednesday said that it will take a massive charge against its earnings for the latest quarter, leading to a record loss of nearly $9 billion.

The charge is the result of a writedown of the value of its services business, reflecting that the company overpaid for when it bought Electronic Data Systems in 2008 for $14 billion.

Third-quarter profit excluding some items will be $1 a share, from a prior projection of 94 cents to 97 cents, the Palo Alto, California-based company said Wednesday in a statement. The net loss will be $4.31 to $4.49 a share, Hewlett-Packard said.

That indicates a loss of $8.56 billion to $8.92 billion, the biggest since at least 1989, data compiled by Bloomberg show.

Chief Executive Officer Meg Whitman is eliminating positions across the company to counter slower demand for printers, services and data-center equipment. The writedown underscores the diminished value of the unit that provides computing services to companies – a business former CEO Mark Hurd bolstered in 2008 with the $13.2 billion purchase of Electronic Data Systems Corp.

“The EDS acquisition was not a success for the company, because ever since it occurred we have not seen strong growth in their services business, and margins have come down,” said Shebly Seyrafi, an analyst at FBN Securities in New York, in an interview.

The shares rose 2.4 percent to $19.41 at the close in New York, and have declined 25 percent this year.

In another move, HP promoted Mike Nefkens to lead its enterprise services unit on an acting basis, replacing John Visentin, who is leaving to pursue other interests. Jean-Jacques Charhon, senior vice president and chief financial officer for enterprise services, was named chief operating officer for the unit, reporting to Nefkens.

‘Rejuvenate Services’

“The executive changes reflect HP’s efforts to streamline the organization and rejuvenate the services business,” said Brian Marshall, an analyst at ISI Group, in a report Wednesday.

Nefkens will be responsible for HP’s applications, business processing and outsourcing services, reporting to Whitman. Prior to joining Electronic Data Systems, he held several executive positions at Holland Chemical International NV.

Charhon joined Hewlett-Packard in 2010 as vice president of finance for the personal systems group, and previously worked in a series of leadership roles at General Electric Co.

In the third quarter, Hewlett-Packard said it expects a writedown of approximately $8 billion stemming from “business trends within the services segment.”

Workforce Reduction

The company also anticipates a pretax charge of $1.5 billion to $1.7 billion related to job cuts, up from a prior projection of $1 billion. A workforce reduction of 27,000 was announced in May.

HP may report a profit margin of 23.1 percent in the current fiscal year, down from the 23.4 percent margin the company reported for its 2011 fiscal year, according to the average of analysts’ estimates compiled by Bloomberg.

“They’re making changes, but it’s going to be several years before they get it right,” Seyrafi said. “The charges are a recognition that the prior management strategy did not succeed.”

Whitman, the former CEO of eBay, took over as CEO of the world’s No. 1 PC manufacturer – just ahead of Lenovo – in September.

It also said its early retirement program is meeting with unexpectedly high acceptance, meaning it will take a charge of $1.5 billion to $1.7 billion for severance payments in the third quarter, rather than the $1 billion it expected.

The restructuring, announced in May, is expected to slash 27,000 jobs, or 8 percent of HP’s work force, by 2014. It’s the largest downsizing in the company’s history.

HP is set to report third-quarter financial results on Aug. 22.

(Bloomberg and The AP contributed to this report.)