Funds Held for Clients and Corporate Investments (Tables)
   | 
9 Months Ended | 
Feb. 29, 2024  | 
| Funds Held for Clients and Corporate Investments [Abstract] | 
 
 | 
| Funds Held for Clients and Corporate Investments | 
 Funds held for clients and corporate investments were as follows: 
  
      
       
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
        
       
           | 
           | 
        February 29, 2024  | 
           | 
        
       
           | 
           | 
           | 
           | 
           | 
           | 
        Gross  | 
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
        
       
           | 
           | 
        Amortized  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
        
       
        In millions  | 
           | 
        cost  | 
           | 
           | 
        gains  | 
           | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
        
       
        Type of issue:  | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
        
       
        Funds held for clients' money market securities and other     restricted cash equivalents  | 
           | 
        $  | 
           | 
        2,798.3  | 
           | 
           | 
        $  | 
           | 
        —  | 
           | 
           | 
        $  | 
           | 
        —  | 
           | 
           | 
        $  | 
           | 
        2,798.3  | 
           | 
        
       
        AFS securities:  | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
        
       
        Asset-backed securities  | 
           | 
           | 
           | 
        101.1  | 
           | 
           | 
           | 
           | 
        0.2  | 
           | 
           | 
           | 
           | 
        (0.9  | 
        )  | 
           | 
           | 
           | 
        100.4  | 
           | 
        
       
        Corporate bonds  | 
           | 
           | 
           | 
        1,429.4  | 
           | 
           | 
           | 
           | 
        1.9  | 
           | 
           | 
           | 
           | 
        (31.2  | 
        )  | 
           | 
           | 
           | 
        1,400.1  | 
           | 
        
       
        Municipal bonds  | 
           | 
           | 
           | 
        1,096.1  | 
           | 
           | 
           | 
           | 
        0.2  | 
           | 
           | 
           | 
           | 
        (91.5  | 
        )  | 
           | 
           | 
           | 
        1,004.8  | 
           | 
        
       
        U.S. government agency and treasury securities  | 
           | 
           | 
           | 
        820.3  | 
           | 
           | 
           | 
           | 
        0.2  | 
           | 
           | 
           | 
           | 
        (40.8  | 
        )  | 
           | 
           | 
           | 
        779.7  | 
           | 
        
       
        Variable rate demand notes  | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        —  | 
           | 
        
       
        Total AFS securities  | 
           | 
           | 
           | 
        3,446.9  | 
           | 
           | 
           | 
           | 
        2.5  | 
           | 
           | 
           | 
           | 
        (164.4  | 
        )  | 
           | 
           | 
           | 
        3,285.0  | 
           | 
        
       
        Other  | 
           | 
           | 
           | 
        33.3  | 
           | 
           | 
           | 
           | 
        3.0  | 
           | 
           | 
           | 
           | 
        (1.9  | 
        )  | 
           | 
           | 
           | 
        34.4  | 
           | 
        
       
        Total funds held for clients and corporate investments  | 
           | 
        $  | 
           | 
        6,278.5  | 
           | 
           | 
        $  | 
           | 
        5.5  | 
           | 
           | 
        $  | 
           | 
        (166.3  | 
        )  | 
           | 
        $  | 
           | 
        6,117.7  | 
           | 
        
       
  
  
  
      
       
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
        
       
           | 
           | 
        May 31, 2023  | 
           | 
        
       
           | 
           | 
           | 
           | 
           | 
           | 
        Gross  | 
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
        
       
           | 
           | 
        Amortized  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
        
       
        In millions  | 
           | 
        cost  | 
           | 
           | 
        gains  | 
           | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
        
       
        Type of issue:  | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
        
       
        Funds held for clients' money market securities and other     restricted cash equivalents  | 
           | 
        $  | 
           | 
        863.1  | 
           | 
           | 
        $  | 
           | 
        —  | 
           | 
           | 
        $  | 
           | 
        —  | 
           | 
           | 
        $  | 
           | 
        863.1  | 
           | 
        
       
        AFS securities:  | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
        
       
        Asset-backed securities  | 
           | 
           | 
           | 
        88.1  | 
           | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        (1.4  | 
        )  | 
           | 
           | 
           | 
        86.7  | 
           | 
        
       
        Corporate bonds  | 
           | 
           | 
           | 
        1,468.3  | 
           | 
           | 
           | 
           | 
        3.7  | 
           | 
           | 
           | 
           | 
        (31.1  | 
        )  | 
           | 
           | 
           | 
        1,440.9  | 
           | 
        
       
        Municipal bonds  | 
           | 
           | 
           | 
        1,091.3  | 
           | 
           | 
           | 
           | 
        0.1  | 
           | 
           | 
           | 
           | 
        (105.3  | 
        )  | 
           | 
           | 
           | 
        986.1  | 
           | 
        
       
        U.S. government agency and treasury securities  | 
           | 
           | 
           | 
        788.1  | 
           | 
           | 
           | 
           | 
        0.3  | 
           | 
           | 
           | 
           | 
        (41.6  | 
        )  | 
           | 
           | 
           | 
        746.8  | 
           | 
        
       
        Variable rate demand notes  | 
           | 
           | 
           | 
        344.1  | 
           | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        344.1  | 
           | 
        
       
        Total AFS securities  | 
           | 
           | 
           | 
        3,779.9  | 
           | 
           | 
           | 
           | 
        4.1  | 
           | 
           | 
           | 
           | 
        (179.4  | 
        )  | 
           | 
           | 
           | 
        3,604.6  | 
           | 
        
       
        Other  | 
           | 
           | 
           | 
        30.1  | 
           | 
           | 
           | 
           | 
        1.1  | 
           | 
           | 
           | 
           | 
        (2.9  | 
        )  | 
           | 
           | 
           | 
        28.3  | 
           | 
        
       
        Total funds held for clients and corporate investments  | 
           | 
        $  | 
           | 
        4,673.1  | 
           | 
           | 
        $  | 
           | 
        5.2  | 
           | 
           | 
        $  | 
           | 
        (182.3  | 
        )  | 
           | 
        $  | 
           | 
        4,496.0  | 
           | 
        
       
 | 
| Classification of Investments on Consolidated Balance Sheets | 
 The classification of funds held for clients and corporate investments on the Consolidated Balance Sheets was as follows: 
  
      
       
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
        
       
           | 
           | 
        February 29,  | 
           | 
           | 
        May 31,  | 
           | 
        
       
        In millions  | 
           | 
        2024  | 
           | 
           | 
        2023  | 
           | 
        
       
        Funds held for clients  | 
           | 
        $  | 
           | 
        6,079.5  | 
           | 
           | 
        $  | 
           | 
        4,118.8  | 
           | 
        
       
        Corporate investments  | 
           | 
           | 
           | 
        36.6  | 
           | 
           | 
           | 
           | 
        373.4  | 
           | 
        
       
        Long-term corporate investments  | 
           | 
           | 
           | 
        1.6  | 
           | 
           | 
           | 
           | 
        3.8  | 
           | 
        
       
        Total funds held for clients and corporate investments  | 
           | 
        $  | 
           | 
        6,117.7  | 
           | 
           | 
        $  | 
           | 
        4,496.0  | 
           | 
        
       
 | 
| Securities in Unrealized Loss Position | 
 AFS securities in an unrealized loss position for which a credit loss has not been recognized were as follows: 
  
      
       
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
        
       
           | 
           | 
        February 29, 2024  | 
           | 
        
       
           | 
           | 
        Securities in an unrealized  loss position for less than  twelve months  | 
           | 
           | 
        Securities in an unrealized  loss position for more than  twelve months  | 
           | 
           | 
        Total  | 
           | 
        
       
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
        
       
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
        
       
        In millions  | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
        
       
        Type of issue:  | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
        
       
        Asset-backed securities  | 
           | 
        $  | 
           | 
        (0.3  | 
        )  | 
           | 
        $  | 
           | 
        63.2  | 
           | 
           | 
        $  | 
           | 
        (0.6  | 
        )  | 
           | 
        $  | 
           | 
        15.3  | 
           | 
           | 
        $  | 
           | 
        (0.9  | 
        )  | 
           | 
        $  | 
           | 
        78.5  | 
           | 
        
       
        Corporate bonds  | 
           | 
           | 
           | 
        (9.5  | 
        )  | 
           | 
           | 
           | 
        792.2  | 
           | 
           | 
           | 
           | 
        (21.7  | 
        )  | 
           | 
           | 
           | 
        478.5  | 
           | 
           | 
           | 
           | 
        (31.2  | 
        )  | 
           | 
           | 
           | 
        1,270.7  | 
           | 
        
       
        Municipal bonds  | 
           | 
           | 
           | 
        (7.9  | 
        )  | 
           | 
           | 
           | 
        98.7  | 
           | 
           | 
           | 
           | 
        (83.6  | 
        )  | 
           | 
           | 
           | 
        892.1  | 
           | 
           | 
           | 
           | 
        (91.5  | 
        )  | 
           | 
           | 
           | 
        990.8  | 
           | 
        
       
        U.S. government agency and treasury securities  | 
           | 
           | 
           | 
        (3.9  | 
        )  | 
           | 
           | 
           | 
        249.8  | 
           | 
           | 
           | 
           | 
        (36.9  | 
        )  | 
           | 
           | 
           | 
        518.8  | 
           | 
           | 
           | 
           | 
        (40.8  | 
        )  | 
           | 
           | 
           | 
        768.6  | 
           | 
        
       
        Total  | 
           | 
        $  | 
           | 
        (21.6  | 
        )  | 
           | 
        $  | 
           | 
        1,203.9  | 
           | 
           | 
        $  | 
           | 
        (142.8  | 
        )  | 
           | 
        $  | 
           | 
        1,904.7  | 
           | 
           | 
        $  | 
           | 
        (164.4  | 
        )  | 
           | 
        $  | 
           | 
        3,108.6  | 
           | 
        
       
  
      
       
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
        
       
           | 
           | 
        May 31, 2023  | 
           | 
        
       
           | 
           | 
        Securities in an unrealized  loss position for less than  twelve months  | 
           | 
           | 
        Securities in an unrealized  loss position for more than  twelve months  | 
           | 
           | 
        Total  | 
           | 
        
       
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
           | 
        Gross  | 
           | 
           | 
           | 
           | 
           | 
        
       
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
           | 
        unrealized  | 
           | 
           | 
        Fair  | 
           | 
        
       
        In millions  | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
           | 
        losses  | 
           | 
           | 
        value  | 
           | 
        
       
        Type of issue:  | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
        
       
        Asset-backed securities  | 
           | 
        $  | 
           | 
        (0.1  | 
        )  | 
           | 
        $  | 
           | 
        54.2  | 
           | 
           | 
        $  | 
           | 
        (1.3  | 
        )  | 
           | 
        $  | 
           | 
        23.3  | 
           | 
           | 
        $  | 
           | 
        (1.4  | 
        )  | 
           | 
        $  | 
           | 
        77.5  | 
           | 
        
       
        Corporate bonds  | 
           | 
           | 
           | 
        (5.9  | 
        )  | 
           | 
           | 
           | 
        652.0  | 
           | 
           | 
           | 
           | 
        (25.2  | 
        )  | 
           | 
           | 
           | 
        382.7  | 
           | 
           | 
           | 
           | 
        (31.1  | 
        )  | 
           | 
           | 
           | 
        1,034.7  | 
           | 
        
       
        Municipal bonds  | 
           | 
           | 
           | 
        (5.9  | 
        )  | 
           | 
           | 
           | 
        86.7  | 
           | 
           | 
           | 
           | 
        (99.4  | 
        )  | 
           | 
           | 
           | 
        889.0  | 
           | 
           | 
           | 
           | 
        (105.3  | 
        )  | 
           | 
           | 
           | 
        975.7  | 
           | 
        
       
        U.S. government agency and treasury securities  | 
           | 
           | 
           | 
        (3.3  | 
        )  | 
           | 
           | 
           | 
        199.6  | 
           | 
           | 
           | 
           | 
        (38.3  | 
        )  | 
           | 
           | 
           | 
        457.9  | 
           | 
           | 
           | 
           | 
        (41.6  | 
        )  | 
           | 
           | 
           | 
        657.5  | 
           | 
        
       
        Total  | 
           | 
        $  | 
           | 
        (15.2  | 
        )  | 
           | 
        $  | 
           | 
        992.5  | 
           | 
           | 
        $  | 
           | 
        (164.2  | 
        )  | 
           | 
        $  | 
           | 
        1,752.9  | 
           | 
           | 
        $  | 
           | 
        (179.4  | 
        )  | 
           | 
        $  | 
           | 
        2,745.4  | 
           | 
        
       
 | 
| Realized Gains and Losses from Sale of Available-for-sale Securities | 
 Realized gains and losses from the sale of AFS securities were as follows:  
  
      
       
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
        
       
           | 
           | 
        For the three months ended  | 
           | 
           | 
        For the nine months ended  | 
           | 
        
       
           | 
           | 
        February 29,  | 
           | 
           | 
        February 28,  | 
           | 
           | 
        February 29,  | 
           | 
           | 
        February 28,  | 
           | 
        
       
        In millions  | 
           | 
        2024  | 
           | 
           | 
        2023  | 
           | 
           | 
        2024  | 
           | 
           | 
        2023  | 
           | 
        
       
        Gross realized gains  | 
           | 
        $  | 
           | 
        0.0  | 
           | 
           | 
        $  | 
           | 
        0.0  | 
           | 
           | 
        $  | 
           | 
        0.0  | 
           | 
           | 
        $  | 
           | 
        0.1  | 
           | 
        
       
        Gross realized losses  | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        —  | 
           | 
           | 
           | 
           | 
        (0.0  | 
        )  | 
           | 
           | 
           | 
        (0.0  | 
        )  | 
        
       
        Net realized (losses)/gains  | 
           | 
        $  | 
           | 
        0.0  | 
           | 
           | 
        $  | 
           | 
        0.0  | 
           | 
           | 
        $  | 
           | 
        (0.0  | 
        )  | 
           | 
        $  | 
           | 
        0.1  | 
           | 
        
       
 | 
| Amortized Cost and Fair Value of Available-for-Sale Securities by Contractual Maturity | 
 The amortized cost and fair value of AFS securities that had stated maturities as of February 29, 2024 are shown below by expected maturity. 
  
      
       
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
         | 
        
       
           | 
           | 
        February 29, 2024  | 
           | 
        
       
           | 
           | 
        Amortized  | 
           | 
           | 
        Fair  | 
           | 
        
       
        In millions  | 
           | 
        cost  | 
           | 
           | 
        value  | 
           | 
        
       
        Maturity date:  | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
           | 
        
       
        Due in one year or less  | 
           | 
        $  | 
           | 
        157.0  | 
           | 
           | 
        $  | 
           | 
        154.5  | 
           | 
        
       
        Due after one year through three years  | 
           | 
           | 
           | 
        1,262.6  | 
           | 
           | 
           | 
           | 
        1,197.0  | 
           | 
        
       
        Due after three years through five years  | 
           | 
           | 
           | 
        1,675.5  | 
           | 
           | 
           | 
           | 
        1,588.0  | 
           | 
        
       
        Due after five years  | 
           | 
           | 
           | 
        351.8  | 
           | 
           | 
           | 
           | 
        345.5  | 
           | 
        
       
        Total  | 
           | 
        $  | 
           | 
        3,446.9  | 
           | 
           | 
        $  | 
           | 
        3,285.0  | 
           | 
        
       
 |