EXHIBIT 5.1 ___________ Woods, Oviatt, Gilman, Sturman and Clark LLP 44 Exchange Street Rochester, NY 14614 January 31, 1997 Paychex, Inc. 911 Panorama Trail South Rochester, NY 14625 RE: Paychex, Inc. Registration Statement on Form S-3 Gentlemen: We are acting as counsel for Paychex, Inc. (the "Company"), a Delaware corporation, in connection with the proposed public offering ("Public Offering") by certain stockholders ("Selling Stockholders") of 117,877 of the $.01 par value common stock of the Company, covered by the above captioned registration statement (the "Registration Statement"). We are familiar with the Certificate of Incorporation of the Company, as amended, the by-laws of the Company and the corporate proceedings taken to authorize the issuance of the aforesaid shares of common stock to the Selling Stockholders. Based upon the foregoing, we are of the opinion that: 1. The Company has been duly organized and is validly existing as a corporation under the laws of the State of Delaware. 2. All necessary action had been taken by the Board of Directors of the Company to authorize the issuance of the shares of common stock being sold by the Selling Stockholders in the Public Offering. 3. When certificates for the shares of common stock being sold by the Selling Stockholders in the Public Offering were delivered in accordance with the terms of the merger of Paychex Acquisition Corp. into Olsen Computer Systems, Inc., such shares of common stock were legally issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and the reference made under the heading "Legal Matters" constituting a part of the Registration Statement. Very truly yours, WOODS, OVIATT, GILMAN, STURMAN & CLARKE LLP /s/ Harry P. Messina, Jr. ------------------------- Harry P. Messina, Jr.