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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4/A</documentType>

    <periodOfReport>2024-09-16</periodOfReport>

    <dateOfOriginalSubmission>2024-09-18</dateOfOriginalSubmission>

    <issuer>
        <issuerCik>0001494259</issuerCik>
        <issuerName>CarGurus, Inc.</issuerName>
        <issuerTradingSymbol>CARG</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001718790</rptOwnerCik>
            <rptOwnerName>Zales Samuel</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1001 BOYLSTON STREET</rptOwnerStreet1>
            <rptOwnerStreet2>16TH FLOOR</rptOwnerStreet2>
            <rptOwnerCity>BOSTON</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02115</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>1</isOfficer>
            <officerTitle>COO and President</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>1</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-09-16</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>M</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>17668</value>
                    <footnoteId id="F2"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>.16</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>498251</value>
                    <footnoteId id="F3"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-09-16</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F4"/>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>25168</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>28.8819</value>
                    <footnoteId id="F5"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>473083</value>
                    <footnoteId id="F6"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">This stock option exercise was effected pursuant to a Rule 10b5-1 trading plan adopted by the Reporting Person.</footnote>
        <footnote id="F2">Represents the conversion of Class B common stock into Class A common stock at the Reporting Person's election.</footnote>
        <footnote id="F3">The original Form 4, filed on September 18, 2024, is being amended by this Form 4 amendment solely to correct an administrative error.  The original Form 4 inadvertently reported that the Reporting Person owned 473,083 shares of Class A common stock after the stock option exercise.  However, as reported in this amended Form 4, the Reporting Person directly owned 498,251 shares of Class A common stock after such stock option exercise.</footnote>
        <footnote id="F4">This sale was effected pursuant to a Rule 10b5-1 trading plan adopted by the Reporting Person.</footnote>
        <footnote id="F5">The reported price in Column 4 is a weighted average price. These shares were sold in multiple transactions at prices ranging from $28.65 to $29.10 per share, inclusive. Information regarding the number of shares sold at each separate price will be made available from the Reporting Person upon request by the staff of the U.S. Securities and Exchange Commission, the Issuer or any security holder of the Issuer.</footnote>
        <footnote id="F6">The original Form 4, filed on September 18, 2024, is being amended by this Form 4 amendment solely to correct an administrative error.  The original Form 4 inadvertently reported that the Reporting Person owned 455,415 shares of Class A common stock after the sale of Class A common stock.  However, as reported in this amended Form 4, the Reporting Person directly owned 473,083 shares of Class A common stock after such sale.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Suzanne Murray, as attorney-in-fact</signatureName>
        <signatureDate>2024-10-03</signatureDate>
    </ownerSignature>
</ownershipDocument>
