EX-5 5 a2074431zex-5.htm EX-5
QuickLinks -- Click here to rapidly navigate through this document


EXHIBIT 5

March 25, 2002

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

3,119,140 Shares of Common Stock of Hewlett-Packard Company offered pursuant to the Indigo N.V. Flexible Stock Incentive Plan and the Indigo N.V. 1996 International Flexible Stock Incentive 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 3,119,140 shares of the Company's Common Stock (the "Shares") pursuant to the terms of the Indigo N.V. Flexible Stock Incentive Plan and the Indigo N.V. 1996 International Flexible Stock Incentive 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, of which 4,500,000 shares are designated as Series A Participating Preferred Stock, and 9,600,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 3,119,140 shares of the Common Stock of the Company pursuant to the Plans have been duly taken and, when issued pursuant to the Plan, 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

 



QuickLinks