Operating Income (Loss) by Segment (Detail) - USD ($) $ in Millions |
3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
Dec. 31, 2017 |
Dec. 31, 2016 |
Dec. 31, 2017 |
Dec. 31, 2016 |
|
| Segment Reporting Information [Line Items] | ||||
| Operating income (loss) | $ 8,679 | $ 7,905 | $ 16,387 | $ 14,620 |
| Productivity and Business Processes | ||||
| Segment Reporting Information [Line Items] | ||||
| Operating income (loss) | 3,337 | 3,053 | 6,343 | 5,958 |
| Intelligent Cloud | ||||
| Segment Reporting Information [Line Items] | ||||
| Operating income (loss) | 2,832 | 2,291 | 4,969 | 4,068 |
| More Personal Computing | ||||
| Segment Reporting Information [Line Items] | ||||
| Operating income (loss) | $ 2,510 | $ 2,561 | $ 5,075 | $ 4,594 |