<Page> EXHIBIT 23.2 CONSENT OF INDEPENDENT AUDITORS, ERNST & YOUNG LLP We consent to the reference to our firm under the caption "Experts" in the Registration Statement (Form S-3) and related Prospectus of Hewlett-Packard Company for the registration of 21,126,566 shares of its common stock and to the incorporation by reference therein of our reports dated January 16, 2002, with respect to the consolidated financial statements and schedule of Compaq Computer Corporation included in Hewlett-Packard Company's Current Report on Form 8-K dated February 14, 2002, filed with the Securities and Exchange Commission. Houston, Texas April 10, 2002