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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2023 Workiva-->
<!--r:b6904e95-d795-48e3-808d-8d52dff3800a,g:f32759ac-3225-4820-882e-e794026d3ec6-->
<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-20231001.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_3d01534c-79cf-4da1-9cf0-680569e1fd6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_9815b9f2-d289-475d-a7d2-bee66945a8d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_3d01534c-79cf-4da1-9cf0-680569e1fd6c" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_9815b9f2-d289-475d-a7d2-bee66945a8d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_36d1de73-4b04-4669-81da-b84e13ebbeb1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_3d01534c-79cf-4da1-9cf0-680569e1fd6c" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_36d1de73-4b04-4669-81da-b84e13ebbeb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_21280a98-2dfc-47db-9005-fda0bd90b814" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_0e7718a0-ac94-4199-b006-1a4d7d9d36f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_21280a98-2dfc-47db-9005-fda0bd90b814" xlink:to="loc_us-gaap_OperatingIncomeLoss_0e7718a0-ac94-4199-b006-1a4d7d9d36f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_de92f05c-7f93-4f18-b3b0-39951cebe92d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_21280a98-2dfc-47db-9005-fda0bd90b814" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_de92f05c-7f93-4f18-b3b0-39951cebe92d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_4c386c38-16d1-46c6-b116-b6c6f1f2f947" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_21280a98-2dfc-47db-9005-fda0bd90b814" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_4c386c38-16d1-46c6-b116-b6c6f1f2f947" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_a7cc35c3-4e28-4e88-8386-78e7b4045d73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_794378d0-117f-4a98-a916-2213362be71c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_a7cc35c3-4e28-4e88-8386-78e7b4045d73" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_794378d0-117f-4a98-a916-2213362be71c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_1ed7feac-95e6-4d4c-bff2-420fbb80120e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_a7cc35c3-4e28-4e88-8386-78e7b4045d73" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_1ed7feac-95e6-4d4c-bff2-420fbb80120e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_2e80cc80-7625-418a-b895-c6af0e40eb0d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_7be7bbba-c8bc-48fb-9467-d0a62b7221c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2e80cc80-7625-418a-b895-c6af0e40eb0d" xlink:to="loc_us-gaap_GrossProfit_7be7bbba-c8bc-48fb-9467-d0a62b7221c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_b997c7d2-ef41-47c7-a550-2edcff95b317" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_2e80cc80-7625-418a-b895-c6af0e40eb0d" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_b997c7d2-ef41-47c7-a550-2edcff95b317" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_b546a22e-3c72-441f-b4d7-5f30dacfcc2b" xlink:href="hsy-20231001.xsd#hsy_RestructuringChargesBusinessRealignment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_2e80cc80-7625-418a-b895-c6af0e40eb0d" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_b546a22e-3c72-441f-b4d7-5f30dacfcc2b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="simple" xlink:href="hsy-20231001.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_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_40c6ed86-f7e0-429a-9ed6-abd37207f328" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_59da3afa-0345-4d03-a7c9-c1cdeda69de0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_40c6ed86-f7e0-429a-9ed6-abd37207f328" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_59da3afa-0345-4d03-a7c9-c1cdeda69de0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_ac673ffb-4592-4d76-83fc-461207b7f199" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_40c6ed86-f7e0-429a-9ed6-abd37207f328" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_ac673ffb-4592-4d76-83fc-461207b7f199" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_6ee1d4fe-6da4-47ed-b173-06b39e2ff37c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_9cdbd9c8-5526-47c0-a20b-216f1ad94dfb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_OtherComprehensiveIncomeLossBeforeTax_6ee1d4fe-6da4-47ed-b173-06b39e2ff37c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_9cdbd9c8-5526-47c0-a20b-216f1ad94dfb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_55f02216-6d7d-4ee6-a2cc-759eafad8601" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_6ee1d4fe-6da4-47ed-b173-06b39e2ff37c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_55f02216-6d7d-4ee6-a2cc-759eafad8601" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_4bf24258-ab78-4319-aeb6-57dc6b13ec83" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_6ee1d4fe-6da4-47ed-b173-06b39e2ff37c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_4bf24258-ab78-4319-aeb6-57dc6b13ec83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_7def9092-6d8e-4c08-9ed1-1b598145069e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_6ee1d4fe-6da4-47ed-b173-06b39e2ff37c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_7def9092-6d8e-4c08-9ed1-1b598145069e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_c797d156-fe4d-4279-80da-bf1fa5a4430a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_6ee1d4fe-6da4-47ed-b173-06b39e2ff37c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_c797d156-fe4d-4279-80da-bf1fa5a4430a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_8fdbe198-cc48-479f-a64c-09a84c513978" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_389c0027-ba8b-4bdc-b9eb-4258d1cd40f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_8fdbe198-cc48-479f-a64c-09a84c513978" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_389c0027-ba8b-4bdc-b9eb-4258d1cd40f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_da0111de-8735-43f8-9f99-f3a67cdf8656" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_8fdbe198-cc48-479f-a64c-09a84c513978" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_da0111de-8735-43f8-9f99-f3a67cdf8656" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_d37ee5e7-e0e2-44f6-9358-6eaf24cb4264" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_3832b441-53c7-4612-8e42-bb930c77b60d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_d37ee5e7-e0e2-44f6-9358-6eaf24cb4264" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_3832b441-53c7-4612-8e42-bb930c77b60d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_b91f21f7-0378-42ec-a551-392020c45ea6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_d37ee5e7-e0e2-44f6-9358-6eaf24cb4264" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_b91f21f7-0378-42ec-a551-392020c45ea6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_89b92d70-6e5a-48ed-baad-cfa479666d19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_d37ee5e7-e0e2-44f6-9358-6eaf24cb4264" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_89b92d70-6e5a-48ed-baad-cfa479666d19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_2cb7181f-0a1a-4b72-94fe-f836334b6a0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d37ee5e7-e0e2-44f6-9358-6eaf24cb4264" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_2cb7181f-0a1a-4b72-94fe-f836334b6a0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_aa2a5985-47f2-42dd-a9be-5b92ba8bb5fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_d37ee5e7-e0e2-44f6-9358-6eaf24cb4264" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_aa2a5985-47f2-42dd-a9be-5b92ba8bb5fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_2c7f0067-ec39-4395-8a53-c2077df24834" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_de3e0185-427b-40ae-9d02-6064cc62d288" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_2c7f0067-ec39-4395-8a53-c2077df24834" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_de3e0185-427b-40ae-9d02-6064cc62d288" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_b7d301c8-88f9-4f62-b60c-4cb55d3f0017" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_2c7f0067-ec39-4395-8a53-c2077df24834" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_b7d301c8-88f9-4f62-b60c-4cb55d3f0017" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_5507e2d0-f547-4d6a-aca0-60ca9b8bd8e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_d4086df3-61be-4c84-a405-f3dbb301fa82" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_5507e2d0-f547-4d6a-aca0-60ca9b8bd8e3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_d4086df3-61be-4c84-a405-f3dbb301fa82" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_af7c334f-c7bf-4285-9dc6-46cfc76273f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_5507e2d0-f547-4d6a-aca0-60ca9b8bd8e3" xlink:to="loc_us-gaap_NetIncomeLoss_af7c334f-c7bf-4285-9dc6-46cfc76273f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_b403b5f5-ce3a-420d-96cb-42d2336bb571" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_4e5f20d5-79e0-4a12-8522-fa92861ea94c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b403b5f5-ce3a-420d-96cb-42d2336bb571" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_4e5f20d5-79e0-4a12-8522-fa92861ea94c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_20e03955-691c-445c-939b-a553b5f31c78" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b403b5f5-ce3a-420d-96cb-42d2336bb571" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_20e03955-691c-445c-939b-a553b5f31c78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_5312b5f0-53ab-4ce0-b31a-5c8835e020f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_85e35a83-afa9-4821-b3b3-f342ca3847d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_5312b5f0-53ab-4ce0-b31a-5c8835e020f2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_85e35a83-afa9-4821-b3b3-f342ca3847d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_5c9d6113-6e57-4da5-a342-e369fdd4ef3d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_OtherComprehensiveIncomeLossTax_5312b5f0-53ab-4ce0-b31a-5c8835e020f2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_5c9d6113-6e57-4da5-a342-e369fdd4ef3d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_63d1e155-2f03-4dd6-9893-11708d03c0c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_5312b5f0-53ab-4ce0-b31a-5c8835e020f2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_63d1e155-2f03-4dd6-9893-11708d03c0c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_32c73bee-58d0-455e-bd49-9b431bdb1d8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_5312b5f0-53ab-4ce0-b31a-5c8835e020f2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_32c73bee-58d0-455e-bd49-9b431bdb1d8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_a4ddd65b-511a-4f3a-a5a9-6f1e882b7de4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_5312b5f0-53ab-4ce0-b31a-5c8835e020f2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_a4ddd65b-511a-4f3a-a5a9-6f1e882b7de4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_6ce1d1c6-b28c-44e9-93e0-e2833231918e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_499ad643-ed84-466c-95ff-ae05c9acd8f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_6ce1d1c6-b28c-44e9-93e0-e2833231918e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_499ad643-ed84-466c-95ff-ae05c9acd8f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_d9781b00-768a-4a47-8c95-90c6cb70b9fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_6ce1d1c6-b28c-44e9-93e0-e2833231918e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_d9781b00-768a-4a47-8c95-90c6cb70b9fb" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="hsy-20231001.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_LiabilitiesAndStockholdersEquity_5acfbaa9-3ab8-4fbd-80a2-050bf4ec70fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_49f99249-cebd-447b-94aa-3d2a491cffda" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_5acfbaa9-3ab8-4fbd-80a2-050bf4ec70fd" xlink:to="loc_us-gaap_Liabilities_49f99249-cebd-447b-94aa-3d2a491cffda" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_66409489-da1c-4103-b5ec-905f3edf0165" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_5acfbaa9-3ab8-4fbd-80a2-050bf4ec70fd" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_66409489-da1c-4103-b5ec-905f3edf0165" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_8c36fa52-9417-4744-8da9-bb19a63647eb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_f95d1128-769d-4c15-8bc2-31c9e1eac11b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_8c36fa52-9417-4744-8da9-bb19a63647eb" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_f95d1128-769d-4c15-8bc2-31c9e1eac11b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_8f2b7a89-eea6-4839-ba07-ca9a9fa50ae2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_8c36fa52-9417-4744-8da9-bb19a63647eb" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_8f2b7a89-eea6-4839-ba07-ca9a9fa50ae2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_54b6f164-6e35-412b-a11c-5f5da456700d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_8c36fa52-9417-4744-8da9-bb19a63647eb" xlink:to="loc_us-gaap_InventoryNet_54b6f164-6e35-412b-a11c-5f5da456700d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_18995a9a-fe99-4f19-93a4-2761ee0e77a0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_8c36fa52-9417-4744-8da9-bb19a63647eb" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_18995a9a-fe99-4f19-93a4-2761ee0e77a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_b1d54d08-f062-4df2-87b8-4fbd1fba9b45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_99e85b78-7a0e-4f0e-b433-169ec1ed85e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b1d54d08-f062-4df2-87b8-4fbd1fba9b45" xlink:to="loc_us-gaap_AssetsCurrent_99e85b78-7a0e-4f0e-b433-169ec1ed85e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_10082a93-281a-4ba3-8c37-8f742091234c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_b1d54d08-f062-4df2-87b8-4fbd1fba9b45" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_10082a93-281a-4ba3-8c37-8f742091234c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_8d90d21f-2a76-4b89-934d-681eba9c5135" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b1d54d08-f062-4df2-87b8-4fbd1fba9b45" xlink:to="loc_us-gaap_Goodwill_8d90d21f-2a76-4b89-934d-681eba9c5135" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_93243411-9935-46b7-94da-46179fbac5a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b1d54d08-f062-4df2-87b8-4fbd1fba9b45" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_93243411-9935-46b7-94da-46179fbac5a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_4717d660-2c8d-4841-ab9a-f36166c07479" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b1d54d08-f062-4df2-87b8-4fbd1fba9b45" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_4717d660-2c8d-4841-ab9a-f36166c07479" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_05f58bb7-fb28-49cd-a99b-13705bea251a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b1d54d08-f062-4df2-87b8-4fbd1fba9b45" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_05f58bb7-fb28-49cd-a99b-13705bea251a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_3affaa8d-5efb-45ea-87ca-89dcd32eb0b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_38058a66-e89b-422b-9cf5-48973dd4fc6e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_3affaa8d-5efb-45ea-87ca-89dcd32eb0b5" xlink:to="loc_us-gaap_AdditionalPaidInCapital_38058a66-e89b-422b-9cf5-48973dd4fc6e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_2d5c7f95-5a34-4f29-90ec-a3f7e393cc37" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_3affaa8d-5efb-45ea-87ca-89dcd32eb0b5" xlink:to="loc_us-gaap_CommonStockValue_2d5c7f95-5a34-4f29-90ec-a3f7e393cc37" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonValue_298fa3c7-eee7-45ff-b07e-1c6d0163303a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonValue"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_3affaa8d-5efb-45ea-87ca-89dcd32eb0b5" xlink:to="loc_us-gaap_TreasuryStockCommonValue_298fa3c7-eee7-45ff-b07e-1c6d0163303a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_6e992ede-0ea6-49a8-8a27-2cc96d8e9697" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_3affaa8d-5efb-45ea-87ca-89dcd32eb0b5" xlink:to="loc_us-gaap_PreferredStockValue_6e992ede-0ea6-49a8-8a27-2cc96d8e9697" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_9e14e5b6-e17a-4f72-be0e-ff5e32c30f19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_3affaa8d-5efb-45ea-87ca-89dcd32eb0b5" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_9e14e5b6-e17a-4f72-be0e-ff5e32c30f19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_10a15199-7592-4385-9062-db0a851f0be3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_3affaa8d-5efb-45ea-87ca-89dcd32eb0b5" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_10a15199-7592-4385-9062-db0a851f0be3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_cbfa82ca-ea4b-4994-926d-30d1b2fe59bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_18cfd6aa-4598-4805-9a35-7a3f9690a853" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_cbfa82ca-ea4b-4994-926d-30d1b2fe59bd" xlink:to="loc_us-gaap_AccountsPayableCurrent_18cfd6aa-4598-4805-9a35-7a3f9690a853" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_9886da89-8003-4302-8b30-4bba28b9600b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_cbfa82ca-ea4b-4994-926d-30d1b2fe59bd" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_9886da89-8003-4302-8b30-4bba28b9600b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_35e5b8b0-23c4-479d-a560-62a1ddeae9d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_cbfa82ca-ea4b-4994-926d-30d1b2fe59bd" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_35e5b8b0-23c4-479d-a560-62a1ddeae9d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_5a5593fe-e505-497f-9667-44e05ef1b66e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_cbfa82ca-ea4b-4994-926d-30d1b2fe59bd" xlink:to="loc_us-gaap_ShortTermBorrowings_5a5593fe-e505-497f-9667-44e05ef1b66e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_7a2d7315-4f05-4e68-8941-b32f1cb596c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_cbfa82ca-ea4b-4994-926d-30d1b2fe59bd" xlink:to="loc_us-gaap_LongTermDebtCurrent_7a2d7315-4f05-4e68-8941-b32f1cb596c7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_237d68d4-a6f5-4122-af06-d497e0bd5e92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_df6a601f-38af-4049-b787-79e1c9391cf4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_237d68d4-a6f5-4122-af06-d497e0bd5e92" xlink:to="loc_us-gaap_LiabilitiesCurrent_df6a601f-38af-4049-b787-79e1c9391cf4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_4c553f15-b6fa-4259-8348-69b29da95b36" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_237d68d4-a6f5-4122-af06-d497e0bd5e92" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_4c553f15-b6fa-4259-8348-69b29da95b36" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_e8a0f046-86ba-4d15-9625-a4caef4f1d2d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_237d68d4-a6f5-4122-af06-d497e0bd5e92" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_e8a0f046-86ba-4d15-9625-a4caef4f1d2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_01914527-7886-4dbf-aefe-0b74e50b3161" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_237d68d4-a6f5-4122-af06-d497e0bd5e92" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_01914527-7886-4dbf-aefe-0b74e50b3161" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="hsy-20231001.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_NetCashProvidedByUsedInInvestingActivities_890cbc26-16f3-48d9-862c-79dd24cd9ab1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_beb7baf8-83e5-455c-bfc1-bef1e1b6b55d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_890cbc26-16f3-48d9-862c-79dd24cd9ab1" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_beb7baf8-83e5-455c-bfc1-bef1e1b6b55d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_3bf40e42-05af-4b92-b469-b3a092c399b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForProceedsFromOtherInvestingActivities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_890cbc26-16f3-48d9-862c-79dd24cd9ab1" xlink:to="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_3bf40e42-05af-4b92-b469-b3a092c399b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_c5885de9-e4f0-42fc-985e-38eb4d9acde8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireEquityMethodInvestments"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_890cbc26-16f3-48d9-862c-79dd24cd9ab1" xlink:to="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_c5885de9-e4f0-42fc-985e-38eb4d9acde8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_5ff2cc43-6336-42bc-9403-82c42adcb9ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_890cbc26-16f3-48d9-862c-79dd24cd9ab1" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_5ff2cc43-6336-42bc-9403-82c42adcb9ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_59b67a41-3b0a-4114-a3eb-eb2dcce3da97" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_0c802358-6641-48a3-8e21-0b45438e2c72" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_59b67a41-3b0a-4114-a3eb-eb2dcce3da97" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_0c802358-6641-48a3-8e21-0b45438e2c72" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_3803300a-5ca5-4a50-905e-d898338f264f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_59b67a41-3b0a-4114-a3eb-eb2dcce3da97" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_3803300a-5ca5-4a50-905e-d898338f264f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_2be24890-fa73-4a5a-8de2-6db61870effc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_59b67a41-3b0a-4114-a3eb-eb2dcce3da97" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_2be24890-fa73-4a5a-8de2-6db61870effc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_da884d87-2866-4808-8a44-c00a96f0cf70" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_59b67a41-3b0a-4114-a3eb-eb2dcce3da97" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_da884d87-2866-4808-8a44-c00a96f0cf70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_4ee8330f-f878-47f0-a0a0-83e86de5b837" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_NetIncomeLoss_4ee8330f-f878-47f0-a0a0-83e86de5b837" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_7a21aa08-3a1d-463f-aacf-9e06a3423fd6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_7a21aa08-3a1d-463f-aacf-9e06a3423fd6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_3d0b9e92-c94c-4051-877c-44bc570c9be2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_ShareBasedCompensation_3d0b9e92-c94c-4051-877c-44bc570c9be2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_0acd6036-8321-4010-90e4-c415c95d9964" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_0acd6036-8321-4010-90e4-c415c95d9964" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_3f458718-5000-4977-b154-5427094f5a21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_3f458718-5000-4977-b154-5427094f5a21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_354dad22-6cfd-44e6-b5dd-f1b437b56a76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_354dad22-6cfd-44e6-b5dd-f1b437b56a76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_cf7b54ff-ecb0-4942-ab16-d26e983e0708" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_cf7b54ff-ecb0-4942-ab16-d26e983e0708" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_995e2025-9f60-40fb-ad0b-796c733b7602" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_995e2025-9f60-40fb-ad0b-796c733b7602" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_4afc823b-8e71-4df3-befc-5454e2524f96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_4afc823b-8e71-4df3-befc-5454e2524f96" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_6861dfe8-1af9-47ac-81d6-3253f7d5b79d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_6861dfe8-1af9-47ac-81d6-3253f7d5b79d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_830836b3-e4ed-4088-822f-977637b4d140" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_830836b3-e4ed-4088-822f-977637b4d140" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_cbb558e5-18bb-484b-b251-f4ed02ee3587" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_cbb558e5-18bb-484b-b251-f4ed02ee3587" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_4d26524d-a217-496d-b920-79c84acd05fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_10dd9419-6660-4ae2-a8f2-447c7d09f4d1" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_4d26524d-a217-496d-b920-79c84acd05fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_63c981c9-99d5-4a68-8b44-8966decc1328" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_63c981c9-99d5-4a68-8b44-8966decc1328" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_7c7534f1-e3a7-4f95-be7c-be2395a7bce9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_7c7534f1-e3a7-4f95-be7c-be2395a7bce9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_841d682c-587b-4596-b2bd-be2acb6bcf33" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_841d682c-587b-4596-b2bd-be2acb6bcf33" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_2ad42755-dfd8-4a9c-a758-5b74b4c3c872" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_2ad42755-dfd8-4a9c-a758-5b74b4c3c872" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_263f69ee-4496-4bc3-9f79-42c002035dd7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_263f69ee-4496-4bc3-9f79-42c002035dd7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_5f7b6748-4ec5-4207-9f82-b203cb2ff357" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromRepaymentsOfShortTermDebt"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:to="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_5f7b6748-4ec5-4207-9f82-b203cb2ff357" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_b4a8a73e-6062-4677-b0ca-196c731c8062" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfLongTermDebt"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_46249209-d4ca-4625-a8e3-d8eeef312fe2" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_b4a8a73e-6062-4677-b0ca-196c731c8062" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20231001.xsd#BUSINESSACQUISITIONSPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_6c8c437a-0ee0-4935-8c91-7ca2722774c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_6c8c437a-0ee0-4935-8c91-7ca2722774c2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_f2ec3432-be01-413a-afdf-1b4bddbddb54" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_Goodwill_f2ec3432-be01-413a-afdf-1b4bddbddb54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_35c07826-188d-4bc0-92a0-895d682f086f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_35c07826-188d-4bc0-92a0-895d682f086f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_8fb010ef-9d5d-430f-bcb2-d90acd7c18fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_8fb010ef-9d5d-430f-bcb2-d90acd7c18fb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_c6b27439-7876-4adb-acee-1c649f0385d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_c6b27439-7876-4adb-acee-1c649f0385d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_f6b3f465-1c0e-4480-86c3-90e05d0bada0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_f6b3f465-1c0e-4480-86c3-90e05d0bada0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_494f48ec-9a74-4dd4-838e-06db7bac436f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_494f48ec-9a74-4dd4-838e-06db7bac436f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_ae8bed60-3ae3-47bf-a768-f6a23439a8a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_ae8bed60-3ae3-47bf-a768-f6a23439a8a9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_31bb2776-dea7-4317-8a87-5191c13f56bf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4e38064a-0247-4e08-b857-a2821f2a7b6b" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_31bb2776-dea7-4317-8a87-5191c13f56bf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="simple" xlink:href="hsy-20231001.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_LongTermDebt_e932b1bb-01eb-49ae-9cfa-64904f2090e1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_4a6d1b75-a371-496b-98fb-737c8dfc7ebd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_e932b1bb-01eb-49ae-9cfa-64904f2090e1" xlink:to="loc_us-gaap_LongTermDebtCurrent_4a6d1b75-a371-496b-98fb-737c8dfc7ebd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_2f6cb329-30ec-4ead-bb65-f5a70c3104d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_e932b1bb-01eb-49ae-9cfa-64904f2090e1" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_2f6cb329-30ec-4ead-bb65-f5a70c3104d8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20231001.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_InterestIncomeExpenseNonoperatingNet_7b141bc0-cf8f-4fe7-a1b1-dcca44d4cbd6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_b4106c60-9558-4fe5-aa9e-bdb88b9f9670" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_7b141bc0-cf8f-4fe7-a1b1-dcca44d4cbd6" xlink:to="loc_us-gaap_InterestExpense_b4106c60-9558-4fe5-aa9e-bdb88b9f9670" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_96f88bcb-02b5-4e68-a562-ab7050696fd7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_7b141bc0-cf8f-4fe7-a1b1-dcca44d4cbd6" xlink:to="loc_us-gaap_InvestmentIncomeInterest_96f88bcb-02b5-4e68-a562-ab7050696fd7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_a2314d54-db6c-4d0f-95fc-1b541d096d21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebt_f69f28d2-e941-4d6d-a824-c70eb1593bf8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_a2314d54-db6c-4d0f-95fc-1b541d096d21" xlink:to="loc_us-gaap_InterestExpenseDebt_f69f28d2-e941-4d6d-a824-c70eb1593bf8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestCostsCapitalizedAdjustment_a7699052-b322-41d7-8cc5-d63c928bc271" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestCostsCapitalizedAdjustment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_a2314d54-db6c-4d0f-95fc-1b541d096d21" xlink:to="loc_us-gaap_InterestCostsCapitalizedAdjustment_a7699052-b322-41d7-8cc5-d63c928bc271" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFCOMPONENETSOFLEASEEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20231001.xsd#LEASESSCHEDULEOFCOMPONENETSOFLEASEEXPENSEDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSCHEDULEOFCOMPONENETSOFLEASEEXPENSEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_6734da64-99dd-43a7-b337-67f140cebb12" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_ab490190-be53-4bc8-830e-6846f4c83637" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_6734da64-99dd-43a7-b337-67f140cebb12" xlink:to="loc_us-gaap_OperatingLeaseCost_ab490190-be53-4bc8-830e-6846f4c83637" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_76a11eab-f72c-4ca1-ae87-90f5a42766c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_6734da64-99dd-43a7-b337-67f140cebb12" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_76a11eab-f72c-4ca1-ae87-90f5a42766c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseInterestExpense_fab17015-6da2-4a01-864e-487851d65daf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_6734da64-99dd-43a7-b337-67f140cebb12" xlink:to="loc_us-gaap_FinanceLeaseInterestExpense_fab17015-6da2-4a01-864e-487851d65daf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="simple" xlink:href="hsy-20231001.xsd#LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseLiability_d37ae964-8334-402d-af27-c7fb14c2b3e8" xlink:href="hsy-20231001.xsd#hsy_LeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_79d372de-3e36-44d0-9f3c-ff8cce79514b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d37ae964-8334-402d-af27-c7fb14c2b3e8" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_79d372de-3e36-44d0-9f3c-ff8cce79514b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_99ce91bb-a8bc-4746-82a3-8a1ad37d7287" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d37ae964-8334-402d-af27-c7fb14c2b3e8" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_99ce91bb-a8bc-4746-82a3-8a1ad37d7287" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_6ef38e04-c9b5-4714-8448-8606b8959b08" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d37ae964-8334-402d-af27-c7fb14c2b3e8" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_6ef38e04-c9b5-4714-8448-8606b8959b08" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_6948a1a7-49b5-4070-b531-f33920215f0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d37ae964-8334-402d-af27-c7fb14c2b3e8" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_6948a1a7-49b5-4070-b531-f33920215f0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseRightofUseAsset_e3c887d0-dbe3-4c1a-b092-4d8715a1835c" xlink:href="hsy-20231001.xsd#hsy_LeaseRightofUseAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_6011aa72-2be6-4d73-a12b-0293931c395d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_e3c887d0-dbe3-4c1a-b092-4d8715a1835c" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_6011aa72-2be6-4d73-a12b-0293931c395d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_e6616fe3-16ce-4b39-90d5-c22478d910a7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_e3c887d0-dbe3-4c1a-b092-4d8715a1835c" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_e6616fe3-16ce-4b39-90d5-c22478d910a7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="simple" xlink:href="hsy-20231001.xsd#LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_79204856-e8ac-4738-a091-21c6a8d0f7d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear_3e40e2d1-da20-4d31-b6f9-9e9afa270b4b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_79204856-e8ac-4738-a091-21c6a8d0f7d3" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear_3e40e2d1-da20-4d31-b6f9-9e9afa270b4b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_9eb7a729-637c-44e8-8519-602b75160105" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_79204856-e8ac-4738-a091-21c6a8d0f7d3" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_9eb7a729-637c-44e8-8519-602b75160105" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_7fb598c9-5525-45c5-bbe6-ea35bf1a6140" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_79204856-e8ac-4738-a091-21c6a8d0f7d3" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_7fb598c9-5525-45c5-bbe6-ea35bf1a6140" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_9554598f-4648-41dd-a594-06054e52a486" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_79204856-e8ac-4738-a091-21c6a8d0f7d3" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_9554598f-4648-41dd-a594-06054e52a486" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_7f470c97-b153-4a09-ad29-dbc77b70cf58" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_79204856-e8ac-4738-a091-21c6a8d0f7d3" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_7f470c97-b153-4a09-ad29-dbc77b70cf58" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_FinancingLeaseLiabilityToBePaidAfterYearFour_b6087330-4553-45a3-9cf8-cf644be298e3" xlink:href="hsy-20231001.xsd#hsy_FinancingLeaseLiabilityToBePaidAfterYearFour"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_79204856-e8ac-4738-a091-21c6a8d0f7d3" xlink:to="loc_hsy_FinancingLeaseLiabilityToBePaidAfterYearFour_b6087330-4553-45a3-9cf8-cf644be298e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_86aad05e-4398-4973-9af3-a3dff46e42d2" xlink:href="hsy-20231001.xsd#hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_d1d6f424-5ec1-4755-9422-786af96459d1" xlink:href="hsy-20231001.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_86aad05e-4398-4973-9af3-a3dff46e42d2" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_d1d6f424-5ec1-4755-9422-786af96459d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_66e1c2e0-e9fd-4533-bb5f-cdc7025bd53e" xlink:href="hsy-20231001.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_86aad05e-4398-4973-9af3-a3dff46e42d2" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_66e1c2e0-e9fd-4533-bb5f-cdc7025bd53e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear_46495371-aa21-4554-8fb2-e8da8e37c751" xlink:href="hsy-20231001.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_86aad05e-4398-4973-9af3-a3dff46e42d2" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear_46495371-aa21-4554-8fb2-e8da8e37c751" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour_e9298faf-ba13-4388-bb78-41a88b1b2be8" xlink:href="hsy-20231001.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_86aad05e-4398-4973-9af3-a3dff46e42d2" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour_e9298faf-ba13-4388-bb78-41a88b1b2be8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_78a4e4ee-1167-49d2-8ce3-924a78eda172" xlink:href="hsy-20231001.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_86aad05e-4398-4973-9af3-a3dff46e42d2" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_78a4e4ee-1167-49d2-8ce3-924a78eda172" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_b340a391-df3c-4a25-9f25-f0c1805ccc39" xlink:href="hsy-20231001.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_86aad05e-4398-4973-9af3-a3dff46e42d2" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_b340a391-df3c-4a25-9f25-f0c1805ccc39" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_e3b874bf-da02-4836-8736-3e18b8b8f392" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_9f1d3400-b002-4a18-9cd5-6b0373c08842" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_e3b874bf-da02-4836-8736-3e18b8b8f392" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_9f1d3400-b002-4a18-9cd5-6b0373c08842" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_591cc620-2a66-4ea4-90d7-1154ddfa54d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_e3b874bf-da02-4836-8736-3e18b8b8f392" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_591cc620-2a66-4ea4-90d7-1154ddfa54d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_98ff9ab3-9ef9-4e33-bf55-92deb0e50627" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_e3b874bf-da02-4836-8736-3e18b8b8f392" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_98ff9ab3-9ef9-4e33-bf55-92deb0e50627" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_f5ec9ede-76a9-4045-8990-56a90633ab0f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_e3b874bf-da02-4836-8736-3e18b8b8f392" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_f5ec9ede-76a9-4045-8990-56a90633ab0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_2be8a045-ded9-4b47-8ec9-6176b4577e3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_e3b874bf-da02-4836-8736-3e18b8b8f392" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_2be8a045-ded9-4b47-8ec9-6176b4577e3f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_1d7ff34d-fa9f-4216-9448-360598dfdfda" xlink:href="hsy-20231001.xsd#hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_e3b874bf-da02-4836-8736-3e18b8b8f392" xlink:to="loc_hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_1d7ff34d-fa9f-4216-9448-360598dfdfda" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="simple" xlink:href="hsy-20231001.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_DefinedBenefitPlanNetPeriodicBenefitCost_efebcdf7-9b54-4746-8687-77eade7bcb72" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_25344876-dd53-41de-b476-bccc8aaf03b1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efebcdf7-9b54-4746-8687-77eade7bcb72" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_25344876-dd53-41de-b476-bccc8aaf03b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_a446e737-f7eb-4722-9568-c536b1df9569" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efebcdf7-9b54-4746-8687-77eade7bcb72" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_a446e737-f7eb-4722-9568-c536b1df9569" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_857b11a4-15f5-4f04-ab59-66c612ab6807" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efebcdf7-9b54-4746-8687-77eade7bcb72" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_857b11a4-15f5-4f04-ab59-66c612ab6807" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_3bd62a17-df2c-4069-bfa1-c1d198cf072e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efebcdf7-9b54-4746-8687-77eade7bcb72" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_3bd62a17-df2c-4069-bfa1-c1d198cf072e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_89989a56-290b-49a2-930f-b5a25ece9883" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efebcdf7-9b54-4746-8687-77eade7bcb72" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_89989a56-290b-49a2-930f-b5a25ece9883" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_b3604c16-9f01-4e5a-9114-80c2c4b7cb70" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efebcdf7-9b54-4746-8687-77eade7bcb72" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_b3604c16-9f01-4e5a-9114-80c2c4b7cb70" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20231001.xsd#TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExcludingExciseTax_67afe4f4-deda-400b-8d55-2a5ac09dbd8c" xlink:href="hsy-20231001.xsd#hsy_TreasuryStockSharesExcludingExciseTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_4ebefa6c-2f96-4b22-954c-d9bea9e2994a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_67afe4f4-deda-400b-8d55-2a5ac09dbd8c" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_4ebefa6c-2f96-4b22-954c-d9bea9e2994a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_c72dc59a-87b2-4354-ad97-2185f4b382c0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_67afe4f4-deda-400b-8d55-2a5ac09dbd8c" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_c72dc59a-87b2-4354-ad97-2185f4b382c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockValueExcludingExciseTax_ebbce52a-f2a6-4f80-badf-c3dd097b60ec" xlink:href="hsy-20231001.xsd#hsy_TreasuryStockValueExcludingExciseTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodValue_cbd4a0ac-92fc-4ad0-a525-0d7d6cefb9e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockRepurchasedDuringPeriodValue"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockValueExcludingExciseTax_ebbce52a-f2a6-4f80-badf-c3dd097b60ec" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_cbd4a0ac-92fc-4ad0-a525-0d7d6cefb9e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_3e772636-8a1f-4171-af2e-75d76090e4f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockValueExcludingExciseTax_ebbce52a-f2a6-4f80-badf-c3dd097b60ec" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_3e772636-8a1f-4171-af2e-75d76090e4f3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails_1" xlink:type="simple" xlink:href="hsy-20231001.xsd#TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails_1"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExcludingExciseTax_61c24ad4-e323-44be-b229-4e296acd2bb6" xlink:href="hsy-20231001.xsd#hsy_TreasuryStockSharesExcludingExciseTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExciseTax_521910b2-4efe-4418-ba61-6ac048f591e7" xlink:href="hsy-20231001.xsd#hsy_TreasuryStockSharesExciseTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_61c24ad4-e323-44be-b229-4e296acd2bb6" xlink:to="loc_hsy_TreasuryStockSharesExciseTax_521910b2-4efe-4418-ba61-6ac048f591e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesNetChangeDuringPeriod_242e03b8-4807-425d-a45a-255cecafdd56" xlink:href="hsy-20231001.xsd#hsy_TreasuryStockSharesNetChangeDuringPeriod"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_61c24ad4-e323-44be-b229-4e296acd2bb6" xlink:to="loc_hsy_TreasuryStockSharesNetChangeDuringPeriod_242e03b8-4807-425d-a45a-255cecafdd56" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="simple" xlink:href="hsy-20231001.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_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_c916c742-ed33-4c35-a45c-c24f683949e1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_0c457bdd-d5e2-4998-9915-514547e47a34" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_c916c742-ed33-4c35-a45c-c24f683949e1" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_0c457bdd-d5e2-4998-9915-514547e47a34" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_20725bba-ba08-496a-b232-0c09e0653e9c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_c916c742-ed33-4c35-a45c-c24f683949e1" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_20725bba-ba08-496a-b232-0c09e0653e9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DistributedEarnings_155aa7bb-c4f3-4e71-a8f0-186f40235fbc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DistributedEarnings"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_c916c742-ed33-4c35-a45c-c24f683949e1" xlink:to="loc_us-gaap_DistributedEarnings_155aa7bb-c4f3-4e71-a8f0-186f40235fbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_5917ab30-ae69-4b28-b808-e5d6df331839" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_8157005c-b394-45c4-b8a4-11f00985b0af" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_5917ab30-ae69-4b28-b808-e5d6df331839" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_8157005c-b394-45c4-b8a4-11f00985b0af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Dividends_417b4000-143e-4843-a6ec-f16fb5031d68" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Dividends"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_5917ab30-ae69-4b28-b808-e5d6df331839" xlink:to="loc_us-gaap_Dividends_417b4000-143e-4843-a6ec-f16fb5031d68" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/OTHERINCOMEEXPENSENETSCHEDULEOFOTHERINCOMEANDEXPENSENETDetails" xlink:type="simple" xlink:href="hsy-20231001.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_9ebcdaf4-d5c9-4b70-bd3e-39b4c1599a83" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_5b1b295d-92e2-4b5d-8c9d-7625a493ce3e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_9ebcdaf4-d5c9-4b70-bd3e-39b4c1599a83" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_5b1b295d-92e2-4b5d-8c9d-7625a493ce3e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DefinedBenefitPlanNonServiceCost_42c8d77a-eae1-4b48-be0b-b26011ab2bc3" xlink:href="hsy-20231001.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_9ebcdaf4-d5c9-4b70-bd3e-39b4c1599a83" xlink:to="loc_hsy_DefinedBenefitPlanNonServiceCost_42c8d77a-eae1-4b48-be0b-b26011ab2bc3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherNonoperatingGainLoss_9023dc9f-5a8f-4a79-b0cd-07d9f026231f" xlink:href="hsy-20231001.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_9ebcdaf4-d5c9-4b70-bd3e-39b4c1599a83" xlink:to="loc_hsy_OtherNonoperatingGainLoss_9023dc9f-5a8f-4a79-b0cd-07d9f026231f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SUPPLEMENTALBALANCESHEETINFORMATIONSCHEDULEOFSUPPLEMENTALBALANCESHEETINFORMATIONDetails" xlink:type="simple" xlink:href="hsy-20231001.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_bfacd613-6f52-4d76-986a-b8cbd69a2f32" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_fba1ead4-8a66-45cb-8be8-d69f0663f610" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_bfacd613-6f52-4d76-986a-b8cbd69a2f32" xlink:to="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_fba1ead4-8a66-45cb-8be8-d69f0663f610" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_7bb1c300-47e6-4b0d-8dae-578fa389d170" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_bfacd613-6f52-4d76-986a-b8cbd69a2f32" xlink:to="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_7bb1c300-47e6-4b0d-8dae-578fa389d170" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_725ab87b-05d4-4178-8504-66330a05eeeb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_bfacd613-6f52-4d76-986a-b8cbd69a2f32" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_725ab87b-05d4-4178-8504-66330a05eeeb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_274db746-5f14-4d10-be1d-2f64f75497aa" xlink:href="hsy-20231001.xsd#hsy_OtherMiscellaneousLiabilitiesNonCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_bfacd613-6f52-4d76-986a-b8cbd69a2f32" xlink:to="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_274db746-5f14-4d10-be1d-2f64f75497aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_d02e8fb9-cdc2-443a-b09b-3679d7aa5169" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Land_e481b421-e0db-4cda-9a81-461584a1b283" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d02e8fb9-cdc2-443a-b09b-3679d7aa5169" xlink:to="loc_us-gaap_Land_e481b421-e0db-4cda-9a81-461584a1b283" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingsAndImprovementsGross_76a2a167-e41a-4071-9b50-52531dbfc03e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d02e8fb9-cdc2-443a-b09b-3679d7aa5169" xlink:to="loc_us-gaap_BuildingsAndImprovementsGross_76a2a167-e41a-4071-9b50-52531dbfc03e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentGross_c0406e23-be16-49f9-9ff1-04a59f808259" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d02e8fb9-cdc2-443a-b09b-3679d7aa5169" xlink:to="loc_us-gaap_MachineryAndEquipmentGross_c0406e23-be16-49f9-9ff1-04a59f808259" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressGross_afd294da-26ba-4e49-950c-8463b7b1eb5e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_d02e8fb9-cdc2-443a-b09b-3679d7aa5169" xlink:to="loc_us-gaap_ConstructionInProgressGross_afd294da-26ba-4e49-950c-8463b7b1eb5e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_12ec8797-37a4-4bdf-8c92-2c67ee3a3580" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableTradeCurrent_3b3af6b0-c05f-4d08-8d83-2e42f70dbcfd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableTradeCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_12ec8797-37a4-4bdf-8c92-2c67ee3a3580" xlink:to="loc_us-gaap_AccountsPayableTradeCurrent_3b3af6b0-c05f-4d08-8d83-2e42f70dbcfd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplierFinanceProgramObligationCurrent_53acef9e-9293-4d88-bd14-fb95fa1a1a53" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SupplierFinanceProgramObligationCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_12ec8797-37a4-4bdf-8c92-2c67ee3a3580" xlink:to="loc_us-gaap_SupplierFinanceProgramObligationCurrent_53acef9e-9293-4d88-bd14-fb95fa1a1a53" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableOtherCurrent_f3b9e9a8-1115-4f73-bf2e-e8be87d90ea0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableOtherCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_12ec8797-37a4-4bdf-8c92-2c67ee3a3580" xlink:to="loc_us-gaap_AccountsPayableOtherCurrent_f3b9e9a8-1115-4f73-bf2e-e8be87d90ea0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_a120cb1b-014a-4552-be70-26f9878b4cf4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_60630206-7109-4333-bbe8-47bc8c9bff77" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_a120cb1b-014a-4552-be70-26f9878b4cf4" xlink:to="loc_us-gaap_FIFOInventoryAmount_60630206-7109-4333-bbe8-47bc8c9bff77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryLIFOReserve_ba6934e2-fa5b-4c9a-b8f1-717e7767a94b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_a120cb1b-014a-4552-be70-26f9878b4cf4" xlink:to="loc_us-gaap_InventoryLIFOReserve_ba6934e2-fa5b-4c9a-b8f1-717e7767a94b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_9f05e80e-aec2-462f-90d4-41a280c2948b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FIFOInventoryAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_0f0e3017-23a9-4ccb-8bb5-e354fb0c162f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_9f05e80e-aec2-462f-90d4-41a280c2948b" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_0f0e3017-23a9-4ccb-8bb5-e354fb0c162f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_3af5d24b-12bb-41f7-9d1d-5dc432115824" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_9f05e80e-aec2-462f-90d4-41a280c2948b" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_3af5d24b-12bb-41f7-9d1d-5dc432115824" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_61b174ca-9e3f-402b-a9db-f966ce7f6c82" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_9f05e80e-aec2-462f-90d4-41a280c2948b" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_61b174ca-9e3f-402b-a9db-f966ce7f6c82" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_84b373b7-03ca-4e81-bd61-56d129eea3bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousAssetsNonCurrent_a63d670d-2d96-4602-912a-19c88fea1a79" xlink:href="hsy-20231001.xsd#hsy_OtherMiscellaneousAssetsNonCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_84b373b7-03ca-4e81-bd61-56d129eea3bc" xlink:to="loc_hsy_OtherMiscellaneousAssetsNonCurrent_a63d670d-2d96-4602-912a-19c88fea1a79" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_73581a61-7126-4d48-bb8a-8aa4de1e4024" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_84b373b7-03ca-4e81-bd61-56d129eea3bc" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_73581a61-7126-4d48-bb8a-8aa4de1e4024" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_143676f6-c5c5-4466-9503-6dd929a8ecf1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_84b373b7-03ca-4e81-bd61-56d129eea3bc" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_143676f6-c5c5-4466-9503-6dd929a8ecf1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_e8590c00-eb91-4a71-bd01-2e649da5dc3c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_84b373b7-03ca-4e81-bd61-56d129eea3bc" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_e8590c00-eb91-4a71-bd01-2e649da5dc3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalizedComputerSoftwareNet_1fce8ab5-b7d1-4bf4-90e6-b4f1af0f7358" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_84b373b7-03ca-4e81-bd61-56d129eea3bc" xlink:to="loc_us-gaap_CapitalizedComputerSoftwareNet_1fce8ab5-b7d1-4bf4-90e6-b4f1af0f7358" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_0901a384-cf31-43c3-9a13-3e5dd502096d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_e46352de-bffd-4ac1-9470-ec98911aeca9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_PropertyPlantAndEquipmentNet_0901a384-cf31-43c3-9a13-3e5dd502096d" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_e46352de-bffd-4ac1-9470-ec98911aeca9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_b4f9ba61-8a66-4c23-a58d-fed5a8358ce6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_0901a384-cf31-43c3-9a13-3e5dd502096d" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_b4f9ba61-8a66-4c23-a58d-fed5a8358ce6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_905b41eb-afbb-4c67-9b80-7388091f3bae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_0a295e4b-4fb3-439d-a1a3-89013f4e7888" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_905b41eb-afbb-4c67-9b80-7388091f3bae" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_0a295e4b-4fb3-439d-a1a3-89013f4e7888" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_9bb70131-6841-4f5d-bac7-a128153cca45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_905b41eb-afbb-4c67-9b80-7388091f3bae" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_9bb70131-6841-4f5d-bac7-a128153cca45" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_4bb80d0c-3650-4153-b125-0a449d601804" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_905b41eb-afbb-4c67-9b80-7388091f3bae" xlink:to="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_4bb80d0c-3650-4153-b125-0a449d601804" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PrepaidExpensesandOther_50ddd9f7-eb91-4e50-80a2-0ebc1439dca6" xlink:href="hsy-20231001.xsd#hsy_PrepaidExpensesandOther"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_aa5babe0-27ec-4b78-955f-8638e9823f26" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_PrepaidExpensesandOther_50ddd9f7-eb91-4e50-80a2-0ebc1439dca6" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_aa5babe0-27ec-4b78-955f-8638e9823f26" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_4169b3d1-ac34-4759-ae2c-7061a26a1373" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_PrepaidExpensesandOther_50ddd9f7-eb91-4e50-80a2-0ebc1439dca6" xlink:to="loc_us-gaap_OtherAssetsCurrent_4169b3d1-ac34-4759-ae2c-7061a26a1373" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_fba4c86f-e8a5-4db3-970c-fcbfdb02fcd4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_cf3ef0f5-5270-49e5-bf4a-ca93a83f0426" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_fba4c86f-e8a5-4db3-970c-fcbfdb02fcd4" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_cf3ef0f5-5270-49e5-bf4a-ca93a83f0426" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedMarketingCostsCurrent_ccd76b55-cc51-4047-9bdd-19f5a7703a14" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_fba4c86f-e8a5-4db3-970c-fcbfdb02fcd4" xlink:to="loc_us-gaap_AccruedMarketingCostsCurrent_ccd76b55-cc51-4047-9bdd-19f5a7703a14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_5a63dcba-0d39-4ddf-8e3a-f9419a14b706" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_fba4c86f-e8a5-4db3-970c-fcbfdb02fcd4" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_5a63dcba-0d39-4ddf-8e3a-f9419a14b706" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_ac70ab61-8157-48d5-b49f-da28dc329f73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_fba4c86f-e8a5-4db3-970c-fcbfdb02fcd4" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_ac70ab61-8157-48d5-b49f-da28dc329f73" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
