<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>165</ContextCount>
  <ElementCount>244</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>39</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - Consolidated Statements of Income and Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/StatementConsolidatedStatementsOfIncomeAndComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Income and Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040 - Statement - Consolidated Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/StatementConsolidatedStatementsOfStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050 - Statement - Consolidated Statements of Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/StatementConsolidatedStatementsOfStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>100080 - Disclosure - Service Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenue</Role>
      <ShortName>Service Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>100090 - Disclosure - Basic and Diluted Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShare</Role>
      <ShortName>Basic and Diluted Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>100100 - Disclosure - Other Income/(Expense), Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureOtherIncomeexpenseNet</Role>
      <ShortName>Other Income/(Expense), Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>100110 - Disclosure - Funds Held for Clients and Corporate Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestments</Role>
      <ShortName>Funds Held for Clients and Corporate Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>100120 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>100130 - Disclosure - Supplemental Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureSupplementalInformation</Role>
      <ShortName>Supplemental Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>100140 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>100150 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>100160 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Policy)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesPolicy</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies (Policy)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</ParentRole>
      <Position>17</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>100170 - Disclosure - Service Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueTables</Role>
      <ShortName>Service Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenue</ParentRole>
      <Position>18</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>100180 - Disclosure - Basic and Diluted Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareTables</Role>
      <ShortName>Basic and Diluted Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShare</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>100190 - Disclosure - Other Income/(Expense), Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureOtherIncomeexpenseNetTables</Role>
      <ShortName>Other Income/(Expense), Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureOtherIncomeexpenseNet</ParentRole>
      <Position>20</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>100200 - Disclosure - Funds Held for Clients and Corporate Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestments</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>100210 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFairValueMeasurements</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>100220 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesNarrativeDetails</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesPolicy</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>100230 - Disclosure - Service Revenue (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueNarrativeDetails</Role>
      <ShortName>Service Revenue (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>100240 - Disclosure - Service Revenue (Summary of PEO Pass-Through Costs Netted in Revenue) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueSummaryOfPeoPassThroughCostsNettedInRevenueDetails</Role>
      <ShortName>Service Revenue (Summary of PEO Pass-Through Costs Netted in Revenue) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>100250 - Disclosure - Service Revenue (Summary of Changes in Deferred Revenue Related to Material Rights Performance Obligations) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueSummaryOfChangesInDeferredRevenueRelatedToMaterialRightsPerformanceObligationsDetails</Role>
      <ShortName>Service Revenue (Summary of Changes in Deferred Revenue Related to Material Rights Performance Obligations) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>100260 - Disclosure - Service Revenue (Summary of Deferred Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueSummaryOfDeferredRevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionDetails</Role>
      <ShortName>Service Revenue (Summary of Deferred Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>100270 - Disclosure - Service Revenue (Summary of Changes in Deferred Costs to Obtain and Fulfill Contracts) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueSummaryOfChangesInDeferredCostsToObtainAndFulfillContractsDetails</Role>
      <ShortName>Service Revenue (Summary of Changes in Deferred Costs to Obtain and Fulfill Contracts) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>100280 - Disclosure - Basic and Diluted Earnings Per Share (Basic and Diluted Earnings Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareBasicAndDilutedEarningsPerShareDetails</Role>
      <ShortName>Basic and Diluted Earnings Per Share (Basic and Diluted Earnings Per Share) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareTables</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>100290 - Disclosure - Other Income/(Expense), Net (Schedule of Other Income/(Expense), Net) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureOtherIncomeexpenseNetScheduleOfOtherIncomeexpenseNetDetails</Role>
      <ShortName>Other Income/(Expense), Net (Schedule of Other Income/(Expense), Net) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureOtherIncomeexpenseNetTables</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>100300 - Disclosure - Funds Held for Clients and Corporate Investments (Funds Held for Clients and Corporate Investments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsFundsHeldForClientsAndCorporateInvestmentsDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Funds Held for Clients and Corporate Investments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>100310 - Disclosure - Funds Held for Clients and Corporate Investments (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsNarrativeDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>100320 - Disclosure - Funds Held for Clients and Corporate Investments (Classification of Investments on Consolidated Balance Sheets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsClassificationOfInvestmentsOnConsolidatedBalanceSheetsDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Classification of Investments on Consolidated Balance Sheets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>100330 - Disclosure - Funds Held for Clients and Corporate Investments (Securities in Unrealized Loss Position) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsSecuritiesInUnrealizedLossPositionDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Securities in Unrealized Loss Position) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>100340 - Disclosure - Funds Held for Clients and Corporate Investments (Realized Gains and Losses from Sale of Available-for-sale Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsRealizedGainsAndLossesFromSaleOfAvailableForSaleSecuritiesDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Realized Gains and Losses from Sale of Available-for-sale Securities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>100350 - Disclosure - Funds Held for Clients and Corporate Investments (Amortized Cost and Fair Value of Available-for-Sale Securities by Contractual Maturity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsAmortizedCostAndFairValueOfAvailableForSaleSecuritiesByContractualMaturityDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Amortized Cost and Fair Value of Available-for-Sale Securities by Contractual Maturity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>100360 - Disclosure - Fair Value Measurements (Financial Assets and Liabilities Measured at Fair Value on Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFairValueMeasurementsFinancialAssetsAndLiabilitiesMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements (Financial Assets and Liabilities Measured at Fair Value on Recurring Basis) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>100370 - Disclosure - Fair Value Measurements (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureFairValueMeasurementsNarrativeDetails</Role>
      <ShortName>Fair Value Measurements (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>100380 - Disclosure - Supplemental Information (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureSupplementalInformationNarrativeDetails</Role>
      <ShortName>Supplemental Information (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureSupplementalInformation</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>100390 - Disclosure - Commitments and Contingencies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureCommitmentsAndContingenciesNarrativeDetails</Role>
      <ShortName>Commitments and Contingencies (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="payx-20221130.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>100400 - Disclosure - Income Taxes (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20221130/taxonomy/role/DisclosureIncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20221130/taxonomy/role/DisclosureIncomeTaxes</ParentRole>
      <Position>41</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 3 fact(s) appearing in ix:hidden were eligible for transformation: payx:RevenuePerformanceObligationsTimingYears, us-gaap:RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1 -  payx-20221130.htm 8</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-Q" original="payx-20221130.htm">payx-20221130.htm</File>
    <File>payx-20221130.xsd</File>
    <File>payx-20221130_cal.xml</File>
    <File>payx-20221130_def.xml</File>
    <File>payx-20221130_lab.xml</File>
    <File>payx-20221130_pre.xml</File>
    <File>payx-ex10_1.htm</File>
    <File>payx-ex10_2.htm</File>
    <File>payx-ex31_1.htm</File>
    <File>payx-ex31_2.htm</File>
    <File>payx-ex32_1.htm</File>
    <File>payx-ex32_2.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="670">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
