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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-08-03</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-08-03</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>16</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>175.9884</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1106103</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-08-03</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>3209</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>176.4796</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1102894</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-08-03</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>5180</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>177.5559</value>
                    <footnoteId id="F3"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1097714</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-08-03</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>711</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>178.5988</value>
                    <footnoteId id="F4"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1097003</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-08-03</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>782</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>179.4398</value>
                    <footnoteId id="F5"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1096221</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-08-03</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>102</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>180.2700</value>
                    <footnoteId id="F6"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1096119</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-08-04</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>147</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>173.8119</value>
                    <footnoteId id="F7"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1095972</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-08-04</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>638</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>174.4801</value>
                    <footnoteId id="F8"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1095334</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-08-04</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>775</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>175.5819</value>
                    <footnoteId id="F9"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1094559</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-08-04</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>506</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>176.4020</value>
                    <footnoteId id="F10"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1094053</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-08-04</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1420</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>177.4685</value>
                    <footnoteId id="F11"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1092633</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-08-04</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>4732</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>178.4198</value>
                    <footnoteId id="F12"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1087901</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-08-04</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1782</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>179.0400</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1086119</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-08-05</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>25</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>177.9479</value>
                    <footnoteId id="F13"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1086094</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-08-05</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>5595</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>178.5754</value>
                    <footnoteId id="F14"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1080499</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-08-05</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>4305</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>179.4327</value>
                    <footnoteId id="F15"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1076194</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-08-05</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>75</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>180.0000</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1076119</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="F16"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Class B Common Stock, $1.00 par value</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F18"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F17"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F17"/>
            </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 $175.9850 to $175.9936, 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 $176.0077 to $176.9981, 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 $177.0126 to $177.9954, 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 $178.0433 to $178.9996, 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 $179.0951 to $179.9520, 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 $180.1205 to $180.4018, 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 $173.7200 to $173.9936, 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 $174.0000 to $174.9075, 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 $175.0447 to $175.9422, 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 $176.0755 to $176.8469, 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 $177.1042 to $177.9281, 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">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $178.0053 to $178.8739, 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="F13">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $177.9150 to $177.9859, 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="F14">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $178.0108 to $178.9930, 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="F15">The Price reported in Column 4 is a weighted average price. The shares were sold in multiple transactions at price a ranging from $179.0000 to $179.6100, 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="F16">Hershey Trust Company is wholly owned by Milton Hershey School Trust and is trustee for the Milton Hershey School Trust.</footnote>
        <footnote id="F17">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="F18">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-08-05</signatureDate>
    </ownerSignature>
</ownershipDocument>
