<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="dg-20260312.xsd" xlink:type="simple"/>
    <context id="AsOf2026-03-12">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000029534</identifier>
        </entity>
        <period>
            <startDate>2026-03-12</startDate>
            <endDate>2026-03-12</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="AsOf2026-03-12" id="Fact000003">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey contextRef="AsOf2026-03-12" id="Fact000004">0000029534</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="AsOf2026-03-12" id="Fact000009">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="AsOf2026-03-12" id="Fact000010">2026-03-12</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="AsOf2026-03-12" id="Fact000011">DOLLAR GENERAL CORPORATION</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="AsOf2026-03-12" id="Fact000012">TN</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="AsOf2026-03-12" id="Fact000013">001-11421</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="AsOf2026-03-12" id="Fact000014">61-0502302</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="AsOf2026-03-12" id="Fact000015">100 MISSION RIDGE</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="AsOf2026-03-12" id="Fact000016">GOODLETTSVILLE</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="AsOf2026-03-12" id="Fact000017">TN</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="AsOf2026-03-12" id="Fact000018">37072</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="AsOf2026-03-12" id="Fact000019">615</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="AsOf2026-03-12" id="Fact000020">855-4000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="AsOf2026-03-12" id="Fact000021">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="AsOf2026-03-12" id="Fact000022">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="AsOf2026-03-12" id="Fact000023">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="AsOf2026-03-12" id="Fact000024">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="AsOf2026-03-12" id="Fact000025">Common Stock, par value $0.875 per share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="AsOf2026-03-12" id="Fact000026">DG</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="AsOf2026-03-12" id="Fact000027">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="AsOf2026-03-12" id="Fact000028">false</dei:EntityEmergingGrowthCompany>
</xbrl>
