Changes in Gross Unrecognized Tax Benefits Related to Uncertain Tax Positions (Detail) - USD ($) $ in Millions |
12 Months Ended | ||
|---|---|---|---|
Jun. 30, 2019 |
Jun. 30, 2018 |
Jun. 30, 2017 |
|
| Income Tax Disclosure [Abstract] | |||
| Beginning unrecognized tax benefits | $ 11,961 | $ 11,737 | $ 10,164 |
| Decreases related to settlements | (316) | (193) | (4) |
| Increases for tax positions related to the current year | 2,106 | 1,445 | 1,277 |
| Increases for tax positions related to prior years | 508 | 151 | 397 |
| Decreases for tax positions related to prior years | (1,113) | (1,176) | (49) |
| Decreases due to lapsed statutes of limitations | 0 | (3) | (48) |
| Ending unrecognized tax benefits | $ 13,146 | $ 11,961 | $ 11,737 |