Financial instruments - warrants (Details) - Derivatives not designated as hedges: - USD ($) $ in Millions |
12 Months Ended | ||
|---|---|---|---|
Aug. 31, 2024 |
Aug. 31, 2023 |
Aug. 31, 2022 |
|
| Foreign currency forwards | Other income (expense) | |||
| Warrants [Abstract] | |||
| Gains (losses) due to changes in fair value of derivative instruments | $ (39) | $ (273) | $ 523 |
| Total return swaps | Selling, general and administrative expense | |||
| Warrants [Abstract] | |||
| Gains (losses) due to changes in fair value of derivative instruments | 29 | 12 | (33) |
| Variable prepaid forward | Other income (expense) | |||
| Warrants [Abstract] | |||
| Gains (losses) due to changes in fair value of derivative instruments | $ (946) | $ 19 | $ 0 |