Quarterly Information (Unaudited) (Detail) - USD ($) $ / shares in Units, $ in Millions |
3 Months Ended | 12 Months Ended | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Jun. 30, 2018 |
Mar. 31, 2018 |
Dec. 31, 2017 |
Sep. 30, 2017 |
Jun. 30, 2017 |
[1] | Mar. 31, 2017 |
[1] | Dec. 31, 2016 |
[1] | Sep. 30, 2016 |
[1] | Jun. 30, 2018 |
Jun. 30, 2017 |
[1] | Jun. 30, 2016 |
||||||||||||||
| Quarterly Financial Information Disclosure [Abstract] | |||||||||||||||||||||||||||||
| Revenue | $ 30,085 | $ 26,819 | $ 28,918 | $ 24,538 | $ 25,605 | $ 23,212 | $ 25,826 | $ 21,928 | $ 110,360 | $ 96,571 | $ 91,154 | ||||||||||||||||||
| Gross margin | 20,343 | 17,550 | 17,854 | 16,260 | 17,149 | 15,152 | 15,925 | 14,084 | 72,007 | 62,310 | 58,374 | ||||||||||||||||||
| Operating income | 10,379 | 8,292 | 8,679 | 7,708 | 7,682 | [2] | 6,723 | 7,905 | 6,715 | 35,058 | 29,025 | [2] | 26,078 | ||||||||||||||||
| Net income (loss) | $ 8,873 | [3] | $ 7,424 | [3] | $ (6,302) | [3] | $ 6,576 | [3] | $ 8,069 | [2] | $ 5,486 | $ 6,267 | $ 5,667 | $ 16,571 | [3] | $ 25,489 | [2] | $ 20,539 | |||||||||||
| Basic earnings (loss) per share | $ 1.15 | $ 0.96 | $ (0.82) | $ 0.85 | $ 1.05 | $ 0.71 | $ 0.81 | $ 0.73 | $ 2.15 | $ 3.29 | $ 2.59 | ||||||||||||||||||
| Diluted earnings (loss) per share | $ 1.14 | [4] | $ 0.95 | [4] | $ (0.82) | [4] | $ 0.84 | [4] | $ 1.03 | [2] | $ 0.70 | $ 0.80 | $ 0.72 | $ 2.13 | [4] | $ 3.25 | [2] | $ 2.56 | |||||||||||
| |||||||||||||||||||||||||||||