v3.8.0.1
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 6 Months Ended
Dec. 31, 2017
Dec. 31, 2016
Dec. 31, 2017
Dec. 31, 2016
Jun. 30, 2017
Jul. 01, 2016
New Accounting Pronouncements Or Change In Accounting Principle [Line Items]            
Revenue $ 28,918 $ 25,826 $ 53,456 $ 47,754    
Provision for income taxes 15,471 1,755 16,879 2,915    
Net income $ (6,302) $ 6,267 $ 274 $ 11,934    
Diluted earnings per share $ (0.82) $ 0.80 $ 0.04 $ 1.52    
Balance Sheets            
Accounts receivable, net of allowance for doubtful accounts $ 18,428   $ 18,428   $ 22,431  
Operating lease right-of-use assets 6,749   6,749   6,555  
Other current and long-term assets         11,179  
Unearned revenue 23,809   23,809   26,656 $ 22,200
Deferred income taxes 3,186   3,186   5,734  
Operating lease liabilities 5,640   5,640   5,372  
Other current and long-term liabilities         24,621  
Stockholders' equity $ 78,360 $ 81,829 $ 78,360 $ 81,829 87,711  
As Previously Reported            
New Accounting Pronouncements Or Change In Accounting Principle [Line Items]            
Revenue   24,090   44,543    
Provision for income taxes   1,163   1,798    
Net income   $ 5,200   $ 9,890    
Diluted earnings per share   $ 0.66   $ 1.26    
Balance Sheets            
Accounts receivable, net of allowance for doubtful accounts         19,792  
Operating lease right-of-use assets         0  
Other current and long-term assets         11,147  
Unearned revenue         44,479  
Deferred income taxes         531  
Operating lease liabilities         0  
Other current and long-term liabilities         23,464  
Stockholders' equity         72,394  
New Revenue Standard Adjustment | Restatement Adjustment            
New Accounting Pronouncements Or Change In Accounting Principle [Line Items]            
Revenue   $ 1,736   $ 3,211    
Provision for income taxes   592   1,117    
Net income   $ 1,067   $ 2,044    
Diluted earnings per share   $ 0.14   $ 0.26    
Balance Sheets            
Accounts receivable, net of allowance for doubtful accounts         2,639  
Operating lease right-of-use assets         0  
Other current and long-term assets         32  
Unearned revenue         (17,823)  
Deferred income taxes         5,203  
Operating lease liabilities         0  
Other current and long-term liabilities         (26)  
Stockholders' equity         15,317  
New Lease Standard Adjustment | Restatement Adjustment            
Balance Sheets            
Accounts receivable, net of allowance for doubtful accounts         0  
Operating lease right-of-use assets         6,555  
Other current and long-term assets         0  
Unearned revenue         0  
Deferred income taxes         0  
Operating lease liabilities         5,372  
Other current and long-term liabilities         1,183  
Stockholders' equity         $ 0