<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>284</ContextCount>
  <ElementCount>492</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>91</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="payx-20240531.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/20240531/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="payx-20240531.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/20240531/taxonomy/role/StatementConsolidatedStatementsOfIncomeAndComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Income and Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100030 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100040 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100050 - Statement - Consolidated Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/StatementConsolidatedStatementsOfStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100060 - Statement - Consolidated Statements of Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/StatementConsolidatedStatementsOfStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100070 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="payx-20240531.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-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>995455 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</Role>
      <ShortName>Description of Business, Basis of Presentation, and Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995465 - Disclosure - Service Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureServiceRevenue</Role>
      <ShortName>Service Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995475 - Disclosure - Basic and Diluted Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShare</Role>
      <ShortName>Basic and Diluted Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995485 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureBusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995495 - Disclosure - Other Income/(Expense), Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureOtherIncomeexpenseNet1</Role>
      <ShortName>Other Income/(Expense), Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995505 - Disclosure - Stock-Based Compensation Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlans</Role>
      <ShortName>Stock-Based Compensation Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995515 - Disclosure - Funds Held for Clients and Corporate Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestments</Role>
      <ShortName>Funds Held for Clients and Corporate Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995525 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureFairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995535 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995545 - Disclosure - Property and Equipment, Net of Accumulated Depreciation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciation</Role>
      <ShortName>Property and Equipment, Net of Accumulated Depreciation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995555 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortization</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995565 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995575 - Disclosure - Short-term Financing</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancing</Role>
      <ShortName>Short-term Financing</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995585 - Disclosure - Long-Term Financing</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLongTermFinancing</Role>
      <ShortName>Long-Term Financing</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995595 - Disclosure - Supplemental Cash Flow Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureSupplementalCashFlowInformation</Role>
      <ShortName>Supplemental Cash Flow Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995605 - Disclosure - Employee Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureEmployeeBenefitPlans</Role>
      <ShortName>Employee Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>995615 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>995625 - Disclosure - Valuation and Qualifying Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureValuationAndQualifyingAccounts</Role>
      <ShortName>Valuation and Qualifying Accounts</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>995635 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Policy)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>995645 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPolicies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995655 - Disclosure - Service Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureServiceRevenueTables</Role>
      <ShortName>Service Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureServiceRevenue</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995665 - Disclosure - Basic and Diluted Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareTables</Role>
      <ShortName>Basic and Diluted Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShare</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>995675 - Disclosure - Other Income/(Expense), Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureOtherIncomeexpenseNetTables</Role>
      <ShortName>Other Income/(Expense), Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureOtherIncomeexpenseNet1</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995685 - Disclosure - Stock-Based Compensation Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</Role>
      <ShortName>Stock-Based Compensation Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlans</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>995695 - Disclosure - Funds Held for Clients and Corporate Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestments</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>995705 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureFairValueMeasurements</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>995715 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeases</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>995725 - Disclosure - Property and Equipment, Net of Accumulated Depreciation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationTables</Role>
      <ShortName>Property and Equipment, Net of Accumulated Depreciation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciation</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>995735 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortization</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>995745 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxes</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>995755 - Disclosure - Short-term Financing (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancingTables</Role>
      <ShortName>Short-term Financing (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancing</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>995765 - Disclosure - Long-Term Financing (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLongTermFinancingTables</Role>
      <ShortName>Long-Term Financing (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureLongTermFinancing</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>995775 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureCommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>995785 - Disclosure - Description of Business, Basis of Presentation, and Significant Accounting Policies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>995795 - 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/20240531/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/20240531/taxonomy/role/DisclosureDescriptionOfBusinessBasisOfPresentationAndSignificantAccountingPoliciesTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>995805 - Disclosure - Service Revenue (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureServiceRevenueNarrativeDetails</Role>
      <ShortName>Service Revenue (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>995815 - Disclosure - Service Revenue (Summary of PEO Pass-Through Costs Netted in Revenue) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>995825 - 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/20240531/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/20240531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>995835 - Disclosure - Service Revenue (Narrative) (Performance Obligation) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureServiceRevenueNarrativePerformanceObligationDetails</Role>
      <ShortName>Service Revenue (Narrative) (Performance Obligation) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>995845 - Disclosure - Service Revenue (Summary of Changes in Deferred Costs to Obtain and Fulfill Contracts) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureServiceRevenueTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>995855 - Disclosure - Basic and Diluted Earnings Per Share (Basic and Diluted Earnings Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>995865 - Disclosure - Business Combinations (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureBusinessCombinationsNarrativeDetails</Role>
      <ShortName>Business Combinations (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureBusinessCombinations</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>995875 - Disclosure - Other Income/(Expense), Net (Schedule of Other Income/(Expense), Net) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureOtherIncomeexpenseNetTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>995885 - Disclosure - Stock-Based Compensation Plans (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansNarrativeDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>995895 - Disclosure - Stock-Based Compensation Plans (Weighted-Average Assumptions) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansWeightedAverageAssumptionsDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Weighted-Average Assumptions) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>995905 - Disclosure - Stock-Based Compensation Plans (Stock Option Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansStockOptionActivityDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Stock Option Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>995915 - Disclosure - Stock-Based Compensation Plans (Other Information Pertaining to Stock Option) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>995925 - Disclosure - Stock-Based Compensation Plans (RSU Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansRsuActivityDetails</Role>
      <ShortName>Stock-Based Compensation Plans (RSU Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>995935 - Disclosure - Stock-Based Compensation Plans (Other Information Pertaining to RSUs) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansOtherInformationPertainingToRsusDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Other Information Pertaining to RSUs) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>995945 - Disclosure - Stock-Based Compensation Plans (Restricted Stock Awards Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansRestrictedStockAwardsActivityDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Restricted Stock Awards Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>995955 - Disclosure - Stock-Based Compensation Plans (Other Information Pertaining to Restricted Stock Awards) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansOtherInformationPertainingToRestrictedStockAwardsDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Other Information Pertaining to Restricted Stock Awards) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>995965 - Disclosure - Stock-Based Compensation Plans (LTIP Performance-Based Stock Option Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansLtipPerformanceBasedStockOptionActivityDetails</Role>
      <ShortName>Stock-Based Compensation Plans (LTIP Performance-Based Stock Option Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>995975 - Disclosure - Stock-Based Compensation Plans (Other Information Pertaining to LTIP Performance-Based Stock Options) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansOtherInformationPertainingToLtipPerformanceBasedStockOptionsDetails</Role>
      <ShortName>Stock-Based Compensation Plans (Other Information Pertaining to LTIP Performance-Based Stock Options) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureStockBasedCompensationPlansTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>995985 - 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/20240531/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/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>995995 - Disclosure - Funds Held for Clients and Corporate Investments (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsNarrativeDetails</Role>
      <ShortName>Funds Held for Clients and Corporate Investments (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>996005 - 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/20240531/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/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>996015 - Disclosure - Funds Held for Clients and Corporate Investments (Securities in Unrealized Loss Position) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>996025 - 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/20240531/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/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>996035 - 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/20240531/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/20240531/taxonomy/role/DisclosureFundsHeldForClientsAndCorporateInvestmentsTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>996045 - Disclosure - Fair Value Measurements (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureFairValueMeasurementsNarrativeDetails</Role>
      <ShortName>Fair Value Measurements (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>996055 - 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/20240531/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/20240531/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>996065 - Disclosure - Leases (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesNarrativeDetails</Role>
      <ShortName>Leases (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>996075 - Disclosure - Leases (Supplemental Balance Sheet Information Related to Leases) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesSupplementalBalanceSheetInformationRelatedToLeasesDetails</Role>
      <ShortName>Leases (Supplemental Balance Sheet Information Related to Leases) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>996085 - Disclosure - Leases (Components of Lease Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesComponentsOfLeaseExpenseDetails</Role>
      <ShortName>Leases (Components of Lease Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>996095 - Disclosure - Leases (Supplemental Cash Flow Information Related to Leases) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesSupplementalCashFlowInformationRelatedToLeasesDetails</Role>
      <ShortName>Leases (Supplemental Cash Flow Information Related to Leases) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>996105 - Disclosure - Leases - (Future Lease Payments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLeasesFutureLeasePaymentsDetails1</Role>
      <ShortName>Leases - (Future Lease Payments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>996115 - 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/20240531/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/20240531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationTables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>996125 - Disclosure - Property and Equipment, Net of Accumulated Depreciation (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationNarrativeDetails</Role>
      <ShortName>Property and Equipment, Net of Accumulated Depreciation (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosurePropertyAndEquipmentNetOfAccumulatedDepreciationTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>996135 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationNarrativeDetails</Role>
      <ShortName>Goodwill and Intangible Assets, Net of Accumulated Amortization (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>996145 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Change in Goodwill) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>996155 - 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/20240531/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/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>996165 - Disclosure - Goodwill and Intangible Assets, Net of Accumulated Amortization (Estimated Amortization Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureGoodwillAndIntangibleAssetsNetOfAccumulatedAmortizationTables</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>996175 - Disclosure - Income Taxes (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>996185 - Disclosure - Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxesComponentsOfDeferredTaxAssetsAndLiabilitiesDetails</Role>
      <ShortName>Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>996195 - Disclosure - Income Taxes (Components of Provision for Income Taxes) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxesComponentsOfProvisionForIncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Components of Provision for Income Taxes) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>83</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>996205 - Disclosure - Income Taxes (Reconciliation of U.S. Federal Statutory Tax Rate) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>996215 - 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/20240531/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/20240531/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>996225 - Disclosure - Short-term Financing (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancingNarrativeDetails</Role>
      <ShortName>Short-term Financing (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancingTables</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>996235 - Disclosure - Short-term Financing (Description of Credit Facilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancingDescriptionOfCreditFacilitiesDetails</Role>
      <ShortName>Short-term Financing (Description of Credit Facilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancingTables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>996245 - Disclosure - Short-term Financing (Description of Credit Facilities) (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureShorttermFinancingDescriptionOfCreditFacilitiesParentheticalDetails</Role>
      <ShortName>Short-term Financing (Description of Credit Facilities) (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureShortTermFinancingTables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>996255 - Disclosure - Long-Term Financing (Schedule of Long-Term Debt, at Amortized Cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/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/20240531/taxonomy/role/DisclosureLongTermFinancingTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>996265 - Disclosure - Long-Term Financing (Information Related to Senior Notes) (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureLongTermFinancingInformationRelatedToSeniorNotesDetails</Role>
      <ShortName>Long-Term Financing (Information Related to Senior Notes) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureLongTermFinancingTables</ParentRole>
      <Position>90</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>996285 - Disclosure - Supplemental Cash Flow Information (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureSupplementalCashFlowInformationNarrativeDetails</Role>
      <ShortName>Supplemental Cash Flow Information (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureSupplementalCashFlowInformation</ParentRole>
      <Position>91</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>996295 - Disclosure - Employee Benefit Plans (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureEmployeeBenefitPlansNarrativeDetails</Role>
      <ShortName>Employee Benefit Plans (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureEmployeeBenefitPlans</ParentRole>
      <Position>92</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>996305 - Disclosure - Commitments and Contingencies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureCommitmentsAndContingenciesNarrativeDetails</Role>
      <ShortName>Commitments and Contingencies (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureCommitmentsAndContingenciesTables</ParentRole>
      <Position>93</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>996315 - Disclosure - Commitments and Contingencies (Minimum Future Payment Obligations) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureCommitmentsAndContingenciesMinimumFuturePaymentObligationsDetails</Role>
      <ShortName>Commitments and Contingencies (Minimum Future Payment Obligations) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureCommitmentsAndContingenciesTables</ParentRole>
      <Position>94</Position>
    </Report>
    <Report instance="payx-20240531.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>996325 - Disclosure - Valuation and Qualifying Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.paychex.com/20240531/taxonomy/role/DisclosureValuationAndQualifyingAccountsDetails</Role>
      <ShortName>Valuation and Qualifying Accounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.paychex.com/20240531/taxonomy/role/DisclosureValuationAndQualifyingAccounts</ParentRole>
      <Position>95</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-20240531.htm">payx-20240531.htm</File>
    <File>payx-20240531.xsd</File>
  </InputFiles>
  <SupplementalFiles>
    <File>img60497024_0.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2023</BaseTaxonomy>
    <BaseTaxonomy items="1165">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="39">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
