<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>7114</ContextCount>
  <ElementCount>97</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>25</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>6</UnitCount>
  <MyReports>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>1001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1002 - Statement - Statements of Net Assets Available for Benefits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/StatementsOfNetAssetsAvailableForBenefits</Role>
      <ShortName>Statements of Net Assets Available for Benefits</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1003 - Statement - Statement of Changes in Net Assets Available for Benefits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/StatementOfChangesInNetAssetsAvailableForBenefits</Role>
      <ShortName>Statement of Changes in Net Assets Available for Benefits</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1004 - Disclosure - Description of the Plan and Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/DescriptionOfThePlanAndAccountingPolicies</Role>
      <ShortName>Description of the Plan and Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1005 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1006 - Disclosure - Fully Benefit-Responsive Investment Contracts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/FullyBenefitResponsiveInvestmentContracts</Role>
      <ShortName>Fully Benefit-Responsive Investment Contracts</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1007 - Disclosure - Derivatives</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/Derivatives</Role>
      <ShortName>Derivatives</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>1008 - Disclosure - Participant Loans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ParticipantLoans</Role>
      <ShortName>Participant Loans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>1009 - Disclosure - Tax Status</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/TaxStatus</Role>
      <ShortName>Tax Status</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>1010 - Disclosure - Party-In-Interest Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/PartyInInterestTransactions</Role>
      <ShortName>Party-In-Interest Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>1011 - Disclosure - Reconciliation of Financial Statements to Form 5500</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ReconciliationOfFinancialStatementsToForm5500</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>1012 - Disclosure - Schedule of Assets (Held at End of Year)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ScheduleOfAssetsHeldAtEndOfYear</Role>
      <ShortName>Schedule of Assets (Held at End of Year)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>1013 - Disclosure - Supplemental Schedule of Delinquent Participant Contributions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/SupplementalScheduleOfDelinquentParticipantContributions</Role>
      <ShortName>Supplemental Schedule of Delinquent Participant Contributions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>1014 - Disclosure - Description of the Plan and Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/DescriptionOfThePlanAndAccountingPoliciesPolicies</Role>
      <ShortName>Description of the Plan and Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.microsoft.com/role/DescriptionOfThePlanAndAccountingPolicies</ParentRole>
      <Position>14</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>1015 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/role/FairValueMeasurements</ParentRole>
      <Position>15</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>1016 - Disclosure - Reconciliation of Financial Statements to Form 5500 (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ReconciliationOfFinancialStatementsToForm5500Tables</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500 (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.microsoft.com/role/ReconciliationOfFinancialStatementsToForm5500</ParentRole>
      <Position>16</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>1017 - Disclosure - Description of the Plan and Accounting Policies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/DescriptionOfThePlanAndAccountingPoliciesAdditionalInformationDetails</Role>
      <ShortName>Description of the Plan and Accounting Policies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>1018 - Disclosure - Fair Value Measurements - Summary of Financial Instruments Measured at Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/FairValueMeasurementsSummaryOfFinancialInstrumentsMeasuredAtFairValueDetails</Role>
      <ShortName>Fair Value Measurements - Summary of Financial Instruments Measured at Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>1019 - Disclosure - Participant Loans - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ParticipantLoansAdditionalInformationDetail</Role>
      <ShortName>Participant Loans - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>1020 - Disclosure - Tax Status - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/TaxStatusAdditionalInformationDetail</Role>
      <ShortName>Tax Status - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>1021 - Disclosure - Party-In-Interest Transactions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/PartyInInterestTransactionsAdditionalInformationDetail</Role>
      <ShortName>Party-In-Interest Transactions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>1022 - Disclosure - Reconciliation of Financial Statements to Form 5500 - Schedule of Net Assets Available for Benefits Per the Financial Statements to the Form 5500 (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ReconciliationOfFinancialStatementsToForm5500ScheduleOfNetAssetsAvailableForBenefitsPerTheFinancialStatementsToTheForm5500Detail</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500 - Schedule of Net Assets Available for Benefits Per the Financial Statements to the Form 5500 (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>1023 - Disclosure - Reconciliation of Financial Statements to Form 5500 - Schedule of Net Increase in Net Assets Available for Benefits Per the Financial Statements to the Form 5500 (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ReconciliationOfFinancialStatementsToForm5500ScheduleOfNetIncreaseInNetAssetsAvailableForBenefitsPerTheFinancialStatementsToTheForm5500Detail</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500 - Schedule of Net Increase in Net Assets Available for Benefits Per the Financial Statements to the Form 5500 (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>1024 - Disclosure - Schedule of Assets (Held at End of Year) - Summary of Employee Benefit Plan Statement of Investment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ScheduleOfAssetsHeldAtEndOfYearSummaryOfEmployeeBenefitPlanStatementOfInvestmentDetail</Role>
      <ShortName>Schedule of Assets (Held at End of Year) - Summary of Employee Benefit Plan Statement of Investment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.microsoft.com/role/ScheduleOfAssetsHeldAtEndOfYear</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>1025 - Disclosure - Schedule of Assets (Held at End of Year) - Summary of Employee Benefit Plan Statement of Investment (Detail) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/ScheduleOfAssetsHeldAtEndOfYearSummaryOfEmployeeBenefitPlanStatementOfInvestmentDetailParenthetical</Role>
      <ShortName>Schedule of Assets (Held at End of Year) - Summary of Employee Benefit Plan Statement of Investment (Detail) (Parenthetical)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.microsoft.com/role/ScheduleOfAssetsHeldAtEndOfYear</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="d839790d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>1026 - Disclosure - Supplemental Schedule of Delinquent Participant Contributions (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.microsoft.com/role/SupplementalScheduleOfDelinquentParticipantContributionsDetail</Role>
      <ShortName>Supplemental Schedule of Delinquent Participant Contributions (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.microsoft.com/role/SupplementalScheduleOfDelinquentParticipantContributions</ParentRole>
      <Position>26</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="11-K" isDefinitelyFs="true" isUsgaap="true" original="d839790d11k.htm">d839790d11k.htm</File>
    <File>msft-20251231.xsd</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="14587">http://fasb.org/us-gaap-ebp/2025</BaseTaxonomy>
    <BaseTaxonomy items="12">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
