
<PAGE>
 
                                                                      EXHIBIT 8
                               
                            February 25, 1998     
 
Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304
 
  Re: Federal Income Tax Considerations Relating to Public Offering of
      $2,000,000,000 Aggregate Principal Amount at Maturity of Liquid Yield
      Option(TM) Notes Due 2017
 
Ladies and Gentlemen:
   
  I have acted as tax counsel to Hewlett-Packard Company, a California
corporation (the "Company"), in connection with (i) the issuance and sale by
the Company of $2,000,000,000 aggregate principal amount at maturity of Liquid
Yield Option(TM) Notes due 2017 (the "LYONs(TM)") on October 14, 1997 in
transactions exempt from the registration requirements of the Securities Act
of 1933, as amended (the "Act"), and (ii) the filing of the Company's
Registration Statement on Form S-3 (and any amendments thereto) to which this
opinion is an Exhibit and the Prospectus forming a part thereof (the
"Prospectus") with respect to the offer and sale of the LYONs and Common Stock
of the Company issued upon conversion of the LYONs by the several holders of
the LYONs.     
 
  I hereby confirm my opinion set forth under the caption "Certain United
States Federal Income Tax Considerations" in the Prospectus.
 
                                          Very truly yours,
                                             
                                          /s/ Lester Ezrati     
                                          General Tax Counsel of Hewlett-
                                           Packard Company
 
--------
(TM) Trademark of Merrill Lynch & Co., Inc.
