<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>319</ContextCount>
  <ElementCount>564</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>109</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>75000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>75010 - Statement - Consolidated Statements of Income and Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/StatementConsolidatedStatementsOfIncomeAndComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Income and Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>75030 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>75040 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>75050 - Statement - Consolidated Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/StatementConsolidatedStatementsOfStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>75060 - Statement - Consolidated Statements of Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/StatementConsolidatedStatementsOfStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>75070 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>995447 - Disclosure - Insider Trading Policies and Procedures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingPoliciesProc</Role>
      <ShortName>Insider Trading Policies and Procedures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995457 - Disclosure - Cybersecurity Risk Management, Strategy, and Governance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureCybersecurityRiskManagementStrategyAndGovernanceDisclosure</Role>
      <ShortName>Cybersecurity Risk Management, Strategy, and Governance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995467 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995477 - Disclosure - Service Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureServiceRevenue</Role>
      <ShortName>Service Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995487 - Disclosure - Basic and Diluted Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShare</Role>
      <ShortName>Basic and Diluted Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995497 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995507 - Disclosure - Other Income, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureOtherIncomeNet</Role>
      <ShortName>Other Income, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995517 - Disclosure - Stock-Based Compensation Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlans</Role>
      <ShortName>Stock-Based Compensation Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995527 - Disclosure - Funds Held for Clients and Corporate Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestments</Role>
      <ShortName>Funds Held for Clients and Corporate Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995537 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureFairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995547 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995557 - Disclosure - Property and Equipment, Net of Accumulated Depreciation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciation</Role>
      <ShortName>Property and Equipment, Net of Accumulated Depreciation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995567 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortization</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995577 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995587 - Disclosure - Short-term Financing</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancing</Role>
      <ShortName>Short-term Financing</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995597 - Disclosure - Long-Term Financing</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLongTermFinancing</Role>
      <ShortName>Long-Term Financing</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>995607 - Disclosure - Supplemental Cash Flow Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureSupplementalCashFlowInformation</Role>
      <ShortName>Supplemental Cash Flow Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>995617 - Disclosure - Employee Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureEmployeeBenefitPlans</Role>
      <ShortName>Employee Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>995627 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>995637 - Disclosure - Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureSegmentReporting</Role>
      <ShortName>Segment Reporting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995647 - Disclosure - Valuation and Qualifying Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureValuationAndQualifyingAccounts</Role>
      <ShortName>Valuation and Qualifying Accounts</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995657 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Policy)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/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/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>995667 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995677 - Disclosure - Service Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureServiceRevenueTables</Role>
      <ShortName>Service Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureServiceRevenue</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>995687 - Disclosure - Basic and Diluted Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareTables</Role>
      <ShortName>Basic and Diluted Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShare</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>995697 - Disclosure - Business Combinations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinationsTables</Role>
      <ShortName>Business Combinations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinations</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>995707 - Disclosure - Other Income, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureOtherIncomeNetTables</Role>
      <ShortName>Other Income, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureOtherIncomeNet</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>995717 - Disclosure - Stock-Based Compensation Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</Role>
      <ShortName>Stock-Based Compensation Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlans</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>995727 - Disclosure - Funds Held for Clients and Corporate Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestments</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>995737 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureFairValueMeasurements</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>995747 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeases</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>995757 - Disclosure - Property and Equipment, Net of Accumulated Depreciation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationTables</Role>
      <ShortName>Property and Equipment, Net of Accumulated Depreciation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciation</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>995767 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortization</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>995777 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxes</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>995787 - Disclosure - Short-term Financing (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancingTables</Role>
      <ShortName>Short-term Financing (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancing</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>995797 - Disclosure - Long-Term Financing (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLongTermFinancingTables</Role>
      <ShortName>Long-Term Financing (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLongTermFinancing</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>995807 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureCommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>995817 - Disclosure - Segment Reporting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureSegmentReportingTables</Role>
      <ShortName>Segment Reporting (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureSegmentReporting</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>995827 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/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/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>995837 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Summary of Accounts Receivable, Net of Allowance for Credit Losses) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesSummaryOfAccountsReceivableNetOfAllowanceForCreditLosses</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies (Summary of Accounts Receivable, Net of Allowance for Credit Losses) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>995847 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Schedule of Allowance for Credit Losses Activity Related to Accounts Receivables) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesScheduleOfAllowanceForCreditLossesActivityRelatedToAccoun</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies (Schedule of Allowance for Credit Losses Activity Related to Accounts Receivables) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>995857 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Estimated Useful Lives of Depreciable Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesEstimatedUsefulLivesOfDepreciableAssetsDetails</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies (Estimated Useful Lives of Depreciable Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>995867 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Summary of Estimated Useful Lives of Amortizable Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesSummaryOfEstimatedUsefulLivesOfAmortizableAssetsDetails</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies (Summary of Estimated Useful Lives of Amortizable Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>995877 - Disclosure - Service Revenue (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureServiceRevenueNarrativeDetails</Role>
      <ShortName>Service Revenue (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>995887 - Disclosure - Service Revenue (Summary of PEO Pass-Through Costs Netted in Revenue) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/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/20250531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>995897 - 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/20250531/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/20250531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>995907 - Disclosure - Service Revenue (Narrative) (Performance Obligation) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureServiceRevenueNarrativePerformanceObligationDetails</Role>
      <ShortName>Service Revenue (Narrative) (Performance Obligation) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>995917 - Disclosure - Service Revenue (Summary of Changes in Deferred Costs to Obtain and Fulfill Contracts) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/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/20250531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>995927 - Disclosure - Basic and Diluted Earnings Per Share (Basic and Diluted Earnings Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/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/20250531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>995937 - Disclosure - Business Combinations (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinationsNarrativeDetails</Role>
      <ShortName>Business Combinations (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinationsTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>995947 - Disclosure - Business Combinations - Summary of the Components of the Purchase Consideration (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinationsSummaryOfTheComponentsOfThePurchaseConsiderationDetails</Role>
      <ShortName>Business Combinations - Summary of the Components of the Purchase Consideration (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>995957 - Disclosure - Business Combinations - Summary of Purchase Price Allocation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinationsSummaryOfPurchasePriceAllocationDetails</Role>
      <ShortName>Business Combinations - Summary of Purchase Price Allocation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>995967 - Disclosure - Business Combinations - Summary of Preliminary Fair Values Allocated to Identifiable Intangible Assets and their Estimated Useful Lives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinationsSummaryOfPreliminaryFairValuesAllocatedToIdentifiableIntangibleAssetsAndTheirEstimatedUsefulLivesDetails</Role>
      <ShortName>Business Combinations - Summary of Preliminary Fair Values Allocated to Identifiable Intangible Assets and their Estimated Useful Lives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>995977 - Disclosure - Business Combinations - Summary of Unaudited Pro Forma Financial Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureBusinessCombinationsSummaryOfUnauditedProFormaFinancialInformationDetails</Role>
      <ShortName>Business Combinations - Summary of Unaudited Pro Forma Financial Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>995987 - Disclosure - Other Income, Net (Schedule of Other Income, Net) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureOtherIncomeNetScheduleOfOtherIncomeNetDetails</Role>
      <ShortName>Other Income, Net (Schedule of Other Income, Net) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureOtherIncomeNetTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>995997 - Disclosure - Stock-Based Compensation Plans (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansNarrativeDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>996007 - Disclosure - Stock-Based Compensation Plans (Stock Option Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansStockOptionActivityDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Stock Option Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>996017 - Disclosure - Stock-Based Compensation Plans (Other Information Pertaining to Stock Option) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansOtherInformationPertainingToStockOptionDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Other Information Pertaining to Stock Option) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>996027 - Disclosure - Stock-Based Compensation Plans (Weighted-Average Assumptions) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansWeightedAverageAssumptionsDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Weighted-Average Assumptions) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>996037 - Disclosure - Stock-Based Compensation Plans ( Time-Based RSUs and RSAs Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockbasedCompensationPlansTimebasedRsusAndRsasActivityDetails</Role>
      <ShortName>Stock-Based Compensation Plans ( Time-Based RSUs and RSAs Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>996047 - Disclosure - Stock-Based Compensation Plans (Time-Based RSUs and RSAs Activity) (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockbasedCompensationPlansTimebasedRsusAndRsasActivityParentheticalDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Time-Based RSUs and RSAs Activity) (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>996057 - Disclosure - Stock-Based Compensation Plans (Other Information Pertaining to Time-Based RSUs and RSAs) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockbasedCompensationPlansOtherInformationPertainingToTimebasedRsusAndRsasDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Other Information Pertaining to Time-Based RSUs and RSAs) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>996067 - Disclosure - Stock-Based Compensation Plans (Performance-Based RSUs and RSAs Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockbasedCompensationPlansPerformancebasedRsusAndRsasActivityDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Performance-Based RSUs and RSAs Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>996077 - Disclosure - Stock-Based Compensation Plans (Other Information Pertaining to Performance-Based RSUs and RSAs) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockbasedCompensationPlansOtherInformationPertainingToPerformancebasedRsusAndRsasDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Other Information Pertaining to Performance-Based RSUs and RSAs) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>996087 - Disclosure - Stock-Based Compensation Plans (Weighted-Average Assumptions of Performance-Based RSUs) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockbasedCompensationPlansWeightedaverageAssumptionsOfPerformancebasedRsusDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Weighted-Average Assumptions of Performance-Based RSUs) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>996097 - 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/20250531/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/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>996107 - Disclosure - Funds Held for Clients and Corporate Investments (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsNarrativeDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>996117 - 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/20250531/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/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>996127 - Disclosure - Funds Held for Clients and Corporate Investments (Securities in Unrealized Loss Position) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/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/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>996137 - 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/20250531/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/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>996147 - 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/20250531/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/20250531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>996157 - 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/20250531/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/20250531/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>996167 - Disclosure - Fair Value Measurements (Schedule of Amortized Cost and Fair Value of Borrowings) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureFairValueMeasurementsScheduleOfAmortizedCostAndFairValueOfBorrowingsDetails</Role>
      <ShortName>Fair Value Measurements (Schedule of Amortized Cost and Fair Value of Borrowings) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>996177 - Disclosure - Leases (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesNarrativeDetails</Role>
      <ShortName>Leases (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>996187 - Disclosure - Leases (Supplemental Balance Sheet Information Related to Leases) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesSupplementalBalanceSheetInformationRelatedToLeasesDetails</Role>
      <ShortName>Leases (Supplemental Balance Sheet Information Related to Leases) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>83</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>996197 - Disclosure - Leases (Components of Lease Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesComponentsOfLeaseExpenseDetails</Role>
      <ShortName>Leases (Components of Lease Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>996207 - Disclosure - Leases (Supplemental Cash Flow Information Related to Leases) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesSupplementalCashFlowInformationRelatedToLeasesDetails</Role>
      <ShortName>Leases (Supplemental Cash Flow Information Related to Leases) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>996217 - Disclosure - Leases - (Future Lease Payments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLeasesFutureLeasePaymentsDetails1</Role>
      <ShortName>Leases - (Future Lease Payments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>996227 - Disclosure - Property and Equipment, Net of Accumulated Depreciation (Components of Property and Equipment, at Cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationComponentsOfPropertyAndEquipmentAtCostDetails</Role>
      <ShortName>Property and Equipment, Net of Accumulated Depreciation (Components of Property and Equipment, at Cost) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationTables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>996237 - Disclosure - Property and Equipment, Net of Accumulated Depreciation (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationNarrativeDetails</Role>
      <ShortName>Property and Equipment, Net of Accumulated Depreciation (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationTables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>996247 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationNarrativeDetails</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>996257 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Change in Goodwill) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationChangeInGoodwillDetails</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization (Change in Goodwill) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>90</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>996267 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Components of Intangible Assets, at Cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationComponentsOfIntangibleAssetsAtCostDetails</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization (Components of Intangible Assets, at Cost) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>91</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>996277 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Estimated Amortization Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationEstimatedAmortizationExpenseDetails</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization (Estimated Amortization Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>92</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>996287 - Disclosure - Income Taxes (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>93</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>996297 - Disclosure - Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesComponentsOfDeferredTaxAssetsAndLiabilitiesDetails</Role>
      <ShortName>Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>94</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>996307 - Disclosure - Income Taxes (Components of Provision for Income Taxes) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesComponentsOfProvisionForIncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Components of Provision for Income Taxes) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>95</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>996317 - Disclosure - Income Taxes (Reconciliation of U.S. Federal Statutory Tax Rate) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesReconciliationOfUsFederalStatutoryTaxRateDetails</Role>
      <ShortName>Income Taxes (Reconciliation of U.S. Federal Statutory Tax Rate) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>96</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>996327 - Disclosure - Income Taxes (Reconciliation of Gross Unrecognized Tax Benefits, Not Including Interest or Other Potential Offsetting Effects) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesReconciliationOfGrossUnrecognizedTaxBenefitsNotIncludingInterestOrOtherPotentialOffsettingEffectsDetails</Role>
      <ShortName>Income Taxes (Reconciliation of Gross Unrecognized Tax Benefits, Not Including Interest or Other Potential Offsetting Effects) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>97</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>996337 - Disclosure - Short-term Financing (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancingNarrativeDetails</Role>
      <ShortName>Short-term Financing (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancingTables</ParentRole>
      <Position>98</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>996347 - Disclosure - Short-term Financing (Description of Credit Facilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancingDescriptionOfCreditFacilitiesDetails</Role>
      <ShortName>Short-term Financing (Description of Credit Facilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancingTables</ParentRole>
      <Position>99</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>996357 - Disclosure - Short-term Financing (Description of Credit Facilities) (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureShorttermFinancingDescriptionOfCreditFacilitiesParentheticalDetails</Role>
      <ShortName>Short-term Financing (Description of Credit Facilities) (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureShortTermFinancingTables</ParentRole>
      <Position>100</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>996367 - Disclosure - Long-Term Financing (Schedule of Long-Term Debt, at Amortized Cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLongTermFinancingScheduleOfLongTermDebtAtAmortizedCostDetails</Role>
      <ShortName>Long-Term Financing (Schedule of Long-Term Debt, at Amortized Cost) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLongTermFinancingTables</ParentRole>
      <Position>101</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>996377 - Disclosure - Long-Term Financing (Schedule of Long-Term Debt, at Amortized Cost) (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureLongtermFinancingScheduleOfLongtermDebtAtAmortizedCostParentheticalDetails</Role>
      <ShortName>Long-Term Financing (Schedule of Long-Term Debt, at Amortized Cost) (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureLongTermFinancingTables</ParentRole>
      <Position>102</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>996397 - Disclosure - Supplemental Cash Flow Information (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureSupplementalCashFlowInformationNarrativeDetails</Role>
      <ShortName>Supplemental Cash Flow Information (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureSupplementalCashFlowInformation</ParentRole>
      <Position>103</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>996407 - Disclosure - Employee Benefit Plans (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureEmployeeBenefitPlansNarrativeDetails</Role>
      <ShortName>Employee Benefit Plans (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureEmployeeBenefitPlans</ParentRole>
      <Position>104</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>996417 - Disclosure - Commitments and Contingencies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureCommitmentsAndContingenciesNarrativeDetails</Role>
      <ShortName>Commitments and Contingencies (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureCommitmentsAndContingenciesTables</ParentRole>
      <Position>105</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>996427 - Disclosure - Commitments and Contingencies (Minimum Future Payment Obligations) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureCommitmentsAndContingenciesMinimumFuturePaymentObligationsDetails</Role>
      <ShortName>Commitments and Contingencies (Minimum Future Payment Obligations) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureCommitmentsAndContingenciesTables</ParentRole>
      <Position>106</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>996437 - Disclosure - Segment Reporting - Schedule of Total Revenue, Net Income and Significant Expenses Used by the CODM (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureSegmentReportingScheduleOfTotalRevenueNetIncomeAndSignificantExpensesUsedByTheCodmDetails</Role>
      <ShortName>Segment Reporting - Schedule of Total Revenue, Net Income and Significant Expenses Used by the CODM (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>996447 - Disclosure - Segment Reporting - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureSegmentReportingAdditionalInformationDetails</Role>
      <ShortName>Segment Reporting - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="payx-20250531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>996457 - Disclosure - Valuation and Qualifying Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20250531/taxonomy/role/DisclosureValuationAndQualifyingAccountsDetails</Role>
      <ShortName>Valuation and Qualifying Accounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20250531/taxonomy/role/DisclosureValuationAndQualifyingAccounts</ParentRole>
      <Position>109</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-K" isDefinitelyFs="true" isUsgaap="true" original="payx-20250531.htm">payx-20250531.htm</File>
    <File>payx-20250531.xsd</File>
  </InputFiles>
  <SupplementalFiles>
    <File>img61420545_0.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="13">http://fasb.org/srt/2024</BaseTaxonomy>
    <BaseTaxonomy items="1256">http://fasb.org/us-gaap/2024</BaseTaxonomy>
    <BaseTaxonomy items="15">http://xbrl.sec.gov/cyd/2024</BaseTaxonomy>
    <BaseTaxonomy items="39">http://xbrl.sec.gov/dei/2024</BaseTaxonomy>
    <BaseTaxonomy items="5">http://xbrl.sec.gov/ecd/2024</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
