Please wait
image_1a.jpg

ATTORNEYS AT LAW
777 EAST WISCONSIN AVENUE
MILWAUKEE, WI 53202-5306
414.271.2400 TEL
414.297.4900 FAX
WWW.FOLEY.COM

CLIENT/MATTER NUMBER
052406-0102

Exhibit 5

May 2, 2025

MGIC Investment Corporation
250 East Kilbourn Avenue
Milwaukee, WI 53202
Ladies and Gentlemen:
We have acted as counsel for MGIC Investment Corporation, a Wisconsin corporation (the “Company”), in conjunction with the preparation of a Post-Effective Amendment No. 1 (the “Post-Effective Amendment”) to Registration Statement No. 333-238604 (the “Registration Statement”) to be filed by the Company with the Securities and Exchange Commission under the Securities Act of 1933, as amended (the “Securities Act”), relating to up to 5,039,692 shares of the Company’s common stock, $1.00 par value per share (the “Shares”), that may be issued pursuant to the MGIC Investment Corporation 2025 Omnibus Incentive Plan (the “2025 Plan”), consisting of 2,531,878 Shares that remained available for future awards under the Company’s 2020 Omnibus Incentive Plan (the “2020 Plan”) as of the date of shareholder approval of the 2025 Plan (the “Approval Date”) and therefore became available for future awards under the 2025 Plan (the “Carryforward Shares”), plus 2,507,814 Shares that were subject to outstanding awards under the 2020 Plan as of the Approval Date (the Recycled Shares”) and that may therefore become available for future awards under the 2025 Plan pursuant to the replenishment provisions of the 2025 Plan.
In connection with our representation, we have examined originals or copies, certified or otherwise identified to our satisfaction, of: (i) the 2025 Plan and the 2020 Plan; (ii) the Registration Statement and the Post-Effective Amendment; (iii) the Amended and Restated Articles of Incorporation and the Amended and Restated Bylaws of the Company, each as amended to date and currently in effect; (iv) resolutions of the Board of Directors of the Company relating to the 2025 Plan and the issuance of securities thereunder; and (v) such other documents and records as we have deemed necessary to enable us to render this opinion. In all such examinations, we have assumed the genuineness of all signatures, the authenticity of all documents, certificates, and instruments submitted to us as originals and the conformity with the originals of all documents submitted to us as copies. We have, among other things, relied upon certificates of public officials and, as to various factual matters, certificates of officers of the Company.
Based upon and subject to the foregoing, and assuming that (a) the Registration Statement and the Post-Effective Amendment will be effective and will comply with all applicable laws at the time the Carryforward Shares and the Recycled Shares are offered or issued as contemplated by the Registration Statement and the Post-Effective Amendment; and (b) all Shares will be issued and sold in compliance with applicable federal and state securities laws and in the manner stated in the Registration Statement and the Post-Effective Amendment, we are of the opinion that the Shares covered by the Registration Statement and
AUSTIN
BOSTON
CHICAGO
DALLAS
DENVER
DETROIT
HOUSTON
JACKSONVILLE
LOS ANGELES
MADISON
MEXICO CITY
MIAMI
MILWAUKEE
NEW YORK
ORLANDO
SACRAMENTO
SAN DIEGO
SAN FRANCISCO
SILICON VALLEY
TALLAHASSEE
TAMPA
WASHINGTON, D.C.
BRUSSELS
TOKYO


image_1a.jpg


MGIC Investment Corporation
May 2, 2025
Page 2
the Post-Effective Amendment, when issued and paid for pursuant to the terms and conditions of the 2025 Plan, and as contemplated in the Registration Statement and the Post-Effective Amendment, will be validly issued, fully paid and nonassessable.


We are qualified to practice law in the State of Wisconsin and we do not purport to be experts on the law other than that of the State of Wisconsin and the federal laws of the United States of America. We express no opinion as to the laws of any jurisdiction other than the State of Wisconsin and the federal laws of the United States.
We hereby consent to the filing of this opinion as an exhibit to the Post-Effective Amendment and to the reference to our firm in the Post-Effective Amendment. In giving this consent, we do not admit that we are “experts” within the meaning of Section 11 of the Securities Act or within the category of persons whose consent is required by Section 7 of the Securities Act.

Very truly yours,



/s/Foley & Lardner LLP