Impacts of Adoption of Standards Related to Revenue Recognition and Leases to Previously Reported Results - (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 |
Mar. 31, 2017 |
[1] | Dec. 31, 2016 |
[1] | Sep. 30, 2016 |
[1] | Jun. 30, 2018 |
Jun. 30, 2017 |
Jun. 30, 2016 |
Jul. 01, 2016 |
||||||||||||||||
| New Accounting Pronouncements Or Change In Accounting Principle [Line Items] | ||||||||||||||||||||||||||||||
| Revenue | $ 30,085 | $ 26,819 | $ 28,918 | $ 24,538 | $ 25,605 | [1] | $ 23,212 | $ 25,826 | $ 21,928 | $ 110,360 | $ 96,571 | [1] | $ 91,154 | |||||||||||||||||
| Provision for income taxes | 19,903 | 4,412 | 5,100 | |||||||||||||||||||||||||||
| Net income | $ 8,873 | [2] | $ 7,424 | [2] | $ (6,302) | [2] | $ 6,576 | [2] | $ 8,069 | [1],[3] | $ 5,486 | $ 6,267 | $ 5,667 | $ 16,571 | [2] | $ 25,489 | [1],[3] | $ 20,539 | ||||||||||||
| Diluted earnings per share | $ 1.14 | [4] | $ 0.95 | [4] | $ (0.82) | [4] | $ 0.84 | [4] | $ 1.03 | [1],[3] | $ 0.70 | $ 0.80 | $ 0.72 | $ 2.13 | [4] | $ 3.25 | [1],[3] | $ 2.56 | ||||||||||||
| Balance Sheets | ||||||||||||||||||||||||||||||
| Accounts receivable, net of allowance for doubtful accounts | $ 26,481 | $ 22,431 | $ 26,481 | $ 22,431 | ||||||||||||||||||||||||||
| Operating lease right-of-use assets | 6,686 | 6,555 | 6,686 | 6,555 | ||||||||||||||||||||||||||
| Other current and long-term assets | 11,179 | 11,179 | ||||||||||||||||||||||||||||
| Unearned revenue | 32,720 | 26,656 | 32,720 | 26,656 | $ 22,200 | |||||||||||||||||||||||||
| Deferred income taxes | 541 | 5,734 | 541 | 5,734 | ||||||||||||||||||||||||||
| Operating lease liabilities | 5,568 | 5,372 | 5,568 | 5,372 | ||||||||||||||||||||||||||
| Other current and long-term liabilities | 24,621 | 24,621 | ||||||||||||||||||||||||||||
| Stockholders' equity | $ 82,718 | 87,711 | $ 82,718 | 87,711 | $ 83,090 | |||||||||||||||||||||||||
| As Previously Reported | ||||||||||||||||||||||||||||||
| New Accounting Pronouncements Or Change In Accounting Principle [Line Items] | ||||||||||||||||||||||||||||||
| Revenue | 89,950 | 85,320 | ||||||||||||||||||||||||||||
| Provision for income taxes | 1,945 | 2,953 | ||||||||||||||||||||||||||||
| Net income | $ 21,204 | $ 16,798 | ||||||||||||||||||||||||||||
| Diluted earnings per share | $ 2.71 | $ 2.10 | ||||||||||||||||||||||||||||
| Balance Sheets | ||||||||||||||||||||||||||||||
| Accounts receivable, net of allowance for doubtful accounts | 19,792 | $ 19,792 | ||||||||||||||||||||||||||||
| Operating lease right-of-use assets | 0 | 0 | ||||||||||||||||||||||||||||
| Other current and long-term assets | 11,147 | 11,147 | ||||||||||||||||||||||||||||
| Unearned revenue | 44,479 | 44,479 | ||||||||||||||||||||||||||||
| Deferred income taxes | 531 | 531 | ||||||||||||||||||||||||||||
| Operating lease liabilities | 0 | 0 | ||||||||||||||||||||||||||||
| Other current and long-term liabilities | 23,464 | 23,464 | ||||||||||||||||||||||||||||
| Stockholders' equity | 72,394 | 72,394 | ||||||||||||||||||||||||||||
| New Revenue Standard Adjustment | Restatement Adjustment | ||||||||||||||||||||||||||||||
| New Accounting Pronouncements Or Change In Accounting Principle [Line Items] | ||||||||||||||||||||||||||||||
| Revenue | 6,621 | $ 5,834 | ||||||||||||||||||||||||||||
| Provision for income taxes | 2,467 | 2,147 | ||||||||||||||||||||||||||||
| Net income | $ 4,285 | $ 3,741 | ||||||||||||||||||||||||||||
| Diluted earnings per share | $ 0.54 | $ 0.46 | ||||||||||||||||||||||||||||
| Balance Sheets | ||||||||||||||||||||||||||||||
| Accounts receivable, net of allowance for doubtful accounts | 2,639 | $ 2,639 | ||||||||||||||||||||||||||||
| Operating lease right-of-use assets | 0 | 0 | ||||||||||||||||||||||||||||
| Other current and long-term assets | 32 | 32 | ||||||||||||||||||||||||||||
| Unearned revenue | (17,823) | (17,823) | ||||||||||||||||||||||||||||
| Deferred income taxes | 5,203 | 5,203 | ||||||||||||||||||||||||||||
| Operating lease liabilities | 0 | 0 | ||||||||||||||||||||||||||||
| Other current and long-term liabilities | (26) | (26) | ||||||||||||||||||||||||||||
| Stockholders' equity | 15,317 | 15,317 | ||||||||||||||||||||||||||||
| New Lease Standard Adjustment | Restatement Adjustment | ||||||||||||||||||||||||||||||
| Balance Sheets | ||||||||||||||||||||||||||||||
| Accounts receivable, net of allowance for doubtful accounts | 0 | 0 | ||||||||||||||||||||||||||||
| Operating lease right-of-use assets | 6,555 | 6,555 | ||||||||||||||||||||||||||||
| Other current and long-term assets | 0 | 0 | ||||||||||||||||||||||||||||
| Unearned revenue | 0 | 0 | ||||||||||||||||||||||||||||
| Deferred income taxes | 0 | 0 | ||||||||||||||||||||||||||||
| Operating lease liabilities | 5,372 | 5,372 | ||||||||||||||||||||||||||||
| Other current and long-term liabilities | 1,183 | 1,183 | ||||||||||||||||||||||||||||
| Stockholders' equity | $ 0 | $ 0 | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||