<Page>
                                                                    EXHIBIT 23.4

                       CONSENT OF INDEPENDENT ACCOUNTANTS

We hereby consent to the incorporation by reference in this Registration
Statement on Form S-3 (No. 333-83346) of Hewlett-Packard Company of our report
dated January 25, 2000 relating to the consolidated financial statements of
Compaq Computer Corporation for the year ended December 31, 1999, which appears
in Hewlett-Packard's Current Report on Form 8-K dated February 14, 2002. We also
consent to the incorporation by reference of our report dated January 25, 2000
relating to the financial statement schedule of Compaq Computer Corporation for
the year ended December 31, 1999, which appears in the Current Report on
Form 8-K of Hewlett-Packard Company dated February 14, 2002. We also consent to
the reference to us under the heading "Experts" in such Registration Statement.

/s/ PRICEWATERHOUSECOOPERS LLP

PricewaterhouseCoopers LLP
Houston, Texas
March 8, 2002