EX-5 2 a2034576zex-5.htm EXHIBIT 5 Prepared by MERRILL CORPORATION www.edgaradvantage.com
QuickLinks -- Click here to rapidly navigate through this document

EXHIBIT 5

January 4, 2001

Mentor Graphics Corporation
8005 SW Boeckman Road
Wilsonville, Oregon 97070-7777

        I have acted as counsel for Mentor Graphics Corporation (the "Company") in connection with the filing of a Registration Statement on Form S-8 (the "Registration Statement") under the Securities Act of 1933, as amended, covering 2,000,000 shares of Common Stock, without par value (the "Shares"), of the Company to be issued by the Company pursuant to the Company's 1989 Employee Stock Purchase Plan (the "Plan"). I have reviewed the corporate actions of the Company in connection with this matter and have examined those documents, corporate records, and other instruments I deemed necessary for the purposes of this opinion.

        Based on the foregoing, it is my opinion that:

    1.  The Company is a corporation duly organized and validly existing under the laws of the State of Oregon; and

    2.  The Shares are duly authorized and, when issued and sold in accordance with the terms of the Plan, will be legally issued, fully paid, and nonassessable.

        I hereby consent to the filing of this opinion as an exhibit to the Registration Statement.

                        Very truly yours,

                        DEAN M. FREED

                        Dean M. Freed




QuickLinks