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

    <schemaVersion>X0508</schemaVersion>

    <documentType>5</documentType>

    <periodOfReport>2025-09-30</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <form3HoldingsReported>0</form3HoldingsReported>

    <form4TransactionsReported>0</form4TransactionsReported>

    <issuer>
        <issuerCik>0001703079</issuerCik>
        <issuerName>XAI Octagon Floating Rate &amp; Alternative Income Trust</issuerName>
        <issuerTradingSymbol>XFLT</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001718133</rptOwnerCik>
            <rptOwnerName>Spence John Yogi</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>321 N. CLARK STREET</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>CHICAGO</rptOwnerCity>
            <rptOwnerState>IL</rptOwnerState>
            <rptOwnerZipCode>60054</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Vice President</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Shares of Beneficial Ownership</value>
            </securityTitle>
            <transactionCoding>
                <transactionFormType></transactionFormType>
            </transactionCoding>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>550859.238</value>
                    <footnoteId id="F1"/>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Shares of Beneficial Ownership</value>
            </securityTitle>
            <transactionCoding>
                <transactionFormType></transactionFormType>
            </transactionCoding>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>22928.464</value>
                    <footnoteId id="F3"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>XMS Holdings LLC</value>
                    <footnoteId id="F4"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Shares of Beneficial Ownership</value>
            </securityTitle>
            <transactionCoding>
                <transactionFormType></transactionFormType>
            </transactionCoding>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>10250</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>XA Investments LLC</value>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Shares of Beneficial Ownership</value>
            </securityTitle>
            <transactionCoding>
                <transactionFormType></transactionFormType>
            </transactionCoding>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>9874.915</value>
                    <footnoteId id="F6"/>
                    <footnoteId id="F7"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Spouse</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Shares beneficially owned reflect 7,553.144 received through the XFLT Dividend Reinvestment Plan</footnote>
        <footnote id="F2">Shares reflect reduction of 8,500 shares, gifted to Spouse's account</footnote>
        <footnote id="F3">Shares beneficially owned reflect 1,951.454 received through the XFLT Dividend Reinvestment Plan</footnote>
        <footnote id="F4">Mr. Spence may be deemed to beneficially own shares owned by XMS Holdings LLC due to his control of XMS Holdings LLC.</footnote>
        <footnote id="F5">Mr. Spence may be deemed to beneficially own shares owned by XA Investments LLC due to his control of XA Investments LLC</footnote>
        <footnote id="F6">Shares beneficially owned reflect 574.465 received through the XFLT Dividend Reinvestment Plan</footnote>
        <footnote id="F7">Shares include 8,500 gift from Direct account</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/John Yogi Spence</signatureName>
        <signatureDate>2025-11-14</signatureDate>
    </ownerSignature>
</ownershipDocument>
