Earnings Per Share - Schedule of Non Cash Buyback Activity by Program (Details) - USD ($) $ / shares in Units, shares in Thousands, $ in Thousands |
3 Months Ended | 9 Months Ended | ||||||
|---|---|---|---|---|---|---|---|---|
Feb. 29, 2024 |
Nov. 30, 2023 |
Aug. 31, 2023 |
Feb. 28, 2023 |
Nov. 30, 2022 |
Aug. 31, 2022 |
Feb. 29, 2024 |
Feb. 28, 2023 |
|
| Equity, Class of Treasury Stock [Line Items] | ||||||||
| Stock purchased under share buyback | $ 45,018 | $ 349,852 | $ 73,276 | $ 22,235 | $ 28,348 | $ 320,334 | $ 468,146 | $ 370,917 |
| Noncash Share Repurchase Transaction | ||||||||
| Equity, Class of Treasury Stock [Line Items] | ||||||||
| Stock purchased under share buyback (in shares) | 58 | 54 | 244 | 313 | ||||
| Stock purchased under share buyback, average price (in dollars per share) | $ 598.80 | $ 445.60 | $ 528.68 | $ 419.78 | ||||
| Stock purchased under share buyback | $ 34,723 | $ 23,852 | $ 129,023 | $ 131,418 | ||||