EXHIBIT 23.1 CONSENT OF INDEPENDENT ACCOUNTANTS We hereby consent to the incorporation by reference in the Prospectus constituting part of this Registration Statement on Form S-3 of Hewlett- Packard Company of our report dated November 17, 1997, which appears on page 54 of Hewlett-Packard's 1997 Annual Report to Shareholders, which is incorporated by reference in its Annual Report on Form 10-K for the year ended October 31, 1997. We also consent to the reference to us under the heading "Experts" in such Prospectus. PricewaterhouseCoopers LLP San Jose, California October 27, 1998