EXHIBIT 5

April 28, 2000

Hewlett-Packard Company
3000 Hanover Street
Palo Alto, California 94304

         125,000,000 Shares of Common Stock of Hewlett-Packard Company Offered
                  pursuant to the Company's 2000 Stock Plan
                                    and
  50,000,000 Shares of Common Stock of Hewlett-Packard Company Offered pursuant
                to the Company's 2000 Employee Stock Purchase Plan

Dear Sir or Madam:

I have examined the proceedings taken and the instruments executed in connection
with the organization and present capitalization of Hewlett-Packard Company (the
"Company") and the reservation for issuance and authorization of the sale and
issuance from time to time of not in excess of an aggregate of 175,000,000
shares of the Company's Common Stock (the "Shares") pursuant to the terms of the
Hewlett-Packard Company 2000 Stock Plan and the Hewlett-Packard Company 2000
Employee Stock Purchase Plan (collectively, the "Plans"). The Shares are the
subject of a Registration Statement on Form S-8 under the Securities Act of
1933, as amended, which is being filed with the Securities and Exchange
Commission and to which this opinion is to be attached as an exhibit.

Upon the basis of such examination, I am of the following opinion:

         1. The authorized shares of the Company consist of 300,000,000 shares
of Preferred Stock and 4,800,000,000 shares of Common Stock.

         2. The proper corporate proceedings necessary to the reservation for
issuance and the authorization of the sale and issuance from time to time of not
in excess of an aggregate of 175,000,000 shares of the Common Stock of the
Company pursuant to the Plans have been duly taken and, when issued pursuant to
the Plans, the Shares will be duly and validly issued and fully paid and
nonassessable.

         3. When the above-mentioned Registration Statement relating to the
Shares has become effective and when the listing of the Shares on the New York
Stock Exchange, Inc. and the Pacific Exchange, Inc. has been authorized, all
authorizations, consents, approvals, or other orders of all United States
regulatory authorities required for the issuance of the Shares will have been
obtained.

         You are further advised that I consent to the use of this opinion as an
exhibit to the above-mentioned Registration Statement.

                                            Very truly yours,

                                            /S/ Charles N. Charnas
                                            ----------------------
                                            Charles N. Charnas
                                            Assistant Secretary
                                            and Senior Managing Counsel