Leases - supplemental income statement information (Details) - USD ($) $ in Millions |
12 Months Ended | ||
|---|---|---|---|
Aug. 31, 2024 |
Aug. 31, 2023 |
Aug. 31, 2022 |
|
| Operating lease cost | |||
| Fixed | $ 3,473 | $ 3,404 | $ 3,240 |
| Variable | 909 | 850 | 825 |
| Finance lease cost | |||
| Amortization | 68 | 47 | 44 |
| Interest | 53 | 51 | 50 |
| Sublease income | 111 | 115 | 105 |
| Impairment of right-of-use assets | 526 | 495 | 218 |
| Gain on sale-leaseback transactions | 295 | 925 | 619 |
| U.S. Retail Pharmacy | |||
| Finance lease cost | |||
| Gain on sale-leaseback transactions | 295 | 747 | 558 |
| International | |||
| Finance lease cost | |||
| Gain on sale-leaseback transactions | $ 0 | 178 | 61 |
| International | Germany | |||
| Finance lease cost | |||
| Gain on sale-leaseback transactions | 178 | ||
| International | Germany | Fiscal Year 2023 Acquisitions | |||
| Finance lease cost | |||
| Gain on sale-leaseback transactions | $ 47 | ||
| International | United Kingdom | |||
| Finance lease cost | |||
| Gain on sale-leaseback transactions | $ 61 | ||
| X | ||||||||||
- Definition Amount of interest expense on finance lease liability. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of amortization expense attributable to right-of-use asset from finance lease. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of single lease cost, calculated by allocation of remaining cost of lease over remaining lease term. Includes, but is not limited to, single lease cost, after impairment of right-of-use asset, calculated by amortization of remaining right-of-use asset and accretion of lease liability. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of loss from impairment of right-of-use asset from operating lease. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef
|
| X | ||||||||||
- Definition Amount of gain (loss) on sale and leaseback transaction from transfer of asset accounted for as sale. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of sublease income excluding finance and operating lease expense. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of variable lease cost, excluded from lease liability, recognized when obligation for payment is incurred for finance and operating leases. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Lessee, Finance Lease, Cost No definition available.
|
| X | ||||||||||
- Definition Operating Lease, Cost No definition available.
|
| X | ||||||||||
- Details
|
| X | ||||||||||
- Details
|
| X | ||||||||||
- Details
|
| X | ||||||||||
- Details
|
| X | ||||||||||
- Details
|