Exhibit 5-1 Clinton Square P.O. Box 31051 Rochester, New York 14603-1051 (585) 263-1000 Fax: (585) 263-1600 November 7, 2002 Paychex, Inc. 911 Panorama Trail South Rochester, New York 14625 Ladies and Gentlemen: We have acted as counsel to Paychex, Inc., a Delaware corporation (the "Company"), in connection with the Registration Statement on Form S-8 (the "Registration Statement") to be filed by the Company on November 7, 2002 with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Act"), for the purpose of registering with the Commission the issuance and sale of 9,107,569 shares of Common Stock of the Company, par value $.01 per share (the "Common Stock"), pursuant to the Company's 2002 Stock Incentive Plan (the "Plan"). This opinion is being delivered to you in connection with the Registration Statement. We have examined originals or copies, certified or otherwise identified to our satisfaction, of all such records of the Company and all such agreements, certificates of public officials, certificates of officers or other representatives of the Company, and such other documents, certificates and corporate or other records as we have deemed necessary or appropriate as a basis for the opinions set forth herein, including (i) the Amended Certificate of Incorporation of the Company, (ii) the By-Laws of the Company, as amended to the date hereof, and (iii) the Plan. As to questions of fact material to our opinions expressed herein, we have, when relevant facts were not independently established, relied upon certificates of, and information received from, the Company and/or representatives of the Company. We have made no independent investigation of the facts stated in such certificates or as to any information received from the Company and/or representatives of the Company and do not opine as to the accuracy of such factual matters. We also have relied, without investigation, upon certificates and other documents from, and conversations with, public officials. Members of our firm involved in the preparation of this opinion are licensed to practice law in the State of New York and we do not purport to be experts on, or to express any opinion herein concerning, the laws of any jurisdiction other than the laws of the State of New York and the General Corporation Law of the State of Delaware. Based upon and subject to the foregoing, and the other qualifications and limitations contained herein, and after (a) the above-referenced Registration Statement has become effective under the Act and assuming that such effectiveness remains in effect throughout the period during which shares of Common Stock are offered and sold pursuant to the Plan, (b) the shares of Common Stock to be offered and sold pursuant to the Plan have, if required, been duly qualified or registered, as the case may be, for sale under applicable securities laws and all applicable securities laws are complied with, (c) all necessary action by the Board of Directors of the Company shall have been taken to duly authorize the offer, issuance and sale of Common Stock to be offered and sold pursuant to the Plan, and (d) the shares of Common Stock to be offered and sold pursuant to the Plan have been delivered pursuant to and in accordance with the terms of the Plan and related agreements and instruments, we are of the opinion that the 9,107,569 shares of Common Stock to be offered and sold pursuant to the Plan will have been duly authorized, validly issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement. In giving this consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Act or the rules and regulations of the Commission thereunder. This opinion is intended solely for your benefit in connection with the transactions described above and, except as provided in the immediately preceding paragraph, may not be otherwise communicated to, reproduced, filed publicly or relied upon by, any other person or entity for any other purpose without our express prior written consent. This opinion is limited to the matters stated herein, and no opinion or belief is implied or may be inferred beyond the matters expressly stated herein. The opinions expressed herein are rendered as of the date hereof, and we disclaim any undertaking to advise you of changes in law or fact which may affect the continued correctness of any of our opinions as of a later date. Very truly yours, /s/ Nixon Peabody LLP