<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:fnd="http://xbrl.sec.gov/fnd/2026q3"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="dcny-20261104.xsd" xlink:type="simple"/>
    <context id="AsOf2026-11-04">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0002119573</identifier>
        </entity>
        <period>
            <startDate>2026-11-04</startDate>
            <endDate>2026-11-04</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="AsOf2026-11-04" id="Fact000003">true</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey contextRef="AsOf2026-11-04" id="Fact000004">0002119573</dei:EntityCentralIndexKey>
    <dei:EntityCentralIndexKey contextRef="AsOf2026-11-04" id="Fact000008">0002119573</dei:EntityCentralIndexKey>
    <dei:DocumentPeriodEndDate contextRef="AsOf2026-11-04" id="Fact000007">2026-11-04</dei:DocumentPeriodEndDate>
    <dei:AmendmentDescription contextRef="AsOf2026-11-04" id="Fact000009">1</dei:AmendmentDescription>
    <dei:DocumentType contextRef="AsOf2026-11-04" id="Fact000010">S-6</dei:DocumentType>
    <dei:EntityRegistrantName contextRef="AsOf2026-11-04" id="Fact000011">Guggenheim Defined Portfolios, Series 2640</dei:EntityRegistrantName>
    <fnd:NmRule35d1TermDfnTextBlock contextRef="AsOf2026-11-04" id="Fact000012">Under normal circumstances, the trust will
invest at least 80% of the value of its assets in common shares of closed-end investment companies (&#x201c;&lt;i&gt;Closed-End Funds&lt;/i&gt;&#x201d;)
and common shares of exchange-traded funds (&#x201c;&lt;i&gt;ETFs&lt;/i&gt;&#x201d;) that invest substantially all of their assets in New York municipal
bonds, the income from which is exempt from regular federal and New York state income taxes, which are rated investment-grade by a nationally
recognized statistical rating organization.</fnd:NmRule35d1TermDfnTextBlock>
</xbrl>
