<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0206</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2025-03-19</periodOfReport>

    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0000789019</issuerCik>
        <issuerName>MICROSOFT CORP</issuerName>
        <issuerTradingSymbol>MSFT</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0002062356</rptOwnerCik>
            <rptOwnerName>Coleman Amy</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O MICROSOFT CORPORATION</rptOwnerStreet1>
            <rptOwnerStreet2>ONE MICROSOFT WAY</rptOwnerStreet2>
            <rptOwnerCity>REDMOND</rptOwnerCity>
            <rptOwnerState>WA</rptOwnerState>
            <rptOwnerZipCode>98052-6399</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>EVP, Chief Human Resources Off</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>46023.8094</value>
                    <footnoteId id="F1"/>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Includes an aggregate of 18,100 shares represented by stock awards that vest, subject to continued employment, as follows: 80 shares on 4/15/2025; 223 shares on 5/15/2025; 1,189 shares on 5/31/2025; 193 shares on 6/15/2025; 81 shares on 7/15/2025; 222 shares on 8/15/2025; 1,188 shares on 8/31/2025; 193 shares on 9/15/2025; 80 shares on 10/15/2025; 223 shares on 11/15/2025; 939 shares on 11/30/2025; 838 shares on 12/15/2025; 81 shares on 1/15/2026; 223 shares on 2/15/2026; 939 shares on 2/28/2026; 89 shares on 3/15/2026; 80 shares on 4/15/2026; 222 shares on 5/15/2026; 937 shares on 5/31/2026; 90 shares on 6/15/2026; 81 shares on 7/15/2026; 223 shares on 8/15/2026;</footnote>
        <footnote id="F2">Vesting continued: 940 shares on 8/31/2026; 90 shares on 9/15/2026; 80 shares on 10/15/2026; 223 shares on 11/15/2026; 720 shares on 11/30/2026; 90 shares on 12/15/2026; 81 shares on 1/15/2027; 222 shares on 2/15/2027; 720 shares on 2/28/2027; 90 shares on 3/15/2027; 80 shares on 4/15/2027; 223 shares on 5/15/2027; 719 shares on 5/31/2027; 90 shares on 6/15/2027; 81 shares on 7/15/2027; 223 shares on 8/15/2027; 721 shares on 8/31/2027; 80 shares on 10/15/2027; 222 shares on 11/15/2027; 545 shares on 11/30/2027; 81 shares on 1/15/2028; 223 shares on 2/15/2028; 545 shares on 2/29/2028; 223 shares on 5/15/2028; 546 shares on 5/31/2028; 223 shares on 8/15/2028; 546 shares on 8/31/2028; 264 shares on 11/30/2028; 265 shares on 2/28/2029; 265 shares on 5/31/2029; 265 shares on 8/31/2029.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Julia Stark, Attorney-in-Fact for Amy Coleman</signatureName>
        <signatureDate>2025-03-25</signatureDate>
    </ownerSignature>
</ownershipDocument>
