<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.21.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>436</ContextCount>
  <ElementCount>420</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>101</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>5</UnitCount>
  <MyReports>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - INCOME STATEMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/StatementINCOMESTATEMENTS</Role>
      <ShortName>INCOME STATEMENTS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020 - Statement - COMPREHENSIVE INCOME STATEMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/StatementCOMPREHENSIVEINCOMESTATEMENTS</Role>
      <ShortName>COMPREHENSIVE INCOME STATEMENTS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030 - Statement - BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/StatementBALANCESHEETS</Role>
      <ShortName>BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040 - Statement - BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/StatementBALANCESHEETSParenthetical</Role>
      <ShortName>BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050 - Statement - CASH FLOWS STATEMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/StatementCASHFLOWSSTATEMENTS</Role>
      <ShortName>CASH FLOWS STATEMENTS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060 - Statement - STOCKHOLDERS' EQUITY STATEMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/StatementSTOCKHOLDERSEQUITYSTATEMENTS</Role>
      <ShortName>STOCKHOLDERS' EQUITY STATEMENTS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070 - Disclosure - ACCOUNTING POLICIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureACCOUNTINGPOLICIES</Role>
      <ShortName>ACCOUNTING POLICIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>100080 - Disclosure - EARNINGS PER SHARE</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureEARNINGSPERSHARE</Role>
      <ShortName>EARNINGS PER SHARE</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>100090 - Disclosure - OTHER INCOME (EXPENSE), NET</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureOTHERINCOMEEXPENSENET</Role>
      <ShortName>OTHER INCOME (EXPENSE), NET</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>100100 - Disclosure - INVESTMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINVESTMENTS</Role>
      <ShortName>INVESTMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>100110 - Disclosure - DERIVATIVES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDERIVATIVES</Role>
      <ShortName>DERIVATIVES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>100120 - Disclosure - INVENTORIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINVENTORIES</Role>
      <ShortName>INVENTORIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>100130 - Disclosure - BUSINESS COMBINATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureBUSINESSCOMBINATIONS</Role>
      <ShortName>BUSINESS COMBINATIONS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>100140 - Disclosure - GOODWILL</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureGOODWILL</Role>
      <ShortName>GOODWILL</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>100150 - Disclosure - INTANGIBLE ASSETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINTANGIBLEASSETS</Role>
      <ShortName>INTANGIBLE ASSETS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>100160 - Disclosure - DEBT</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDEBT</Role>
      <ShortName>DEBT</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>100170 - Disclosure - INCOME TAXES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINCOMETAXES</Role>
      <ShortName>INCOME TAXES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>100180 - Disclosure - UNEARNED REVENUE</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureUNEARNEDREVENUE</Role>
      <ShortName>UNEARNED REVENUE</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>100190 - Disclosure - LEASES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureLEASES</Role>
      <ShortName>LEASES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>100200 - Disclosure - CONTINGENCIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureCONTINGENCIES</Role>
      <ShortName>CONTINGENCIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>100210 - Disclosure - STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSTOCKHOLDERSEQUITY</Role>
      <ShortName>STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>100220 - Disclosure - ACCUMULATED OTHER COMPREHENSIVE INCOME (LOSS)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureACCUMULATEDOTHERCOMPREHENSIVEINCOMELOSS</Role>
      <ShortName>ACCUMULATED OTHER COMPREHENSIVE INCOME (LOSS)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>100230 - Disclosure - SEGMENT INFORMATION AND GEOGRAPHIC DATA</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSEGMENTINFORMATIONANDGEOGRAPHICDATA</Role>
      <ShortName>SEGMENT INFORMATION AND GEOGRAPHIC DATA</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>100240 - Disclosure - SUBSEQUENT EVENT</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSUBSEQUENTEVENT</Role>
      <ShortName>SUBSEQUENT EVENT</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>100250 - Disclosure - ACCOUNTING POLICIES (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureACCOUNTINGPOLICIESPolicies</Role>
      <ShortName>ACCOUNTING POLICIES (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>100260 - Disclosure - EARNINGS PER SHARE (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureEARNINGSPERSHARETables</Role>
      <ShortName>EARNINGS PER SHARE (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureEARNINGSPERSHARE</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>100270 - Disclosure - OTHER INCOME (EXPENSE), NET (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureOTHERINCOMEEXPENSENETTables</Role>
      <ShortName>OTHER INCOME (EXPENSE), NET (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureOTHERINCOMEEXPENSENET</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>100280 - Disclosure - INVESTMENTS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINVESTMENTSTables</Role>
      <ShortName>INVESTMENTS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINVESTMENTS</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>100290 - Disclosure - DERIVATIVES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDERIVATIVESTables</Role>
      <ShortName>DERIVATIVES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDERIVATIVES</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>100300 - Disclosure - INVENTORIES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINVENTORIESTables</Role>
      <ShortName>INVENTORIES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINVENTORIES</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>100310 - Disclosure - BUSINESS COMBINATIONS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureBUSINESSCOMBINATIONSTables</Role>
      <ShortName>BUSINESS COMBINATIONS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureBUSINESSCOMBINATIONS</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>100320 - Disclosure - GOODWILL (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureGOODWILLTables</Role>
      <ShortName>GOODWILL (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureGOODWILL</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>100330 - Disclosure - INTANGIBLE ASSETS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINTANGIBLEASSETSTables</Role>
      <ShortName>INTANGIBLE ASSETS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureINTANGIBLEASSETS</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>100340 - Disclosure - DEBT (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDEBTTables</Role>
      <ShortName>DEBT (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDEBT</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>100350 - Disclosure - UNEARNED REVENUE (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureUNEARNEDREVENUETables</Role>
      <ShortName>UNEARNED REVENUE (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureUNEARNEDREVENUE</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>100360 - Disclosure - LEASES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureLEASESTables</Role>
      <ShortName>LEASES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureLEASES</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>100370 - Disclosure - STOCKHOLDERS' EQUITY (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSTOCKHOLDERSEQUITYTables</Role>
      <ShortName>STOCKHOLDERS' EQUITY (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSTOCKHOLDERSEQUITY</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>100380 - Disclosure - ACCUMULATED OTHER COMPREHENSIVE INCOME (LOSS) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureACCUMULATEDOTHERCOMPREHENSIVEINCOMELOSSTables</Role>
      <ShortName>ACCUMULATED OTHER COMPREHENSIVE INCOME (LOSS) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureACCUMULATEDOTHERCOMPREHENSIVEINCOMELOSS</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>100390 - Disclosure - SEGMENT INFORMATION AND GEOGRAPHIC DATA (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSEGMENTINFORMATIONANDGEOGRAPHICDATATables</Role>
      <ShortName>SEGMENT INFORMATION AND GEOGRAPHIC DATA (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSEGMENTINFORMATIONANDGEOGRAPHICDATA</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>100400 - Disclosure - Accounting Policies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureAccountingPoliciesAdditionalInformationDetail</Role>
      <ShortName>Accounting Policies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>100410 - Disclosure - Basic and Diluted Earnings Per Share (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureBasicAndDilutedEarningsPerShareDetail</Role>
      <ShortName>Basic and Diluted Earnings Per Share (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>100420 - Disclosure - Components of Other Income (Expense), Net (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureComponentsOfOtherIncomeExpenseNetDetail</Role>
      <ShortName>Components of Other Income (Expense), Net (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>100430 - Disclosure - Net Recognized Gains (Losses) on Debt Investments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureNetRecognizedGainsLossesOnDebtInvestmentsDetail</Role>
      <ShortName>Net Recognized Gains (Losses) on Debt Investments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>100440 - Disclosure - Net Recognized Gains (Losses) on Equity Investments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureNetRecognizedGainsLossesOnEquityInvestmentsDetail</Role>
      <ShortName>Net Recognized Gains (Losses) on Equity Investments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>100450 - Disclosure - Investment Components (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureInvestmentComponentsDetail</Role>
      <ShortName>Investment Components (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>100460 - Disclosure - Investments - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureInvestmentsAdditionalInformationDetail</Role>
      <ShortName>Investments - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>100470 - Disclosure - Unrealized Losses on Debt Investments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureUnrealizedLossesOnDebtInvestmentsDetail</Role>
      <ShortName>Unrealized Losses on Debt Investments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>100480 - Disclosure - Debt Investment Maturities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDebtInvestmentMaturitiesDetail</Role>
      <ShortName>Debt Investment Maturities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>100490 - Disclosure - Derivatives - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDerivativesAdditionalInformationDetail</Role>
      <ShortName>Derivatives - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>100500 - Disclosure - Notional Amounts of Outstanding Derivative Instruments Measured in U.S. Dollar Equivalents (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureNotionalAmountsOfOutstandingDerivativeInstrumentsMeasuredInUSDollarEquivalentsDetail</Role>
      <ShortName>Notional Amounts of Outstanding Derivative Instruments Measured in U.S. Dollar Equivalents (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>100510 - Disclosure - Fair Values of Derivative Instruments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureFairValuesOfDerivativeInstrumentsDetail</Role>
      <ShortName>Fair Values of Derivative Instruments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>100520 - Disclosure - Gains (Losses) on Derivative Instruments Recognized on Consolidated Income Statements (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureGainsLossesOnDerivativeInstrumentsRecognizedOnConsolidatedIncomeStatementsDetail</Role>
      <ShortName>Gains (Losses) on Derivative Instruments Recognized on Consolidated Income Statements (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>100530 - Disclosure - Gains (Losses), Net of Tax, on Derivative Instruments Recognized on Consolidated Comprehensive Income Statements (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureGainsLossesNetOfTaxOnDerivativeInstrumentsRecognizedOnConsolidatedComprehensiveIncomeStatementsDetail</Role>
      <ShortName>Gains (Losses), Net of Tax, on Derivative Instruments Recognized on Consolidated Comprehensive Income Statements (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>100540 - Disclosure - Components of Inventories (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureComponentsOfInventoriesDetail</Role>
      <ShortName>Components of Inventories (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>100550 - Disclosure - Business Combinations - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureBusinessCombinationsAdditionalInformationDetail</Role>
      <ShortName>Business Combinations - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>100560 - Disclosure - Major Classes of Assets and Liabilities Allocated Purchase Price (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureMajorClassesOfAssetsAndLiabilitiesAllocatedPurchasePriceDetail</Role>
      <ShortName>Major Classes of Assets and Liabilities Allocated Purchase Price (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>100570 - Disclosure - Acquired Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureAcquiredIntangibleAssetsDetail</Role>
      <ShortName>Acquired Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>100580 - Disclosure - Carrying Amount of Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureCarryingAmountOfGoodwillDetail</Role>
      <ShortName>Carrying Amount of Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>100590 - Disclosure - Carrying Amount of Goodwill (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureCarryingAmountOfGoodwillParentheticalDetail</Role>
      <ShortName>Carrying Amount of Goodwill (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>100600 - Disclosure - Finite-Lived Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureFiniteLivedIntangibleAssetsDetail</Role>
      <ShortName>Finite-Lived Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>100610 - Disclosure - Finite-Lived Intangible Assets (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureFiniteLivedIntangibleAssetsParentheticalDetail</Role>
      <ShortName>Finite-Lived Intangible Assets (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>100620 - Disclosure - Intangible Assets - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureIntangibleAssetsAdditionalInformationDetail</Role>
      <ShortName>Intangible Assets - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>100630 - Disclosure - Estimated Future Amortization Expense Related to Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureEstimatedFutureAmortizationExpenseRelatedToIntangibleAssetsDetail</Role>
      <ShortName>Estimated Future Amortization Expense Related to Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>100640 - Disclosure - Debt (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDebtDetail</Role>
      <ShortName>Debt (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>100660 - Disclosure - Debt (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDebtParentheticalDetail</Role>
      <ShortName>Debt (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>100670 - Disclosure - Debt - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDebtAdditionalInformationDetail</Role>
      <ShortName>Debt - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>100680 - Disclosure - Maturities of Long-term Debt Including Current Portion (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureMaturitiesOfLongTermDebtIncludingCurrentPortionDetail</Role>
      <ShortName>Maturities of Long-term Debt Including Current Portion (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>100690 - Disclosure - Income Taxes - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureIncomeTaxesAdditionalInformationDetail</Role>
      <ShortName>Income Taxes - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>100700 - Disclosure - Income Taxes - Additional Information Regarding Examinations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureIncomeTaxesAdditionalInformationRegardingExaminationsDetail</Role>
      <ShortName>Income Taxes - Additional Information Regarding Examinations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>100710 - Disclosure - Unearned Revenue by Segment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureUnearnedRevenueBySegmentDetail</Role>
      <ShortName>Unearned Revenue by Segment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>100720 - Disclosure - Changes in Unearned Revenue (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureChangesInUnearnedRevenueDetail</Role>
      <ShortName>Changes in Unearned Revenue (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>100730 - Disclosure - Unearned Revenue - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureUnearnedRevenueAdditionalInformationDetail</Role>
      <ShortName>Unearned Revenue - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>100740 - Disclosure - Unearned Revenue - Remaining Performance Obligation - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureUnearnedRevenueRemainingPerformanceObligationAdditionalInformationDetail</Role>
      <ShortName>Unearned Revenue - Remaining Performance Obligation - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>100750 - Disclosure - Leases - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureLeasesAdditionalInformationDetail</Role>
      <ShortName>Leases - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>100760 - Disclosure - Components of Lease Expense (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureComponentsOfLeaseExpenseDetail</Role>
      <ShortName>Components of Lease Expense (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>100770 - Disclosure - Supplemental Cash Flow Information Related to Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSupplementalCashFlowInformationRelatedToLeasesDetail</Role>
      <ShortName>Supplemental Cash Flow Information Related to Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>100780 - Disclosure - Supplemental Balance Sheet Information Related to Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSupplementalBalanceSheetInformationRelatedToLeasesDetail</Role>
      <ShortName>Supplemental Balance Sheet Information Related to Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>100790 - Disclosure - Maturities of Lease Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureMaturitiesOfLeaseLiabilitiesDetail</Role>
      <ShortName>Maturities of Lease Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>100810 - Disclosure - Contingencies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureContingenciesAdditionalInformationDetail</Role>
      <ShortName>Contingencies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>100820 - Disclosure - Stockholders' Equity - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureStockholdersEquityAdditionalInformationDetail</Role>
      <ShortName>Stockholders' Equity - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>100830 - Disclosure - Share Repurchases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureShareRepurchasesDetail</Role>
      <ShortName>Share Repurchases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>100840 - Disclosure - Dividends Declared (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureDividendsDeclaredDetail</Role>
      <ShortName>Dividends Declared (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>100850 - Disclosure - Summary of Changes in Accumulated Other Comprehensive Income (Loss) by Component (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentDetail</Role>
      <ShortName>Summary of Changes in Accumulated Other Comprehensive Income (Loss) by Component (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>100860 - Disclosure - Summary of Changes in Accumulated Other Comprehensive Income (Loss) by Component (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentParentheticalDetail</Role>
      <ShortName>Summary of Changes in Accumulated Other Comprehensive Income (Loss) by Component (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>100870 - Disclosure - Segment Revenue (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSegmentRevenueDetail</Role>
      <ShortName>Segment Revenue (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>100880 - Disclosure - Operating Income (Loss) by Segment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureOperatingIncomeLossBySegmentDetail</Role>
      <ShortName>Operating Income (Loss) by Segment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>100890 - Disclosure - Segment Information and Geographic Data - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSegmentInformationAndGeographicDataAdditionalInformationDetail</Role>
      <ShortName>Segment Information and Geographic Data - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>100900 - Disclosure - Revenue Classified by Major Geographic Areas (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureRevenueClassifiedByMajorGeographicAreasDetail</Role>
      <ShortName>Revenue Classified by Major Geographic Areas (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>100910 - Disclosure - Revenue Classified by Significant Product and Service Offerings (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsDetail</Role>
      <ShortName>Revenue Classified by Significant Product and Service Offerings (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>100920 - Disclosure - Revenue Classified by Significant Product and Service Offerings (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsParentheticalDetail</Role>
      <ShortName>Revenue Classified by Significant Product and Service Offerings (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="msft-10q_20210331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>100930 - Disclosure - Subsequent Event - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/20210331/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetail</Role>
      <ShortName>Subsequent Event - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" original="msft-10q_20210331.htm">msft-10q_20210331.htm</File>
    <File>msft-20210331.xsd</File>
    <File>msft-20210331_cal.xml</File>
    <File>msft-20210331_def.xml</File>
    <File>msft-20210331_lab.xml</File>
    <File>msft-20210331_pre.xml</File>
    <File>msft-ex151_397.htm</File>
    <File>msft-ex311_398.htm</File>
    <File>msft-ex312_399.htm</File>
    <File>msft-ex321_400.htm</File>
    <File>msft-ex322_401.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/srt/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/country/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2020-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
