<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2025 Workiva-->
<!--r:621ff377-9f6b-41c1-9673-d005f0e9811f,g:deaabfab-17e2-48ab-9194-34fc35aa4acd-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFINCOME" xlink:type="simple" xlink:href="hsy-20241231.xsd#CONSOLIDATEDSTATEMENTSOFINCOME"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFINCOME" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_c9944724-8725-4260-ad9b-9590f43d4697" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_7e879261-c4a0-4c56-b725-912b4a7b68fa" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_c9944724-8725-4260-ad9b-9590f43d4697" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_7e879261-c4a0-4c56-b725-912b4a7b68fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_fa80c7b3-db8e-4083-bf2f-b1b1e92b8eab" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_c9944724-8725-4260-ad9b-9590f43d4697" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_fa80c7b3-db8e-4083-bf2f-b1b1e92b8eab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_73b20b03-6c06-45a7-8e95-02ee483e2b64" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_9b2f66c4-8534-43a3-88f8-68b70dd49f20" xlink:href="hsy-20241231.xsd#hsy_RestructuringChargesBusinessRealignment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_73b20b03-6c06-45a7-8e95-02ee483e2b64" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_9b2f66c4-8534-43a3-88f8-68b70dd49f20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_c6663b6f-d4f4-4c31-9ed8-ff81a6e492d6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_73b20b03-6c06-45a7-8e95-02ee483e2b64" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_c6663b6f-d4f4-4c31-9ed8-ff81a6e492d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_252017eb-499d-4ae2-aefb-29eeca48647d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_73b20b03-6c06-45a7-8e95-02ee483e2b64" xlink:to="loc_us-gaap_GrossProfit_252017eb-499d-4ae2-aefb-29eeca48647d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_8ba01ee6-9ece-47d5-a3ce-11124cfc4d81" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_ee5c2371-d8a8-4f81-abf9-33cf0747874a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_8ba01ee6-9ece-47d5-a3ce-11124cfc4d81" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_ee5c2371-d8a8-4f81-abf9-33cf0747874a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_e3cadf31-6d4a-42f6-a02f-f066114c778a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_8ba01ee6-9ece-47d5-a3ce-11124cfc4d81" xlink:to="loc_us-gaap_OperatingIncomeLoss_e3cadf31-6d4a-42f6-a02f-f066114c778a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_9b595fb6-b3b4-494b-a5e8-746a3755683a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_8ba01ee6-9ece-47d5-a3ce-11124cfc4d81" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_9b595fb6-b3b4-494b-a5e8-746a3755683a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_d1f44f81-9a58-49cc-a573-9cc9a4ff5187" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6c38ab2d-b2e8-43a9-b157-4c6cf5f4bfce" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_d1f44f81-9a58-49cc-a573-9cc9a4ff5187" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6c38ab2d-b2e8-43a9-b157-4c6cf5f4bfce" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_94851621-18ae-4af4-ad90-b08b3fe485f5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_d1f44f81-9a58-49cc-a573-9cc9a4ff5187" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_94851621-18ae-4af4-ad90-b08b3fe485f5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="simple" xlink:href="hsy-20241231.xsd#CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_5bbdf3e5-ccef-4f47-8508-772039a418f4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_cabd1b39-2281-4723-9443-533cae73a589" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_5bbdf3e5-ccef-4f47-8508-772039a418f4" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_cabd1b39-2281-4723-9443-533cae73a589" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_650b1a7c-66be-465f-b6c0-a6bda04b7d77" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_5bbdf3e5-ccef-4f47-8508-772039a418f4" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_650b1a7c-66be-465f-b6c0-a6bda04b7d77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_a5cb46ea-76b4-416c-8d73-c3004ba7c80a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_1832dd0e-2547-40a2-a136-8b950e41a706" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_a5cb46ea-76b4-416c-8d73-c3004ba7c80a" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_1832dd0e-2547-40a2-a136-8b950e41a706" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_4ef2eb4f-470d-415a-8f7c-b536a4d5e3d2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_a5cb46ea-76b4-416c-8d73-c3004ba7c80a" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_4ef2eb4f-470d-415a-8f7c-b536a4d5e3d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_ff1aa55f-6b8f-42b4-a139-67cbc073acb2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_4cb664f1-f906-4b2f-8cb5-1407e8ebe83a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_ff1aa55f-6b8f-42b4-a139-67cbc073acb2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_4cb664f1-f906-4b2f-8cb5-1407e8ebe83a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_b81a0972-b5df-4fae-b9fd-20e40c7294bd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_ff1aa55f-6b8f-42b4-a139-67cbc073acb2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_b81a0972-b5df-4fae-b9fd-20e40c7294bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_f461f2bc-af9d-45d4-b9ed-8cbc639401c5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_ff1aa55f-6b8f-42b4-a139-67cbc073acb2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_f461f2bc-af9d-45d4-b9ed-8cbc639401c5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_e3ff056d-e649-474f-aa22-34aa71b32c5b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_ff1aa55f-6b8f-42b4-a139-67cbc073acb2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_e3ff056d-e649-474f-aa22-34aa71b32c5b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_8574049d-299d-452b-bba1-e762472b1ea4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_ff1aa55f-6b8f-42b4-a139-67cbc073acb2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_8574049d-299d-452b-bba1-e762472b1ea4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_b8085cee-5928-4364-879e-4a9a57e8d367" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_99bba686-486c-4cf8-a14f-14d45de72dac" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_b8085cee-5928-4364-879e-4a9a57e8d367" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_99bba686-486c-4cf8-a14f-14d45de72dac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_ec9a0c39-a11a-4e9f-96da-2e22034ea44b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_b8085cee-5928-4364-879e-4a9a57e8d367" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_ec9a0c39-a11a-4e9f-96da-2e22034ea44b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cd37534b-ef2d-41ca-8868-be6f25e17c63" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_854763ce-ed92-4014-a461-96c8030d9e44" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cd37534b-ef2d-41ca-8868-be6f25e17c63" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_854763ce-ed92-4014-a461-96c8030d9e44" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_5892987b-a891-4883-85c1-d9093a8aa56d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cd37534b-ef2d-41ca-8868-be6f25e17c63" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_5892987b-a891-4883-85c1-d9093a8aa56d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_b09a4173-ee30-457f-803c-3d9a5364eb2e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cd37534b-ef2d-41ca-8868-be6f25e17c63" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_b09a4173-ee30-457f-803c-3d9a5364eb2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_394680b9-bf11-472f-b1c6-0952ade175d1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cd37534b-ef2d-41ca-8868-be6f25e17c63" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_394680b9-bf11-472f-b1c6-0952ade175d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_a0062a16-0240-4dcb-b275-b09c1a42d7e2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cd37534b-ef2d-41ca-8868-be6f25e17c63" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_a0062a16-0240-4dcb-b275-b09c1a42d7e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_b8761547-fcdc-41c1-b220-80f492b80507" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_6b2adb87-8edc-4a1a-b417-04fc95668dfe" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_b8761547-fcdc-41c1-b220-80f492b80507" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_6b2adb87-8edc-4a1a-b417-04fc95668dfe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_6a6853c8-af2e-40ef-a49d-4e8cc03d5715" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_b8761547-fcdc-41c1-b220-80f492b80507" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_6a6853c8-af2e-40ef-a49d-4e8cc03d5715" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_16fade3e-067f-4ce3-ac2c-522f6403faad" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_dd1879ae-e685-4ade-ac7d-ce26c8e7cac3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_16fade3e-067f-4ce3-ac2c-522f6403faad" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossTax_dd1879ae-e685-4ade-ac7d-ce26c8e7cac3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_930243e8-2621-40f3-b83b-3e4e9f810083" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_16fade3e-067f-4ce3-ac2c-522f6403faad" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_930243e8-2621-40f3-b83b-3e4e9f810083" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_ed39a223-02a6-4db9-819c-616639b2f014" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_5894cdd8-4b4a-41c3-af35-75fd2a1d8648" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_ed39a223-02a6-4db9-819c-616639b2f014" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_5894cdd8-4b4a-41c3-af35-75fd2a1d8648" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_0bd6d6ab-75c7-408b-b839-ce46fb9f86ca" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_ed39a223-02a6-4db9-819c-616639b2f014" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_0bd6d6ab-75c7-408b-b839-ce46fb9f86ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_7e8afa30-f61a-40ab-8e37-765ce86dadb5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_80984cb6-ae91-4c9d-8e69-eb7cc44160c6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_7e8afa30-f61a-40ab-8e37-765ce86dadb5" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_80984cb6-ae91-4c9d-8e69-eb7cc44160c6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_e2340969-fb17-4178-8ec7-2baabe3932d1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_7e8afa30-f61a-40ab-8e37-765ce86dadb5" xlink:to="loc_us-gaap_NetIncomeLoss_e2340969-fb17-4178-8ec7-2baabe3932d1" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME_1" xlink:type="simple" xlink:href="hsy-20241231.xsd#CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME_1"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_6376b73d-6902-4d44-9b6e-f0c6d13084b1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_e30d5a44-79c9-40f2-b215-a9c67b88838b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_6376b73d-6902-4d44-9b6e-f0c6d13084b1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_e30d5a44-79c9-40f2-b215-a9c67b88838b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_8e0d69d5-1dfa-43f8-bebd-039351c98e26" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_6376b73d-6902-4d44-9b6e-f0c6d13084b1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_8e0d69d5-1dfa-43f8-bebd-039351c98e26" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_709f5d60-239c-433d-abc5-f1f9afedf7c8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_6376b73d-6902-4d44-9b6e-f0c6d13084b1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_709f5d60-239c-433d-abc5-f1f9afedf7c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_a83a8790-f39c-425f-87af-c2222c5a700b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_6376b73d-6902-4d44-9b6e-f0c6d13084b1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_a83a8790-f39c-425f-87af-c2222c5a700b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_edb0e57d-4173-4d80-9770-29ea3f329267" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_6376b73d-6902-4d44-9b6e-f0c6d13084b1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_edb0e57d-4173-4d80-9770-29ea3f329267" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="hsy-20241231.xsd#CONSOLIDATEDBALANCESHEETS"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_4e2b0ea8-5418-4ca5-8466-d33196455945" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_3234c17d-4caa-4202-a522-bf1b7ed225eb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_4e2b0ea8-5418-4ca5-8466-d33196455945" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_3234c17d-4caa-4202-a522-bf1b7ed225eb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_cbab05d9-7318-4e55-8afd-06d26f8c83be" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_4e2b0ea8-5418-4ca5-8466-d33196455945" xlink:to="loc_us-gaap_CommonStockValue_cbab05d9-7318-4e55-8afd-06d26f8c83be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_726d61a6-4052-4bb8-aa13-3da68d0c1d71" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_4e2b0ea8-5418-4ca5-8466-d33196455945" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_726d61a6-4052-4bb8-aa13-3da68d0c1d71" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_55f1de03-5485-46bc-b7e2-682c5e39cbf4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_4e2b0ea8-5418-4ca5-8466-d33196455945" xlink:to="loc_us-gaap_PreferredStockValue_55f1de03-5485-46bc-b7e2-682c5e39cbf4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_34c2264e-04e5-4971-9e7b-1ce8bbecb3af" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_4e2b0ea8-5418-4ca5-8466-d33196455945" xlink:to="loc_us-gaap_AdditionalPaidInCapital_34c2264e-04e5-4971-9e7b-1ce8bbecb3af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonValue_32a3129a-287e-4986-a039-34638a020dd4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_TreasuryStockCommonValue"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_4e2b0ea8-5418-4ca5-8466-d33196455945" xlink:to="loc_us-gaap_TreasuryStockCommonValue_32a3129a-287e-4986-a039-34638a020dd4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_4def7efa-ab46-409f-9170-48e5eac877ac" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_ed63e31b-12d5-46d1-8615-61aeedc262df" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_4def7efa-ab46-409f-9170-48e5eac877ac" xlink:to="loc_us-gaap_AssetsCurrent_ed63e31b-12d5-46d1-8615-61aeedc262df" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_ab58c3cc-742b-4f99-9c6f-2506bcf7e12d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_4def7efa-ab46-409f-9170-48e5eac877ac" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_ab58c3cc-742b-4f99-9c6f-2506bcf7e12d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_3a442628-cedf-4ef8-bc2d-609b4095819b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_4def7efa-ab46-409f-9170-48e5eac877ac" xlink:to="loc_us-gaap_Goodwill_3a442628-cedf-4ef8-bc2d-609b4095819b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_25169547-eaa9-4e21-a10a-a4bd4fd6c251" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_4def7efa-ab46-409f-9170-48e5eac877ac" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_25169547-eaa9-4e21-a10a-a4bd4fd6c251" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_804d6ce3-ebc5-48c1-aa93-72d22ab25277" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_4def7efa-ab46-409f-9170-48e5eac877ac" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_804d6ce3-ebc5-48c1-aa93-72d22ab25277" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_3d2e2fee-7b7e-44d4-bd86-aba948b6083b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_4def7efa-ab46-409f-9170-48e5eac877ac" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_3d2e2fee-7b7e-44d4-bd86-aba948b6083b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_a2df30c3-1785-4f1b-805f-be98e5aee0fe" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_fb882d14-4753-4673-a631-a5c45b792d7f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_a2df30c3-1785-4f1b-805f-be98e5aee0fe" xlink:to="loc_us-gaap_AccountsPayableCurrent_fb882d14-4753-4673-a631-a5c45b792d7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_f62b93a3-62e8-4aed-98d4-9766ef434fb5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_a2df30c3-1785-4f1b-805f-be98e5aee0fe" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_f62b93a3-62e8-4aed-98d4-9766ef434fb5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_c96af3ac-156b-4cc2-8f15-e3726d2dd95c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedIncomeTaxesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_a2df30c3-1785-4f1b-805f-be98e5aee0fe" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_c96af3ac-156b-4cc2-8f15-e3726d2dd95c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_5cedbb4a-0c26-41bf-806b-1392dac617a3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ShortTermBorrowings"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_a2df30c3-1785-4f1b-805f-be98e5aee0fe" xlink:to="loc_us-gaap_ShortTermBorrowings_5cedbb4a-0c26-41bf-806b-1392dac617a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligationsCurrent_580881b2-6cd8-4520-8c24-2b4aadcf0624" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LongTermDebtAndCapitalLeaseObligationsCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_a2df30c3-1785-4f1b-805f-be98e5aee0fe" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligationsCurrent_580881b2-6cd8-4520-8c24-2b4aadcf0624" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_234e9a1b-700e-4170-8f88-0bba44060f73" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_f0b90c40-3d5d-4cea-bfde-c813159272b9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_234e9a1b-700e-4170-8f88-0bba44060f73" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_f0b90c40-3d5d-4cea-bfde-c813159272b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_8e4d2eb5-6be2-446b-956f-10685a6d62a5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_234e9a1b-700e-4170-8f88-0bba44060f73" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_8e4d2eb5-6be2-446b-956f-10685a6d62a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_78f6d7ef-341d-4aa7-aee2-ffaae8eef341" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_234e9a1b-700e-4170-8f88-0bba44060f73" xlink:to="loc_us-gaap_InventoryNet_78f6d7ef-341d-4aa7-aee2-ffaae8eef341" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_458ba88c-27ef-4b20-a858-eac0a6e7c9a3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_234e9a1b-700e-4170-8f88-0bba44060f73" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_458ba88c-27ef-4b20-a858-eac0a6e7c9a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_182e4ad3-9c8a-44b1-9bec-f9fa7f73c297" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_7d20b483-a9d6-44fd-b58e-c834d4966a28" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_182e4ad3-9c8a-44b1-9bec-f9fa7f73c297" xlink:to="loc_us-gaap_LiabilitiesCurrent_7d20b483-a9d6-44fd-b58e-c834d4966a28" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_20da1166-6c65-43e1-880a-05ce2dcb4903" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LongTermDebtAndCapitalLeaseObligations"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_182e4ad3-9c8a-44b1-9bec-f9fa7f73c297" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_20da1166-6c65-43e1-880a-05ce2dcb4903" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_8d77c523-e7b9-408e-8f09-b063caf49010" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_182e4ad3-9c8a-44b1-9bec-f9fa7f73c297" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_8d77c523-e7b9-408e-8f09-b063caf49010" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_1a322a79-98b4-4dae-933c-3ce80a1c9fa0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_182e4ad3-9c8a-44b1-9bec-f9fa7f73c297" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_1a322a79-98b4-4dae-933c-3ce80a1c9fa0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_08b9d55f-8240-47a1-8b31-082726b523ff" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_e599f1c7-4f40-4a78-a401-739af5821e36" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_08b9d55f-8240-47a1-8b31-082726b523ff" xlink:to="loc_us-gaap_Liabilities_e599f1c7-4f40-4a78-a401-739af5821e36" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_d33d358a-30e4-4863-b874-db2367e4b67c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_08b9d55f-8240-47a1-8b31-082726b523ff" xlink:to="loc_us-gaap_StockholdersEquity_d33d358a-30e4-4863-b874-db2367e4b67c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="hsy-20241231.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWS"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_bae58b47-54ad-47a0-88eb-bc44e2f10c09" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9b9e34e1-6a48-4c5e-8105-ffe6f58f87c7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_bae58b47-54ad-47a0-88eb-bc44e2f10c09" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9b9e34e1-6a48-4c5e-8105-ffe6f58f87c7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_1c7f3b4a-9a22-4a44-acfd-86b80224cd18" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_bae58b47-54ad-47a0-88eb-bc44e2f10c09" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_1c7f3b4a-9a22-4a44-acfd-86b80224cd18" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_6dfa0ce4-55e1-410b-81a5-f844dc2b4c4c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_bae58b47-54ad-47a0-88eb-bc44e2f10c09" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_6dfa0ce4-55e1-410b-81a5-f844dc2b4c4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f056e310-9c94-4715-b963-570b4f678c52" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_bae58b47-54ad-47a0-88eb-bc44e2f10c09" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f056e310-9c94-4715-b963-570b4f678c52" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_908b98ba-3668-4e34-b9c4-b1ed9a8257a6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_f7ed4a98-0562-4d42-8ec0-8df151931c5e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_908b98ba-3668-4e34-b9c4-b1ed9a8257a6" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_f7ed4a98-0562-4d42-8ec0-8df151931c5e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_ce5f4efc-2d55-4057-a4b6-585fa629bac6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsToAcquireEquityMethodInvestments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_908b98ba-3668-4e34-b9c4-b1ed9a8257a6" xlink:to="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_ce5f4efc-2d55-4057-a4b6-585fa629bac6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_0572326e-025a-4682-ae6d-77a88434a641" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_908b98ba-3668-4e34-b9c4-b1ed9a8257a6" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_0572326e-025a-4682-ae6d-77a88434a641" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_823e2963-3ac0-4600-b89b-10659d4e474b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsForProceedsFromOtherInvestingActivities"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_908b98ba-3668-4e34-b9c4-b1ed9a8257a6" xlink:to="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_823e2963-3ac0-4600-b89b-10659d4e474b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_a68eb894-6a2d-4534-b2e7-1d92aaea6e7a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromRepaymentsOfShortTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:to="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_a68eb894-6a2d-4534-b2e7-1d92aaea6e7a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_e5fb255b-3cff-4c5c-b9e3-5304dca2f391" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromIssuanceOfLongTermDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_e5fb255b-3cff-4c5c-b9e3-5304dca2f391" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_e4e88e7b-eabc-4d56-8ced-55ab0cbb36e1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_e4e88e7b-eabc-4d56-8ced-55ab0cbb36e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_8e6d1f6a-9c0b-459e-8890-465c3c1ff75b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_8e6d1f6a-9c0b-459e-8890-465c3c1ff75b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_3ae03393-4ab2-4419-acd1-32c22366d3d3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_3ae03393-4ab2-4419-acd1-32c22366d3d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_f7e035d8-f15e-45fc-b3ef-8444c1f51ad5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_f7e035d8-f15e-45fc-b3ef-8444c1f51ad5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_9c6a86c8-0cbb-4cd2-b424-3ceab28aa583" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a3968ba0-7ad3-42c2-ae7d-b2af4fc8c6e2" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_9c6a86c8-0cbb-4cd2-b424-3ceab28aa583" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_3ba542bf-68be-423f-9cb3-814f68b9c903" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_NetIncomeLoss_3ba542bf-68be-423f-9cb3-814f68b9c903" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_a136afe8-0147-4b25-a508-ed81797df262" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_a136afe8-0147-4b25-a508-ed81797df262" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_e66f9fa9-bc0c-411e-b9a0-dbf494f2a086" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_ShareBasedCompensation_e66f9fa9-bc0c-411e-b9a0-dbf494f2a086" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_12de8948-3376-4fb7-ba0d-c724593c6661" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxesAndTaxCredits"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_12de8948-3376-4fb7-ba0d-c724593c6661" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_0c04c8a6-7094-4ac3-8bc4-c1672c2b61d0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_0c04c8a6-7094-4ac3-8bc4-c1672c2b61d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_44382747-4efa-4d36-80bd-4226890c75ed" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_44382747-4efa-4d36-80bd-4226890c75ed" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_3eab0f71-4935-43d7-9ab4-b8a4e0544793" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_3eab0f71-4935-43d7-9ab4-b8a4e0544793" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_bcbfa6d8-2749-416c-a273-292a924736b7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_bcbfa6d8-2749-416c-a273-292a924736b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_4f65a431-49ed-4810-9fa7-00d2b27a1484" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_4f65a431-49ed-4810-9fa7-00d2b27a1484" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_2ec4c50c-e655-4f10-a7af-1cddf435bcdf" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_2ec4c50c-e655-4f10-a7af-1cddf435bcdf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_234f75cb-894d-4fa9-bc91-4bcbf96273cb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccruedTaxesPayable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_234f75cb-894d-4fa9-bc91-4bcbf96273cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_1cb78488-8754-4aa9-9cd2-721c7a6724dd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PensionAndOtherPostretirementBenefitContributions"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_1cb78488-8754-4aa9-9cd2-721c7a6724dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_dbb2a3ad-e5aa-44ec-a788-dec8c601d2d6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_dbb2a3ad-e5aa-44ec-a788-dec8c601d2d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnrealizedGainLossOnDerivativesAndCommodityContracts_8f5f139c-36c9-4fce-b5e4-24df3f2a495d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_UnrealizedGainLossOnDerivativesAndCommodityContracts"/>
    <link:calculationArc order="14" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_a157f4a5-ce0b-4b3c-ae76-c62711e15916" xlink:to="loc_us-gaap_UnrealizedGainLossOnDerivativesAndCommodityContracts_8f5f139c-36c9-4fce-b5e4-24df3f2a495d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_541ff1c2-9ca8-49dd-b862-a128139051cc" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillGross_77bd9ed6-b467-40cd-93fd-234e8487c71e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GoodwillGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_541ff1c2-9ca8-49dd-b862-a128139051cc" xlink:to="loc_us-gaap_GoodwillGross_77bd9ed6-b467-40cd-93fd-234e8487c71e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_c329ad4d-14fb-4215-97f7-90dd8c42309d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_541ff1c2-9ca8-49dd-b862-a128139051cc" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_c329ad4d-14fb-4215-97f7-90dd8c42309d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_21775258-a906-42e7-a899-7d772af22308" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_348a3f54-f00f-4c2e-b5fa-0ed500297a4c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_21775258-a906-42e7-a899-7d772af22308" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_348a3f54-f00f-4c2e-b5fa-0ed500297a4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_fe66d4d1-ec3c-4b0f-90de-baa3a388525f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_21775258-a906-42e7-a899-7d772af22308" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_fe66d4d1-ec3c-4b0f-90de-baa3a388525f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndCapitalLeaseObligations_8537c387-cb88-4b6c-af4f-02c891666dc2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DebtAndCapitalLeaseObligations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiability_bd51b31c-c4d9-45f0-95b4-20d7f443066d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtAndCapitalLeaseObligations_8537c387-cb88-4b6c-af4f-02c891666dc2" xlink:to="loc_us-gaap_FinanceLeaseLiability_bd51b31c-c4d9-45f0-95b4-20d7f443066d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_04dd4e0c-c524-44dc-ae0a-e0e8f35db2eb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LongTermDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtAndCapitalLeaseObligations_8537c387-cb88-4b6c-af4f-02c891666dc2" xlink:to="loc_us-gaap_LongTermDebt_04dd4e0c-c524-44dc-ae0a-e0e8f35db2eb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_82d4a21d-1fa3-43e6-86d5-3a0a508a31ac" xlink:href="hsy-20241231.xsd#hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtAndCapitalLeaseObligations_8537c387-cb88-4b6c-af4f-02c891666dc2" xlink:to="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_82d4a21d-1fa3-43e6-86d5-3a0a508a31ac" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_c45d1d57-c2b4-4340-b62d-6624641f14ef" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestCostsCapitalizedAdjustment_2633feb7-8c13-43bc-829a-5263488d727c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InterestCostsCapitalizedAdjustment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_c45d1d57-c2b4-4340-b62d-6624641f14ef" xlink:to="loc_us-gaap_InterestCostsCapitalizedAdjustment_2633feb7-8c13-43bc-829a-5263488d727c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebt_9c8e7ffa-5ac9-4099-accb-817d0694e9b3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InterestExpenseDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_c45d1d57-c2b4-4340-b62d-6624641f14ef" xlink:to="loc_us-gaap_InterestExpenseDebt_9c8e7ffa-5ac9-4099-accb-817d0694e9b3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFCOMPONENTSOFLEASEEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#LEASESSCHEDULEOFCOMPONENTSOFLEASEEXPENSEDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSCHEDULEOFCOMPONENTSOFLEASEEXPENSEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_14ba9712-d54d-4a88-a8ff-c3d4b7f4bfce" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_88699896-3cdf-4a0b-9a87-4b82eb7e8efd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_14ba9712-d54d-4a88-a8ff-c3d4b7f4bfce" xlink:to="loc_us-gaap_OperatingLeaseCost_88699896-3cdf-4a0b-9a87-4b82eb7e8efd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_519a4950-5cfc-417c-8b60-dd1219d08dec" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseRightOfUseAssetAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_14ba9712-d54d-4a88-a8ff-c3d4b7f4bfce" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_519a4950-5cfc-417c-8b60-dd1219d08dec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseInterestExpense_e97d3c3f-b526-4a2e-8b3d-c7c0148bd6d8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseInterestExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_14ba9712-d54d-4a88-a8ff-c3d4b7f4bfce" xlink:to="loc_us-gaap_FinanceLeaseInterestExpense_e97d3c3f-b526-4a2e-8b3d-c7c0148bd6d8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseRightofUseAsset_becb6616-5c7f-4765-afd5-b303dbaae75f" xlink:href="hsy-20241231.xsd#hsy_LeaseRightofUseAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_9f77f06b-a6a3-4773-88e0-f115df2171b5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_becb6616-5c7f-4765-afd5-b303dbaae75f" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_9f77f06b-a6a3-4773-88e0-f115df2171b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_27fdc0ad-9e9e-4c2d-a6fd-b8a103bd02e9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_becb6616-5c7f-4765-afd5-b303dbaae75f" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_27fdc0ad-9e9e-4c2d-a6fd-b8a103bd02e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_b9e66a60-dcb8-4362-9a59-e8f4382e9873" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_130111e1-de68-4efb-9002-d49924a1fa4f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseRightOfUseAsset_b9e66a60-dcb8-4362-9a59-e8f4382e9873" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_130111e1-de68-4efb-9002-d49924a1fa4f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetBeforeAccumulatedAmortization_cd854c38-ca1c-485e-a073-8121aaf875e1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseRightOfUseAssetBeforeAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseRightOfUseAsset_b9e66a60-dcb8-4362-9a59-e8f4382e9873" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetBeforeAccumulatedAmortization_cd854c38-ca1c-485e-a073-8121aaf875e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseLiability_0d13b85a-f5b0-45e3-b994-da31d90566b6" xlink:href="hsy-20241231.xsd#hsy_LeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_28626346-012e-49d4-9215-726db05f4f1a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_0d13b85a-f5b0-45e3-b994-da31d90566b6" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_28626346-012e-49d4-9215-726db05f4f1a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_fe319a2d-21b1-4d59-ba1b-9b27ae1abb44" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_0d13b85a-f5b0-45e3-b994-da31d90566b6" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_fe319a2d-21b1-4d59-ba1b-9b27ae1abb44" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_0f9e99e0-e1a4-4962-adfb-dfe23550ddd0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_0d13b85a-f5b0-45e3-b994-da31d90566b6" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_0f9e99e0-e1a4-4962-adfb-dfe23550ddd0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_17d9bf0f-251f-49fa-a7aa-d7559e7d79ae" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_0d13b85a-f5b0-45e3-b994-da31d90566b6" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_17d9bf0f-251f-49fa-a7aa-d7559e7d79ae" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_8d81a206-3ce6-4093-9bdd-9bbb1910cefc" xlink:href="hsy-20241231.xsd#hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_3303b10a-9e28-4d40-8c39-b1dcfb8783d8" xlink:href="hsy-20241231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_8d81a206-3ce6-4093-9bdd-9bbb1910cefc" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_3303b10a-9e28-4d40-8c39-b1dcfb8783d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_c771edad-db34-4977-9546-7c778389686a" xlink:href="hsy-20241231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_8d81a206-3ce6-4093-9bdd-9bbb1910cefc" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_c771edad-db34-4977-9546-7c778389686a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_1d30e2d9-759c-4be5-9838-83fa63d5d9db" xlink:href="hsy-20241231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_8d81a206-3ce6-4093-9bdd-9bbb1910cefc" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_1d30e2d9-759c-4be5-9838-83fa63d5d9db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFive_957002af-3599-47dc-859b-e669c73f6ec3" xlink:href="hsy-20241231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFive"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_8d81a206-3ce6-4093-9bdd-9bbb1910cefc" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFive_957002af-3599-47dc-859b-e669c73f6ec3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFive_8c3c4a82-1522-45c2-a9a3-332de2d70b1c" xlink:href="hsy-20241231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_8d81a206-3ce6-4093-9bdd-9bbb1910cefc" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFive_8c3c4a82-1522-45c2-a9a3-332de2d70b1c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_ffbb63db-501e-4f9a-846b-f38f574edb77" xlink:href="hsy-20241231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_8d81a206-3ce6-4093-9bdd-9bbb1910cefc" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_ffbb63db-501e-4f9a-846b-f38f574edb77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_a7ee992c-4376-4181-a8ef-2363073614c1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_e3f9870e-4e03-4e52-bc43-df94e0b8d2b8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_a7ee992c-4376-4181-a8ef-2363073614c1" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_e3f9870e-4e03-4e52-bc43-df94e0b8d2b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_486b8132-f7cb-4ba2-9176-e5fbc7350ac1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_a7ee992c-4376-4181-a8ef-2363073614c1" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_486b8132-f7cb-4ba2-9176-e5fbc7350ac1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_2e419315-9881-4904-b263-e431f21e417a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_a7ee992c-4376-4181-a8ef-2363073614c1" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_2e419315-9881-4904-b263-e431f21e417a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_c81c1735-8415-4d9b-ab23-d1211af24899" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_a7ee992c-4376-4181-a8ef-2363073614c1" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_c81c1735-8415-4d9b-ab23-d1211af24899" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_815973b7-9954-4f1b-8f8d-ac6c760cd30b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_a7ee992c-4376-4181-a8ef-2363073614c1" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_815973b7-9954-4f1b-8f8d-ac6c760cd30b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_0c31569c-1172-4111-8679-3b34df524bae" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_a7ee992c-4376-4181-a8ef-2363073614c1" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_0c31569c-1172-4111-8679-3b34df524bae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_d3d3b167-d314-4831-aec5-0c20a36e18c2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_4474f5f3-fa73-41f3-a320-cc2888b9c817" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_d3d3b167-d314-4831-aec5-0c20a36e18c2" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_4474f5f3-fa73-41f3-a320-cc2888b9c817" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_5fa608d4-2e76-4e6a-a2b8-99b73fe8d5c7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_d3d3b167-d314-4831-aec5-0c20a36e18c2" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_5fa608d4-2e76-4e6a-a2b8-99b73fe8d5c7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_06b2b0ce-912a-457f-b37c-8014956783f2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_d3d3b167-d314-4831-aec5-0c20a36e18c2" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_06b2b0ce-912a-457f-b37c-8014956783f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive_58811bab-fc0c-45a3-91f5-c0d7d38fc33c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_d3d3b167-d314-4831-aec5-0c20a36e18c2" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive_58811bab-fc0c-45a3-91f5-c0d7d38fc33c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_3e615a20-0ea1-4f76-a428-53080b01bf24" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_d3d3b167-d314-4831-aec5-0c20a36e18c2" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_3e615a20-0ea1-4f76-a428-53080b01bf24" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive_437aa47d-e80f-4885-aece-c84298d1d79c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_d3d3b167-d314-4831-aec5-0c20a36e18c2" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive_437aa47d-e80f-4885-aece-c84298d1d79c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFINCOMELOSSBEFORETAXESDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#INCOMETAXESSCHEDULEOFINCOMELOSSBEFORETAXESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFINCOMELOSSBEFORETAXESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_022c41c4-7ea5-4bb9-a750-05ede6203150" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_7892cfd7-ed09-486a-8995-a2dea3ad2ca6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_022c41c4-7ea5-4bb9-a750-05ede6203150" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_7892cfd7-ed09-486a-8995-a2dea3ad2ca6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_9308b702-b6ed-449e-b0ca-c9f089f1aee9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_022c41c4-7ea5-4bb9-a750-05ede6203150" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_9308b702-b6ed-449e-b0ca-c9f089f1aee9" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFCOMPONENTSOFINCOMETAXEXPENSEBENEFITDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#INCOMETAXESSCHEDULEOFCOMPONENTSOFINCOMETAXEXPENSEBENEFITDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFCOMPONENTSOFINCOMETAXEXPENSEBENEFITDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_5b475021-225e-4e7a-8e47-3186b95f08eb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_b89ca839-d7b1-4c20-a2fe-e7344eee2c09" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_5b475021-225e-4e7a-8e47-3186b95f08eb" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_b89ca839-d7b1-4c20-a2fe-e7344eee2c09" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_e3b95f14-76c4-45a4-a673-f831fe8fa930" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_5b475021-225e-4e7a-8e47-3186b95f08eb" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_e3b95f14-76c4-45a4-a673-f831fe8fa930" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_7d96c93a-14cb-4c01-86b3-b42e5bb34c2e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_0eb29823-5c68-4a34-a013-16778abed78e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredFederalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_7d96c93a-14cb-4c01-86b3-b42e5bb34c2e" xlink:to="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_0eb29823-5c68-4a34-a013-16778abed78e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_d5a2ad36-efbd-49eb-b352-5443f913ae1c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_7d96c93a-14cb-4c01-86b3-b42e5bb34c2e" xlink:to="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_d5a2ad36-efbd-49eb-b352-5443f913ae1c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_79880a6d-c1c4-4766-8cd8-b14529bf1def" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredForeignIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_7d96c93a-14cb-4c01-86b3-b42e5bb34c2e" xlink:to="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_79880a6d-c1c4-4766-8cd8-b14529bf1def" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3d12f12e-9148-4702-a82c-35187325416d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentFederalTaxExpenseBenefit_1b1fa366-0a32-4890-b266-29d83a4db93a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CurrentFederalTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3d12f12e-9148-4702-a82c-35187325416d" xlink:to="loc_us-gaap_CurrentFederalTaxExpenseBenefit_1b1fa366-0a32-4890-b266-29d83a4db93a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_104eacf5-e57f-4f5e-97a8-ddadb3d2230c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CurrentStateAndLocalTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3d12f12e-9148-4702-a82c-35187325416d" xlink:to="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_104eacf5-e57f-4f5e-97a8-ddadb3d2230c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentForeignTaxExpenseBenefit_8872134d-6b9c-43ec-9d27-a0a36b745f43" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CurrentForeignTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_3d12f12e-9148-4702-a82c-35187325416d" xlink:to="loc_us-gaap_CurrentForeignTaxExpenseBenefit_8872134d-6b9c-43ec-9d27-a0a36b745f43" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFDEFERREDTAXASSETANDLIABILITIESDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#INCOMETAXESSCHEDULEOFDEFERREDTAXASSETANDLIABILITIESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFDEFERREDTAXASSETANDLIABILITIESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_d3b54d3a-dc00-4beb-8933-7b93a972fd71" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_45bbdd40-bc07-42d0-9004-6e42584487d8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_d3b54d3a-dc00-4beb-8933-7b93a972fd71" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_45bbdd40-bc07-42d0-9004-6e42584487d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_8bb1a278-04f6-4d53-83aa-ecc2c2d3c492" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_d3b54d3a-dc00-4beb-8933-7b93a972fd71" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_8bb1a278-04f6-4d53-83aa-ecc2c2d3c492" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilities_59a43be7-5bd8-4d1f-8775-bb042ed44473" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_4546a277-fc1b-4443-9b1d-07e65d264183" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_59a43be7-5bd8-4d1f-8775-bb042ed44473" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_4546a277-fc1b-4443-9b1d-07e65d264183" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_b81dd090-7977-4cd3-b8f4-f0800949a786" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_59a43be7-5bd8-4d1f-8775-bb042ed44473" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_b81dd090-7977-4cd3-b8f4-f0800949a786" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_c84df1b9-57a3-4d65-a1c7-a93ff1be7b97" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_c84df1b9-57a3-4d65-a1c7-a93ff1be7b97" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_29d4f76b-e3a3-4faf-8c43-2a10494a62d6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_29d4f76b-e3a3-4faf-8c43-2a10494a62d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredTaxLiabilitiesDeferredExpenseCompensationAndBenefitsPensions_cab349b3-d5a7-4109-80f5-f568f579c6bf" xlink:href="hsy-20241231.xsd#hsy_DeferredTaxLiabilitiesDeferredExpenseCompensationAndBenefitsPensions"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:to="loc_hsy_DeferredTaxLiabilitiesDeferredExpenseCompensationAndBenefitsPensions_cab349b3-d5a7-4109-80f5-f568f579c6bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedInventoryCosts_b7fc5d61-2411-42a9-9572-aafec54e8f70" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedInventoryCosts"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedInventoryCosts_b7fc5d61-2411-42a9-9572-aafec54e8f70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_029f9c26-391a-41de-89df-3b3fdcc4344b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_029f9c26-391a-41de-89df-3b3fdcc4344b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesLeasingArrangements_76661aa3-25c7-4136-a04e-4f018758f5c9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilitiesLeasingArrangements"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesLeasingArrangements_76661aa3-25c7-4136-a04e-4f018758f5c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDerivatives_79be854c-e732-49d2-9eb8-db56307ea620" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxLiabilitiesDerivatives"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_ac603145-e8a9-46bf-9112-e67c13092f7a" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDerivatives_79be854c-e732-49d2-9eb8-db56307ea620" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPostretirementBenefits_0bb560a6-6ab1-4b09-a8fb-7d410bc10a27" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPostretirementBenefits"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPostretirementBenefits_0bb560a6-6ab1-4b09-a8fb-7d410bc10a27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther_cc1e70bd-4e47-4c90-8419-db8c26875847" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther_cc1e70bd-4e47-4c90-8419-db8c26875847" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_1f4b4829-e07b-4f30-97ad-bfefc8e6cf5a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_1f4b4829-e07b-4f30-97ad-bfefc8e6cf5a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsDerivativeInstruments_db0aed9f-100c-44f5-800a-6a4a5a876cc9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsDerivativeInstruments"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_us-gaap_DeferredTaxAssetsDerivativeInstruments_db0aed9f-100c-44f5-800a-6a4a5a876cc9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredTaxAssetLeasingArrangements_d5838a33-821d-4764-8523-c74da5e9c33a" xlink:href="hsy-20241231.xsd#hsy_DeferredTaxAssetLeasingArrangements"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_hsy_DeferredTaxAssetLeasingArrangements_d5838a33-821d-4764-8523-c74da5e9c33a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredTaxAssetTaxDeferredExpenseAccruedTradePromotionReserves_2cab1020-9320-4971-b77f-f6235c086d91" xlink:href="hsy-20241231.xsd#hsy_DeferredTaxAssetTaxDeferredExpenseAccruedTradePromotionReserves"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_hsy_DeferredTaxAssetTaxDeferredExpenseAccruedTradePromotionReserves_2cab1020-9320-4971-b77f-f6235c086d91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_7750bc42-cd7c-46a6-a8e0-d97e28302157" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_7750bc42-cd7c-46a6-a8e0-d97e28302157" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsCapitalLossCarryforwards_eebe2c57-3dbb-4c5b-8c72-345e9f81b4b4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsCapitalLossCarryforwards"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_us-gaap_DeferredTaxAssetsCapitalLossCarryforwards_eebe2c57-3dbb-4c5b-8c72-345e9f81b4b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_6c324a90-8add-4878-88d5-b5b94c9c5167" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_80fda52f-cefd-42d4-a3e2-e974b32bcdb0" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_6c324a90-8add-4878-88d5-b5b94c9c5167" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFEFFECTIVEINCOMETAXRATERECONCILIATIONDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#INCOMETAXESSCHEDULEOFEFFECTIVEINCOMETAXRATERECONCILIATIONDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFEFFECTIVEINCOMETAXRATERECONCILIATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_0e218144-5304-4f19-b43d-bd822ebceda1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_0e218144-5304-4f19-b43d-bd822ebceda1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_5cc400cf-c6bd-4b0b-a990-bbffbeae907d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_5cc400cf-c6bd-4b0b-a990-bbffbeae907d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential_a27aa778-3244-405d-bc1e-0fd53305b169" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential_a27aa778-3244-405d-bc1e-0fd53305b169" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits_0bd845fd-09d1-4684-87ca-5b5d87e22461" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits_0bd845fd-09d1-4684-87ca-5b5d87e22461" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies_ab893559-7eb4-44d9-8a87-5af7a7168343" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies_ab893559-7eb4-44d9-8a87-5af7a7168343" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent_51cb6fb0-2d73-45b7-8949-61bd02bff80a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent_51cb6fb0-2d73-45b7-8949-61bd02bff80a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherReconcilingItemsPercent_2d2b6686-d7b6-4078-b104-64568b4e0664" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherReconcilingItemsPercent"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_f756b2fd-e356-4ab8-834f-111e2f427785" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherReconcilingItemsPercent_2d2b6686-d7b6-4078-b104-64568b4e0664" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFDEFINEDBENEFITOBLIGATIONSPLANASSETSANDFUNDEDSTATUSDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFDEFINEDBENEFITOBLIGATIONSPLANASSETSANDFUNDEDSTATUSDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFDEFINEDBENEFITOBLIGATIONSPLANASSETSANDFUNDEDSTATUSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_b70084e6-ca33-43c5-8a2c-87c7a0ff6845" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanFundedStatusOfPlan"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligation_cddc87ea-68f3-44c7-a8fb-3603c2286d0f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanBenefitObligation"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_b70084e6-ca33-43c5-8a2c-87c7a0ff6845" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligation_cddc87ea-68f3-44c7-a8fb-3603c2286d0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_72396a26-d75b-4969-8776-d7d977b7295e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_b70084e6-ca33-43c5-8a2c-87c7a0ff6845" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_72396a26-d75b-4969-8776-d7d977b7295e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_6174e743-2cab-43c9-85d7-a28f44b39e52" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_7c49a7f6-f129-4e5c-badd-b1d8e152c291" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_6174e743-2cab-43c9-85d7-a28f44b39e52" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_7c49a7f6-f129-4e5c-badd-b1d8e152c291" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities_e4f06dd5-08d0-4ff4-8c37-c7597d53265e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_6174e743-2cab-43c9-85d7-a28f44b39e52" xlink:to="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities_e4f06dd5-08d0-4ff4-8c37-c7597d53265e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent_adcfc67b-7c4d-4ae7-b3cb-af8732210d17" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_6174e743-2cab-43c9-85d7-a28f44b39e52" xlink:to="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent_adcfc67b-7c4d-4ae7-b3cb-af8732210d17" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_25e67c9e-9ba8-4ccb-99e3-97d2a977a8b3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax_411b030d-c3d2-4913-81d9-4247b57b1eff" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_25e67c9e-9ba8-4ccb-99e3-97d2a977a8b3" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax_411b030d-c3d2-4913-81d9-4247b57b1eff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax_dfd720cb-632d-4bcf-9108-0670b2553ee3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_25e67c9e-9ba8-4ccb-99e3-97d2a977a8b3" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax_dfd720cb-632d-4bcf-9108-0670b2553ee3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_1fc79aa7-50bc-4b3f-894e-d0bb0eb4b50d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax_71e35616-0f5a-4034-8035-5d369e8823e4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_1fc79aa7-50bc-4b3f-894e-d0bb0eb4b50d" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax_71e35616-0f5a-4034-8035-5d369e8823e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_4ea1a589-a488-42cd-9e45-0640d483e5d1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_1fc79aa7-50bc-4b3f-894e-d0bb0eb4b50d" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_4ea1a589-a488-42cd-9e45-0640d483e5d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_c802b5d1-c628-4f6b-a3c4-a01c359bdee6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_92fc078d-96c7-4609-b841-5be7acb5ecdd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_c802b5d1-c628-4f6b-a3c4-a01c359bdee6" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_92fc078d-96c7-4609-b841-5be7acb5ecdd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_b7f28200-89b3-4b2b-ac3f-cb9f97953757" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_c802b5d1-c628-4f6b-a3c4-a01c359bdee6" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_b7f28200-89b3-4b2b-ac3f-cb9f97953757" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_a46bd8ff-f65b-4afb-9117-e400c7684c9c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_a46bd8ff-f65b-4afb-9117-e400c7684c9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_4ecff532-ae67-4a3d-9733-07a4933dc96b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_4ecff532-ae67-4a3d-9733-07a4933dc96b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_97ecd272-9dc4-4098-a20a-f192f7f01dd7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_97ecd272-9dc4-4098-a20a-f192f7f01dd7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_983811e1-0762-4915-8f0c-13155b8e2624" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_983811e1-0762-4915-8f0c-13155b8e2624" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_f76681b4-7da3-4daa-8537-d601b73953d5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_f76681b4-7da3-4daa-8537-d601b73953d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_ed54730a-d4d7-40ad-a57b-4df01428cfc1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_ed54730a-d4d7-40ad-a57b-4df01428cfc1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToCurtailments_06a18635-50ee-4d50-a8df-002fd59ef11a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToCurtailments"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_67e36106-a6f8-46d7-b69d-cd28bfdaa181" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToCurtailments_06a18635-50ee-4d50-a8df-002fd59ef11a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_2edd0fb3-06d3-45f6-8290-1ef72848c1f9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Dividends_307f9c4c-0bfa-45a0-99b3-5960525f4cca" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Dividends"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_2edd0fb3-06d3-45f6-8290-1ef72848c1f9" xlink:to="loc_us-gaap_Dividends_307f9c4c-0bfa-45a0-99b3-5960525f4cca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_d69458f1-9eb8-4455-bb12-4b447461253c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_2edd0fb3-06d3-45f6-8290-1ef72848c1f9" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_d69458f1-9eb8-4455-bb12-4b447461253c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_a7d93bd9-962d-44b8-87a1-911b4e2a5d70" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_b58106ed-88d7-45fd-b38e-a986149f90c5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_a7d93bd9-962d-44b8-87a1-911b4e2a5d70" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_b58106ed-88d7-45fd-b38e-a986149f90c5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DistributedEarnings_fa19aa73-6979-4650-9328-ee93cb8abeae" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DistributedEarnings"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_a7d93bd9-962d-44b8-87a1-911b4e2a5d70" xlink:to="loc_us-gaap_DistributedEarnings_fa19aa73-6979-4650-9328-ee93cb8abeae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_cab6af4c-cf5e-4f51-8fb9-347384dffa77" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_a7d93bd9-962d-44b8-87a1-911b4e2a5d70" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_cab6af4c-cf5e-4f51-8fb9-347384dffa77" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/OTHERINCOMEEXPENSENETSCHEDULEOFOTHERINCOMEANDEXPENSENETDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#OTHERINCOMEEXPENSENETSCHEDULEOFOTHERINCOMEANDEXPENSENETDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/OTHERINCOMEEXPENSENETSCHEDULEOFOTHERINCOMEANDEXPENSENETDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_1f81e3bb-c95c-4314-a763-59e19c619178" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_e418814e-ffdb-4b8e-b534-32f3c67208a7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_1f81e3bb-c95c-4314-a763-59e19c619178" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_e418814e-ffdb-4b8e-b534-32f3c67208a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DefinedBenefitPlanNonServiceCost_b20faef9-1cc8-498e-b7a0-42d722822706" xlink:href="hsy-20241231.xsd#hsy_DefinedBenefitPlanNonServiceCost"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_1f81e3bb-c95c-4314-a763-59e19c619178" xlink:to="loc_hsy_DefinedBenefitPlanNonServiceCost_b20faef9-1cc8-498e-b7a0-42d722822706" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherNonoperatingGainLoss_7f96b65b-fc1b-4d5c-b05d-28adc3d83daf" xlink:href="hsy-20241231.xsd#hsy_OtherNonoperatingGainLoss"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_1f81e3bb-c95c-4314-a763-59e19c619178" xlink:to="loc_hsy_OtherNonoperatingGainLoss_7f96b65b-fc1b-4d5c-b05d-28adc3d83daf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SUPPLEMENTALBALANCESHEETINFORMATIONSCHEDULEOFSUPPLEMENTALBALANCESHEETINFORMATIONDetails" xlink:type="simple" xlink:href="hsy-20241231.xsd#SUPPLEMENTALBALANCESHEETINFORMATIONSCHEDULEOFSUPPLEMENTALBALANCESHEETINFORMATIONDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/SUPPLEMENTALBALANCESHEETINFORMATIONSCHEDULEOFSUPPLEMENTALBALANCESHEETINFORMATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_e49529c3-eebe-4af8-a473-650c6aa9ab13" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_11a56be0-81bf-4c57-a44e-5219d8c0dafe" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_e49529c3-eebe-4af8-a473-650c6aa9ab13" xlink:to="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_11a56be0-81bf-4c57-a44e-5219d8c0dafe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_8a362bf6-0649-4ee7-be60-a47cfa79e768" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_e49529c3-eebe-4af8-a473-650c6aa9ab13" xlink:to="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_8a362bf6-0649-4ee7-be60-a47cfa79e768" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_e321fc3c-6c66-4307-98f5-bda7778652c9" xlink:href="hsy-20241231.xsd#hsy_OtherMiscellaneousLiabilitiesNonCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_e49529c3-eebe-4af8-a473-650c6aa9ab13" xlink:to="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_e321fc3c-6c66-4307-98f5-bda7778652c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_4d50d4ee-9f2d-434f-bf76-605bcdfd5380" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_e49529c3-eebe-4af8-a473-650c6aa9ab13" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_4d50d4ee-9f2d-434f-bf76-605bcdfd5380" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_5e3d141f-7fc3-47d2-ac98-3c73d17c0e23" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_0d2b5599-ef16-4fcf-87b1-b91485ebd2d6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_5e3d141f-7fc3-47d2-ac98-3c73d17c0e23" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_0d2b5599-ef16-4fcf-87b1-b91485ebd2d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedMarketingCostsCurrent_63018c8a-07b8-4185-9e0d-64c6dbbfc6fc" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedMarketingCostsCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_5e3d141f-7fc3-47d2-ac98-3c73d17c0e23" xlink:to="loc_us-gaap_AccruedMarketingCostsCurrent_63018c8a-07b8-4185-9e0d-64c6dbbfc6fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_d3bb7451-48a6-49a9-ba43-42ee9e6785af" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_5e3d141f-7fc3-47d2-ac98-3c73d17c0e23" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_d3bb7451-48a6-49a9-ba43-42ee9e6785af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_5dfd2a78-88ba-443e-be4a-d69d29de181b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_5e3d141f-7fc3-47d2-ac98-3c73d17c0e23" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_5dfd2a78-88ba-443e-be4a-d69d29de181b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_fb842d0a-cd43-437e-a7b0-1b56575e215d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_52dc9be0-c498-4ec8-a5c1-cedc73031de1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_fb842d0a-cd43-437e-a7b0-1b56575e215d" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_52dc9be0-c498-4ec8-a5c1-cedc73031de1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_9ca35e0a-b153-4e28-9dd1-8b564217e8f4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_fb842d0a-cd43-437e-a7b0-1b56575e215d" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_9ca35e0a-b153-4e28-9dd1-8b564217e8f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_041f9b63-8d14-470b-8c32-4319ade06bae" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_fb842d0a-cd43-437e-a7b0-1b56575e215d" xlink:to="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_041f9b63-8d14-470b-8c32-4319ade06bae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_1a14feaf-d44d-4e18-909c-bd0b2d59b22d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_875b7f9f-f1ab-495d-8ba2-8d35d26e5ef8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_1a14feaf-d44d-4e18-909c-bd0b2d59b22d" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_875b7f9f-f1ab-495d-8ba2-8d35d26e5ef8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAccumulatedDepreciationAndAmortization_f658eb65-daef-4ee1-8d69-c896ad0925e9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAccumulatedDepreciationAndAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_1a14feaf-d44d-4e18-909c-bd0b2d59b22d" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAccumulatedDepreciationAndAmortization_f658eb65-daef-4ee1-8d69-c896ad0925e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_1af49396-b8b4-4a9a-a257-37f14693c6fc" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Land_5d1075bd-5c7d-48f3-8a7e-e3c591770e36" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Land"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_1af49396-b8b4-4a9a-a257-37f14693c6fc" xlink:to="loc_us-gaap_Land_5d1075bd-5c7d-48f3-8a7e-e3c591770e36" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingsAndImprovementsGross_177287a4-b63d-40a3-9d9d-d7a6b5893c39" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_BuildingsAndImprovementsGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_1af49396-b8b4-4a9a-a257-37f14693c6fc" xlink:to="loc_us-gaap_BuildingsAndImprovementsGross_177287a4-b63d-40a3-9d9d-d7a6b5893c39" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentGross_bddc57e4-fb3a-42ff-ba42-ed2cf002ec5f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_MachineryAndEquipmentGross"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_1af49396-b8b4-4a9a-a257-37f14693c6fc" xlink:to="loc_us-gaap_MachineryAndEquipmentGross_bddc57e4-fb3a-42ff-ba42-ed2cf002ec5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressGross_f5e8a77f-6733-422e-96cc-ade12712b6ba" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ConstructionInProgressGross"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_1af49396-b8b4-4a9a-a257-37f14693c6fc" xlink:to="loc_us-gaap_ConstructionInProgressGross_f5e8a77f-6733-422e-96cc-ade12712b6ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_c8f09424-7f46-4b2a-ae68-ba314e1d5876" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_2fc588d1-dcd5-4e2d-b640-5eb694847cd0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_c8f09424-7f46-4b2a-ae68-ba314e1d5876" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_2fc588d1-dcd5-4e2d-b640-5eb694847cd0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_1e599dd4-5357-4b39-9488-7ace7796ff20" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherAssetsCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_c8f09424-7f46-4b2a-ae68-ba314e1d5876" xlink:to="loc_us-gaap_OtherAssetsCurrent_1e599dd4-5357-4b39-9488-7ace7796ff20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_61cf826e-a083-450b-be52-85595cd0cb6d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_7ba60368-52a4-4421-ab09-cde47ea56674" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FIFOInventoryAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_61cf826e-a083-450b-be52-85595cd0cb6d" xlink:to="loc_us-gaap_FIFOInventoryAmount_7ba60368-52a4-4421-ab09-cde47ea56674" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryLIFOReserve_14106f57-f60f-43bb-b2f0-6daa8fc0645c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryLIFOReserve"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_61cf826e-a083-450b-be52-85595cd0cb6d" xlink:to="loc_us-gaap_InventoryLIFOReserve_14106f57-f60f-43bb-b2f0-6daa8fc0645c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_0536f03b-9e60-4eba-840c-37d33531734c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplierFinanceProgramObligationCurrent_c544bf9e-16ff-4cda-89ab-e881377d6f1a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_SupplierFinanceProgramObligationCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_0536f03b-9e60-4eba-840c-37d33531734c" xlink:to="loc_us-gaap_SupplierFinanceProgramObligationCurrent_c544bf9e-16ff-4cda-89ab-e881377d6f1a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableOtherCurrent_3b6a4fb3-cca3-47aa-8890-6d6244ac357a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccountsPayableOtherCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_0536f03b-9e60-4eba-840c-37d33531734c" xlink:to="loc_us-gaap_AccountsPayableOtherCurrent_3b6a4fb3-cca3-47aa-8890-6d6244ac357a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableTradeCurrent_63d5997f-ef78-4feb-bbae-3971d77b025f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccountsPayableTradeCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_0536f03b-9e60-4eba-840c-37d33531734c" xlink:to="loc_us-gaap_AccountsPayableTradeCurrent_63d5997f-ef78-4feb-bbae-3971d77b025f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_3971ed36-78fe-4379-846e-ff003bb742fe" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_93490b79-94bb-467e-be46-1e9c6f457c2e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_3971ed36-78fe-4379-846e-ff003bb742fe" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_93490b79-94bb-467e-be46-1e9c6f457c2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_83c7a780-2009-4d0a-8f4b-697f0fec0eb7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_3971ed36-78fe-4379-846e-ff003bb742fe" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_83c7a780-2009-4d0a-8f4b-697f0fec0eb7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_680b17d2-304f-483d-9b63-5cb591240a3c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_3971ed36-78fe-4379-846e-ff003bb742fe" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_680b17d2-304f-483d-9b63-5cb591240a3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousAssetsNonCurrent_782e2075-faf1-4dd2-9a27-fd5a50b96047" xlink:href="hsy-20241231.xsd#hsy_OtherMiscellaneousAssetsNonCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_3971ed36-78fe-4379-846e-ff003bb742fe" xlink:to="loc_hsy_OtherMiscellaneousAssetsNonCurrent_782e2075-faf1-4dd2-9a27-fd5a50b96047" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalizedComputerSoftwareNet_9e197ab8-6208-4726-87cf-64d51067c4e2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CapitalizedComputerSoftwareNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_3971ed36-78fe-4379-846e-ff003bb742fe" xlink:to="loc_us-gaap_CapitalizedComputerSoftwareNet_9e197ab8-6208-4726-87cf-64d51067c4e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_41272848-9586-4b98-8ccd-7ea4a606d483" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FIFOInventoryAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_5171a71b-5bd6-4419-9e62-7210f3748a63" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryRawMaterialsNetOfReserves"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FIFOInventoryAmount_41272848-9586-4b98-8ccd-7ea4a606d483" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_5171a71b-5bd6-4419-9e62-7210f3748a63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_1dd6c9a5-dac0-4c32-9dd9-2990855e1a08" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryWorkInProcessNetOfReserves"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FIFOInventoryAmount_41272848-9586-4b98-8ccd-7ea4a606d483" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_1dd6c9a5-dac0-4c32-9dd9-2990855e1a08" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_e20c42e8-180e-4c47-abae-848d9a8afd2d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryFinishedGoodsNetOfReserves"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FIFOInventoryAmount_41272848-9586-4b98-8ccd-7ea4a606d483" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_e20c42e8-180e-4c47-abae-848d9a8afd2d" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
