EXHIBIT 5 PALMER & DODGE LLP ONE BEACON STREET BOSTON, MASSACHUSETTS 02108 Telephone: (617) 573-0100 Facsimile: (617) 227-4420 April 2, 1998 MAXIMUS, Inc. 1356 Beverly Road McLean, VA 22101 We are rendering this opinion in connection with the Registration Statement on Form S-4 (the "Registration Statement") filed by MAXIMUS, Inc. (the "Company") with the Securities and Exchange Commission under the Securities Act of 1933, as amended, on or about the date hereof. The Registration Statement relates to 1,166,179 shares of the Company's Common Stock, no par value (the "Shares"), to be issued in connection with the merger of MAXIMUS Acquisition Corp. ("Merger Sub") with and into David M. Griffith & Associates, Ltd. ("Griffith") pursuant to an Agreement and Plan of Merger dated as of March 9, 1998 (the "Agreement") among the Company, Griffith and Merger Sub. We have acted as your counsel in connection with the preparation of the Registration Statement and are familiar with the proceedings taken by the Company in connection with the authorization and issuance of the Shares. We have examined such documents as we consider necessary to render this opinion. Based upon the foregoing, we are of the opinion that upon issuance in accordance with the Agreement, the Shares will be duly authorized, validly issued, fully paid and nonassessable. We hereby consent to the use of our name under the caption "Legal Matters" in the Registration Statement and to the filing of this opinion as an exhibit to the Registration Statement. Very truly yours, /s/ PALMER & DODGE LLP