Earnings Per Share - Narrative (Details) - USD ($) shares in Millions |
3 Months Ended | 9 Months Ended | ||||
|---|---|---|---|---|---|---|
Feb. 29, 2024 |
Feb. 28, 2023 |
Feb. 29, 2024 |
Feb. 28, 2023 |
Jul. 26, 2022 |
Jul. 27, 2021 |
|
| Earnings Per Share [Abstract] | ||||||
| Options granted and excluded from the computation of diluted earnings per share (in shares) | 0.5 | 0.5 | 0.4 | 1.0 | ||
| July 27, 2021 Plan | ||||||
| Equity, Class of Treasury Stock [Line Items] | ||||||
| Share buyback program, authorized amount | $ 1,500,000,000 | |||||
| July 26, 2022 Plan | ||||||
| Equity, Class of Treasury Stock [Line Items] | ||||||
| Share buyback program, authorized amount | $ 1,000,000,000 | |||||