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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-10-15</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-10-15</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>207</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>166.9713</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>585912</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-10-15</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1326</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>167.6784</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>584586</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-10-15</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>7181</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>168.5938</value>
                    <footnoteId id="F3"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>577405</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-10-15</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1286</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>169.1797</value>
                    <footnoteId id="F4"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>576119</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-10-16</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1030</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>169.7220</value>
                    <footnoteId id="F5"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>575089</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-10-16</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>7457</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>170.6597</value>
                    <footnoteId id="F6"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>567632</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-10-16</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1512</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>171.2596</value>
                    <footnoteId id="F7"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>566120</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-10-16</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>172.0127</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>566119</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="F8"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Class B Common Stock, $1.00 par value</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F10"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F9"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F9"/>
            </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 $166.9600 to $166.9900, 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 $167.0000 to $167.9900, 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 $168.0250 to $168.9986, 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 $169.0206 to $169.5700, 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 $169.4782 to $169.9627, 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 $170.0100 to $170.9950, 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 $171.0000 to $171.9409, 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">Hershey Trust Company is wholly owned by Milton Hershey School Trust and is trustee for the Milton Hershey School Trust.</footnote>
        <footnote id="F9">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="F10">The conversion price is the market price of the Common Stock on the previous business day.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Muzzamil Mussani, VP, Investment Operations and Portfolio Analytics</signatureName>
        <signatureDate>2026-10-19</signatureDate>
    </ownerSignature>
</ownershipDocument>
