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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-04-09</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0000047111</issuerCik>
        <issuerName>HERSHEY CO</issuerName>
        <issuerTradingSymbol>HSY</issuerTradingSymbol>
        <issuerForeignTradingSymbol></issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0000938543</rptOwnerCik>
            <rptOwnerName>HERSHEY TRUST CO TRUSTEE IN TRUST FOR MILTON HERSHEY SCHOOL</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>false</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>1 EAST CHOCOLATE AVENUE</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 400</rptOwnerStreet2>
            <rptOwnerCity>HERSHEY</rptOwnerCity>
            <rptOwnerState>PA</rptOwnerState>
            <rptOwnerZipCode>17033</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>1</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-09</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>82</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>207.6</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1896037</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-09</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>125</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>208.9462</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1895912</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-09</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>2531</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>209.4443</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1893381</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-09</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>7262</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>210.5392</value>
                    <footnoteId id="F3"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1886119</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>3765</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>202.4527</value>
                    <footnoteId id="F4"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1882354</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>531</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>203.457</value>
                    <footnoteId id="F5"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1881823</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>734</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>204.6319</value>
                    <footnoteId id="F6"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1881089</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>2178</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>205.6473</value>
                    <footnoteId id="F7"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1878911</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1630</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>206.3807</value>
                    <footnoteId id="F8"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1877281</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>853</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>207.8119</value>
                    <footnoteId id="F9"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1876428</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>26</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>208.3294</value>
                    <footnoteId id="F10"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1876402</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <transactionDate>
                <value>2026-04-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>283</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>210.4967</value>
                    <footnoteId id="F11"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1876119</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock, $1.00 par value</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>39630</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Hershey Trust Company</value>
                    <footnoteId id="F12"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Class B Common Stock, $1.00 par value</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F14"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F13"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F13"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock, $1.00 par value</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>54612012</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>54612012</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $208.9104 to $208.9694, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F2">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $209.0000 to $209.9984, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F3">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $210.0128 to $210.8400, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F4">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $202.2700 to $202.8999, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F5">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $203.0458 to $203.8248, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F6">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $204.0521 to $204.9600, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F7">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $205.0049 to $205.9963, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F8">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $206.0010 to $206.8878, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F9">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $207.0072 to $207.9963, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F10">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $208.3294 to $208.3294, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F11">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $210.3700 to $210.7900, inclusive. The reporting person undertakes to provide to the staff of the Securities and Exchange Commission, to any security holder of The Hershey Company, or to The Hershey Company, upon request, full information regarding the number of shares sold at each separate price within the range set forth above.</footnote>
        <footnote id="F12">Hershey Trust Company is wholly owned by Milton Hershey School Trust and is trustee for the Milton Hershey School Trust.</footnote>
        <footnote id="F13">All shares of Class B common stock, $1.00 par value convertible share-for-share into common stock, $1.00 par value, at any time, and without payment other than for the fact of conversion. There is no expiration date.</footnote>
        <footnote id="F14">The conversion price is the market price of the Common Stock on the previous business day.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Joshua D. Shannon, Deputy CIO</signatureName>
        <signatureDate>2026-04-13</signatureDate>
    </ownerSignature>
</ownershipDocument>
