<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>176</ContextCount>
  <ElementCount>266</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>48</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>5</UnitCount>
  <MyReports>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Document and Entity Information Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DocumentandEntityInformationDocumentandEntityInformation</Role>
      <ShortName>Document and Entity Information Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Consolidated Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Consolidated Statements of Shareholders' Equity Statement</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ConsolidatedStatementsofShareholdersEquityStatement</Role>
      <ShortName>Consolidated Statements of Shareholders' Equity Statement</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Disclosure - Organization and Summary of Significant Accounting Policies (Notes)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.dynexcapital.com/role/OrganizationandSummaryofSignificantAccountingPoliciesNotes</Role>
      <ShortName>Organization and Summary of Significant Accounting Policies (Notes)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Disclosure - Net Income (Loss) Per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/NetIncomeLossPerCommonShare</Role>
      <ShortName>Net Income (Loss) Per Common Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Mortgage-Backed Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/MortgageBackedSecurities</Role>
      <ShortName>Mortgage-Backed Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Repurchase Agreements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/RepurchaseAgreements</Role>
      <ShortName>Repurchase Agreements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Derivatives</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/Derivatives</Role>
      <ShortName>Derivatives</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Fair Value of Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/FairValueofFinancialInstruments</Role>
      <ShortName>Fair Value of Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Shareholders' Equity and Share-Based Compensation (Notes)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.dynexcapital.com/role/ShareholdersEquityandShareBasedCompensationNotes</Role>
      <ShortName>Shareholders' Equity and Share-Based Compensation (Notes)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/SubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9954471 - Disclosure - Organization and Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/OrganizationandSummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Organization and Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/OrganizationandSummaryofSignificantAccountingPoliciesNotes</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9954472 - Disclosure - Organization and Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/OrganizationandSummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Organization and Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/OrganizationandSummaryofSignificantAccountingPoliciesNotes</ParentRole>
      <Position>20</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9954473 - Disclosure - Net Income (Loss) Per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/NetIncomeLossPerCommonShareTables</Role>
      <ShortName>Net Income (Loss) Per Common Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/NetIncomeLossPerCommonShare</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9954474 - Disclosure - Mortgage-Backed Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/MortgageBackedSecuritiesTables</Role>
      <ShortName>Mortgage-Backed Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/MortgageBackedSecurities</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9954475 - Disclosure - Repurchase Agreements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/RepurchaseAgreementsTables</Role>
      <ShortName>Repurchase Agreements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/RepurchaseAgreements</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9954476 - Disclosure - Derivatives (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesTables</Role>
      <ShortName>Derivatives (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/Derivatives</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9954477 - Disclosure - Fair Value of Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/FairValueofFinancialInstrumentsTables</Role>
      <ShortName>Fair Value of Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/FairValueofFinancialInstruments</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9954478 - Disclosure - Shareholders' Equity and Share-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ShareholdersEquityandShareBasedCompensationTables</Role>
      <ShortName>Shareholders' Equity and Share-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/ShareholdersEquityandShareBasedCompensationNotes</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9954481 - Disclosure - Organization and Summary of Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/OrganizationandSummaryofSignificantAccountingPoliciesDetails</Role>
      <ShortName>Organization and Summary of Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/OrganizationandSummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9954482 - Disclosure - Net Income (Loss) Per Common Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/NetIncomeLossPerCommonShareDetails</Role>
      <ShortName>Net Income (Loss) Per Common Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/NetIncomeLossPerCommonShareTables</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9954483 - Disclosure - Net Income (Loss) Per Common Share - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/NetIncomeLossPerCommonShareNarrativeDetails</Role>
      <ShortName>Net Income (Loss) Per Common Share - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/NetIncomeLossPerCommonShareTables</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9954484 - Disclosure - Mortgage-Backed Securities - Investment Type (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/MortgageBackedSecuritiesInvestmentTypeDetails</Role>
      <ShortName>Mortgage-Backed Securities - Investment Type (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9954485 - Disclosure - Mortgage-Backed Securities - Unrealized Gain (Loss) on Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/MortgageBackedSecuritiesUnrealizedGainLossonInvestmentsDetails</Role>
      <ShortName>Mortgage-Backed Securities - Unrealized Gain (Loss) on Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9954486 - Disclosure - Mortgage-Backed Securities - Realize Gain (Loss) on Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/MortgageBackedSecuritiesRealizeGainLossonInvestmentsDetails</Role>
      <ShortName>Mortgage-Backed Securities - Realize Gain (Loss) on Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9954487 - Disclosure - Mortgage-Backed Securities - Gross Unrealized Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/MortgageBackedSecuritiesGrossUnrealizedLossesDetails</Role>
      <ShortName>Mortgage-Backed Securities - Gross Unrealized Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9954488 - Disclosure - Repurchase Agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/RepurchaseAgreementsDetails</Role>
      <ShortName>Repurchase Agreements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/RepurchaseAgreementsTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9954489 - Disclosure - Repurchase Agreements - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/RepurchaseAgreementsNarrativeDetails</Role>
      <ShortName>Repurchase Agreements - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954490 - Disclosure - Repurchase Agreements - Remaining Term to Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/RepurchaseAgreementsRemainingTermtoMaturityDetails</Role>
      <ShortName>Repurchase Agreements - Remaining Term to Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954491 - Disclosure - Repurchase Agreements - Offsetting (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/RepurchaseAgreementsOffsettingDetails</Role>
      <ShortName>Repurchase Agreements - Offsetting (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954492 - Disclosure - Derivatives - Gain (loss) on Derivative Instruments , Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesGainlossonDerivativeInstrumentsNetDetails</Role>
      <ShortName>Derivatives - Gain (loss) on Derivative Instruments , Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954493 - Disclosure - Derivatives - Derivative Information about Carrying Value by Type on the Balance Sheet Location (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesDerivativeInformationaboutCarryingValuebyTypeontheBalanceSheetLocationDetails</Role>
      <ShortName>Derivatives - Derivative Information about Carrying Value by Type on the Balance Sheet Location (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954494 - Disclosure - Derivatives - Schedule of Futures and Options (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesScheduleofFuturesandOptionsDetails</Role>
      <ShortName>Derivatives - Schedule of Futures and Options (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954495 - Disclosure - Derivatives - Schedule of Long Positions in TBA (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesScheduleofLongPositionsinTBADetails</Role>
      <ShortName>Derivatives - Schedule of Long Positions in TBA (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954496 - Disclosure - Derivatives Volume of Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesVolumeofActivityDetails</Role>
      <ShortName>Derivatives Volume of Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954497 - Disclosure - Derivatives Offsetting Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesOffsettingAssetsDetails</Role>
      <ShortName>Derivatives Offsetting Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954498 - Disclosure - Derivatives Offsetting Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/DerivativesOffsettingLiabilitiesDetails</Role>
      <ShortName>Derivatives Offsetting Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954499 - Disclosure - Fair Value of Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/FairValueofFinancialInstrumentsDetails</Role>
      <ShortName>Fair Value of Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/FairValueofFinancialInstrumentsTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954500 - Disclosure - Fair Value of Financial Instruments - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/FairValueofFinancialInstrumentsNarrativeDetails</Role>
      <ShortName>Fair Value of Financial Instruments - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954501 - Disclosure - Shareholders' Equity - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ShareholdersEquityNarrativeDetails</Role>
      <ShortName>Shareholders' Equity - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954502 - Disclosure - Shareholders' Equity and Share-Based Compensation Share-based Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ShareholdersEquityandShareBasedCompensationSharebasedCompensationDetails</Role>
      <ShortName>Shareholders' Equity and Share-Based Compensation Share-based Compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954503 - Disclosure - Shareholders' Equity and Share-Based Compensation - Schedule of Remaining Unvested Awards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/ShareholdersEquityandShareBasedCompensationScheduleofRemainingUnvestedAwardsDetails</Role>
      <ShortName>Shareholders' Equity and Share-Based Compensation - Schedule of Remaining Unvested Awards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954504 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/IncomeTaxes</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="dx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9954505 - Disclosure - Subsequent Events (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.dynexcapital.com/role/SubsequentEventsDetails</Role>
      <ShortName>Subsequent Events (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.dynexcapital.com/role/SubsequentEvents</ParentRole>
      <Position>51</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-K" isDefinitelyFs="true" isUsgaap="true" original="dx-20231231.htm">dx-20231231.htm</File>
    <File>dx-20231231.xsd</File>
    <File>dx-20231231_cal.xml</File>
    <File>dx-20231231_def.xml</File>
    <File>dx-20231231_lab.xml</File>
    <File>dx-20231231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>dx-20231231_g1.jpg</File>
    <File>dx-20231231_g2.jpg</File>
    <File>dx-20231231_g3.jpg</File>
    <File>dx-20231231_g4.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="863">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="41">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
