Quarterly Information (Unaudited) (Parenthetical) (Detail) - USD ($) $ / shares in Units, $ in Millions |
3 Months Ended | 12 Months Ended | ||||
|---|---|---|---|---|---|---|
Jun. 30, 2018 |
Dec. 31, 2017 |
Jun. 30, 2017 |
Jun. 30, 2018 |
Jun. 30, 2017 |
Jun. 30, 2016 |
|
| Quarterly Financial Information [Line Items] | ||||||
| Provision (benefit) for income taxes | $ 19,903 | $ 4,412 | $ 5,100 | |||
| Decrease in operating income due to restructuring | $ 306 | |||||
| Decrease in net income due to restructuring | $ 243 | |||||
| Decrease in diluted earnings per share due to restructuring | $ 0.04 | |||||
| Sales and Marketing Restructuring Plan | Severance | ||||||
| Quarterly Financial Information [Line Items] | ||||||
| Restructuring charges | $ 306 | |||||
| Tax Cuts and Jobs Act | ||||||
| Quarterly Financial Information [Line Items] | ||||||
| Provision (benefit) for income taxes | $ (104) | $ 13,800 | $ 13,700 | |||
| Decrease (increase) in diluted earnings per share | $ (0.01) | $ 1.78 | $ 1.75 | |||