SAN FRANCISCO — Hewlett-Packard reported sharply lower net income Wednesday and announced that it would lay off 27,000 employees in order to cut costs.

“We exceeded out previously provided outlook and are executing against our strategy,” said Meg Whitman, H.P.’s chief executive in a statement. “We still have a lot of work to do.”

The Palo Alto, Calif., company reported net income of $1.6 billion, or 80 cents a share, for its second fiscal quarter, which ended April 30. Revenue was $30.7 billion. In the comparable quarter a year earlier, H.P. reported net income of $2.3 billion, or $1.07 a share.