Exhibit 5

March 31, 2000

International Business Machines Corporation
New Orchard Road
Armonk, NY 10504

Ladies and Gentlemen:

As a Vice President and Assistant General Counsel of International Business
Machines Corporation (herein called the "Corporation") and an attorney duly
admitted to practice in the State of New York, I am familiar with the
proceedings by which the Corporation was organized, the proceedings by which its
Certificate of Incorporation has from time to time been amended, the proceedings
by which the IBM Executive Deferred Compensation Plan--formerly known as the IBM
Extended Tax Deferred Savings Plan (herein the EDCP or "Plan") was adopted by
the IBM Board of Directors and authorized to issue the IBM EDCP Obligations
pursuant to this registration statement.

I, together with competent members of my legal staff and other professionals
working under my direct supervision and control have also reviewed such
documents and records as necessary to enable me to express an informed opinion
with respect to the matters covered hereby.

Based upon the foregoing, I am of the opinion that:

1. The Corporation has been duly incorporated and is a subsisting corporation
under the laws of the State of New York; and,

2. The Plan has been duly and validly authorized and adopted, and the IBM EDCP
Obligations being registered hereunder that may be issued to its participants,
when issued or sold in accordance with the Plan, will be valid and binding
obligations of the Corporation, enforceable in accordance with their terms,
except as enforcement thereof may be limited by bankruptcy, insolvency or other
laws of general applicability relating to or affecting enforcement of creditors'
rights or by general principles of equity.

I hereby consent to the use of my name in the Registration Statement as counsel
who has passed upon the legality of the IBM EDCP Obligations that may be offered
under this registration, and to the use of this opinion as a part of the
Registration Statement as required by Section 7 of the Securities Act of 1933,
as amended.

                                         Very truly yours,


                                           /s/ David S. Hershberg
                                               -------------------------
                                               David S. Hershberg
                                               Vice President and Assistant
                                               General Counsel