<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="payx-20260716.xsd" xlink:type="simple"/>
    <context id="C_1c0273e7-564d-4244-8564-08cc301a24a8">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000723531</identifier>
        </entity>
        <period>
            <startDate>2026-07-16</startDate>
            <endDate>2026-07-16</endDate>
        </period>
    </context>
    <dei:AmendmentFlag
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_be22fab0-4139-4464-b98a-5773c7399a14">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_51deed3a-db98-4dad-a07e-08c369b52e98">0000723531</dei:EntityCentralIndexKey>
    <dei:DocumentType
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_a09e2d9f-23ea-4707-9d14-a687cb319124">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_60f9a64b-f210-47b9-89ed-25e7421f22ae">2026-07-16</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_aab3d497-4036-46b2-96f6-e573b2392398">Paychex, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_f7ec8114-f2be-40d7-b57d-4b31eee81304">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_8948298a-7fe6-4877-a40a-024debec95ac">0-11330</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_679cf9c3-2849-4a85-9fe7-32a2e368153e">16-1124166</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_ef754029-2827-4b97-a48c-8fabe4e45f46">911 Panorama Trail South</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_249483a0-d04b-473e-a445-28c21a19615a">Rochester</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_24e6a876-2a8a-469d-8b99-9ca34bc8e0b6">NY</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_0b9081c5-eabc-4f8f-8bb0-8de9b2d0b9da">14625-2396</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_e9c87852-ebb3-4c50-81ed-d6b780ff71e7">(585)</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_72b28636-cecd-4a91-a1ad-7641eeeb5b81">385-6666</dei:LocalPhoneNumber>
    <dei:EntityInformationFormerLegalOrRegisteredName
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_0391a16e-3574-4047-9390-bd489061c2d8">N/A</dei:EntityInformationFormerLegalOrRegisteredName>
    <dei:WrittenCommunications
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_eabdacd6-0325-4a28-91a7-66b3086a7e68">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_2f1107da-d2c4-4972-b7bb-bf97b0ebe586">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_1a8caa3c-a48d-4716-a4df-171bdf8d34dd">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_2c0b6d49-45be-440e-b99b-0ab88ab74bdb">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_d3aee6f6-84a0-4c67-8ad1-8839111fff4c">Common Stock, $0.01 par value</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_56086163-d5e7-446e-b43a-344063039aec">PAYX</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_52253725-06a2-494b-8429-ff278c329679">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="C_1c0273e7-564d-4244-8564-08cc301a24a8"
      id="F_3fb30931-72ed-4208-90bd-fb26bee8f9e8">false</dei:EntityEmergingGrowthCompany>
</xbrl>
