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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:5e66cb51-322f-4522-91ee-b19451f18009,g:50507add-5e29-48fc-a8af-3c4561c4a596-->
<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-20211231.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_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_bd365dac-eb97-473c-bbe7-28501cc3af84" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_3054600e-676d-44ba-855e-edf8f5c49585" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_bd365dac-eb97-473c-bbe7-28501cc3af84" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_3054600e-676d-44ba-855e-edf8f5c49585" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_610a0258-3004-4fb8-a5f0-8d87d27a84bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_bd365dac-eb97-473c-bbe7-28501cc3af84" xlink:to="loc_us-gaap_OperatingIncomeLoss_610a0258-3004-4fb8-a5f0-8d87d27a84bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_233eb68c-2a38-4830-9c25-876c7e5b4872" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_bd365dac-eb97-473c-bbe7-28501cc3af84" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_233eb68c-2a38-4830-9c25-876c7e5b4872" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_a709c27f-e843-4a57-b5a8-8fdc2a42cfca" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_7151845e-d750-443d-8e14-704ba585cb23" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_a709c27f-e843-4a57-b5a8-8fdc2a42cfca" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_7151845e-d750-443d-8e14-704ba585cb23" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_3253d6fd-ebdf-45f3-a97c-e6a904304f17" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_a709c27f-e843-4a57-b5a8-8fdc2a42cfca" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_3253d6fd-ebdf-45f3-a97c-e6a904304f17" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_c8b8004c-52a7-4bd7-92bd-23c7c3d76991" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetImpairmentCharges_1c8c76ac-0e39-4fc7-a179-135ef0e91565" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetImpairmentCharges"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c8b8004c-52a7-4bd7-92bd-23c7c3d76991" xlink:to="loc_us-gaap_AssetImpairmentCharges_1c8c76ac-0e39-4fc7-a179-135ef0e91565" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_94e2ebc2-bc51-4844-947c-59cfdcc8a82f" xlink:href="hsy-20211231.xsd#hsy_RestructuringChargesBusinessRealignment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c8b8004c-52a7-4bd7-92bd-23c7c3d76991" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_94e2ebc2-bc51-4844-947c-59cfdcc8a82f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_d0e16776-df5f-47ca-a9e9-c81191954203" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c8b8004c-52a7-4bd7-92bd-23c7c3d76991" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_d0e16776-df5f-47ca-a9e9-c81191954203" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_130c4c7c-4231-423c-b7f4-4cd1feee4517" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_c8b8004c-52a7-4bd7-92bd-23c7c3d76991" xlink:to="loc_us-gaap_GrossProfit_130c4c7c-4231-423c-b7f4-4cd1feee4517" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_31e8d726-f5f0-4768-be1c-fb738cded243" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_9b29c90b-fa7e-4433-b224-379d3fe39192" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_31e8d726-f5f0-4768-be1c-fb738cded243" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_9b29c90b-fa7e-4433-b224-379d3fe39192" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_4c07b722-6c3b-405b-8667-6094b2d60ef5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_31e8d726-f5f0-4768-be1c-fb738cded243" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_4c07b722-6c3b-405b-8667-6094b2d60ef5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_26951d41-95e4-48a5-81b2-e3d53594a466" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_ca6aa5aa-9072-4a20-aa9f-93c2238c6e54" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_26951d41-95e4-48a5-81b2-e3d53594a466" xlink:to="loc_us-gaap_ProfitLoss_ca6aa5aa-9072-4a20-aa9f-93c2238c6e54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_3db5674d-e93f-4a21-beae-d22ef5600e3e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_26951d41-95e4-48a5-81b2-e3d53594a466" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_3db5674d-e93f-4a21-beae-d22ef5600e3e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="simple" xlink:href="hsy-20211231.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_OtherComprehensiveIncomeLossNetOfTax_0342ee78-5dff-4d7d-a175-abe7dc6f49b2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_51a825c3-921d-428e-8fb1-7520ab350e1f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0342ee78-5dff-4d7d-a175-abe7dc6f49b2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_51a825c3-921d-428e-8fb1-7520ab350e1f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_e56afad1-995a-4b4e-8969-4b956b66f361" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0342ee78-5dff-4d7d-a175-abe7dc6f49b2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_e56afad1-995a-4b4e-8969-4b956b66f361" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_516c6165-0306-4a05-a017-31611804c868" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0342ee78-5dff-4d7d-a175-abe7dc6f49b2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_516c6165-0306-4a05-a017-31611804c868" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_44853c17-0c96-497c-8630-6de5c571e841" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_0342ee78-5dff-4d7d-a175-abe7dc6f49b2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_44853c17-0c96-497c-8630-6de5c571e841" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_3d2079fa-1d44-4da8-b7a5-0aa0e7393711" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0342ee78-5dff-4d7d-a175-abe7dc6f49b2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_3d2079fa-1d44-4da8-b7a5-0aa0e7393711" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_8f50a207-f15e-41c7-9fea-00985eb08556" xlink:href="hsy-20211231.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0342ee78-5dff-4d7d-a175-abe7dc6f49b2" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_8f50a207-f15e-41c7-9fea-00985eb08556" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bc7f3f43-c847-4c4b-b32d-119aaa086ae2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_7e2a4ab6-f960-4bca-928c-50831c555b28" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bc7f3f43-c847-4c4b-b32d-119aaa086ae2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_7e2a4ab6-f960-4bca-928c-50831c555b28" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_9670fbc8-54eb-48d2-b683-6cf414306ade" xlink:href="hsy-20211231.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bc7f3f43-c847-4c4b-b32d-119aaa086ae2" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_9670fbc8-54eb-48d2-b683-6cf414306ade" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_7efbd47f-9027-4310-96ee-7b8a7921532b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bc7f3f43-c847-4c4b-b32d-119aaa086ae2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_7efbd47f-9027-4310-96ee-7b8a7921532b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_fe8f7008-0a33-4e97-ab80-4004e87cf13e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bc7f3f43-c847-4c4b-b32d-119aaa086ae2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_fe8f7008-0a33-4e97-ab80-4004e87cf13e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_3a949bf4-7433-4466-a41d-43f870ec8577" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bc7f3f43-c847-4c4b-b32d-119aaa086ae2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_3a949bf4-7433-4466-a41d-43f870ec8577" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_4be8385c-e355-4df3-bac5-92f8d9ce8673" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bc7f3f43-c847-4c4b-b32d-119aaa086ae2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_4be8385c-e355-4df3-bac5-92f8d9ce8673" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_46ecebb1-90bc-428a-8554-9c79cc09d11a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_3bd53ddb-c49e-41d7-ba12-fdd15e1846f6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_46ecebb1-90bc-428a-8554-9c79cc09d11a" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_3bd53ddb-c49e-41d7-ba12-fdd15e1846f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_ab7ee86b-a055-49f9-bf9b-5580792f26fd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_46ecebb1-90bc-428a-8554-9c79cc09d11a" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_ab7ee86b-a055-49f9-bf9b-5580792f26fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_9a5d2e86-8848-4966-ba33-ea4844e72e7e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_4e8801f0-c52b-40e9-913a-0b18ebbd8e2b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_9a5d2e86-8848-4966-ba33-ea4844e72e7e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_4e8801f0-c52b-40e9-913a-0b18ebbd8e2b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_498d387b-4ff3-4a28-987d-b97dcbaf5b67" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_9a5d2e86-8848-4966-ba33-ea4844e72e7e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_498d387b-4ff3-4a28-987d-b97dcbaf5b67" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_eb2660a3-efb6-4c8e-8b65-e13ec2d8e9ee" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_d8777635-70ef-4f48-964e-8ea503e617f6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_eb2660a3-efb6-4c8e-8b65-e13ec2d8e9ee" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_d8777635-70ef-4f48-964e-8ea503e617f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_d4413db9-fd95-4055-9307-e03652f47ef1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_eb2660a3-efb6-4c8e-8b65-e13ec2d8e9ee" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_d4413db9-fd95-4055-9307-e03652f47ef1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_d5950a0f-1cb7-4860-9d4e-c00f530d96f2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_038294b0-9e86-45d5-b31b-8fad63ba9860" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_d5950a0f-1cb7-4860-9d4e-c00f530d96f2" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_038294b0-9e86-45d5-b31b-8fad63ba9860" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest_a0cc0d79-291e-4837-ba32-81e1f85edee9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_d5950a0f-1cb7-4860-9d4e-c00f530d96f2" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest_a0cc0d79-291e-4837-ba32-81e1f85edee9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_092a478c-c66b-41ab-95c4-6c0b1eba05e7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_2feed0a6-651d-4261-8ada-3d224c2ab22a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_092a478c-c66b-41ab-95c4-6c0b1eba05e7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_2feed0a6-651d-4261-8ada-3d224c2ab22a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_af58436a-ef1f-4e6c-95ae-a54516470812" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_092a478c-c66b-41ab-95c4-6c0b1eba05e7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_af58436a-ef1f-4e6c-95ae-a54516470812" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_2f97ad8a-234e-448f-b76a-03bc691b09b5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_af81d907-cee7-4dec-9d45-0ef0de6ae8e7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_2f97ad8a-234e-448f-b76a-03bc691b09b5" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_af81d907-cee7-4dec-9d45-0ef0de6ae8e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_1b9283fb-a464-4f89-96fb-03df942a18c9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_2f97ad8a-234e-448f-b76a-03bc691b09b5" xlink:to="loc_us-gaap_ProfitLoss_1b9283fb-a464-4f89-96fb-03df942a18c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_30eecaf6-adb4-434c-9c8a-e34bda841ce9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_c39d499f-2ad9-4efd-b281-b8e17d1b7275" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_30eecaf6-adb4-434c-9c8a-e34bda841ce9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_c39d499f-2ad9-4efd-b281-b8e17d1b7275" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_4d69c515-355d-4b95-a6d6-17fc0df85db6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_30eecaf6-adb4-434c-9c8a-e34bda841ce9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_4d69c515-355d-4b95-a6d6-17fc0df85db6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_c08bba7b-bdb0-4f32-badf-d2c26c4efb84" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_30eecaf6-adb4-434c-9c8a-e34bda841ce9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_c08bba7b-bdb0-4f32-badf-d2c26c4efb84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_6738b8ad-a59a-46d7-98a4-99f770ebeccd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_30eecaf6-adb4-434c-9c8a-e34bda841ce9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_6738b8ad-a59a-46d7-98a4-99f770ebeccd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_59426a3a-816b-459e-b7de-ae148570beaf" xlink:href="hsy-20211231.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_30eecaf6-adb4-434c-9c8a-e34bda841ce9" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_59426a3a-816b-459e-b7de-ae148570beaf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_bce6e7a9-2c13-4bda-a95e-40d8017e858d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_30eecaf6-adb4-434c-9c8a-e34bda841ce9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_bce6e7a9-2c13-4bda-a95e-40d8017e858d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_984773ad-f2e1-4c64-bb85-58221b25c00e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_25ff1e8b-2aa7-44ee-946a-f0218ce0b4b7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_984773ad-f2e1-4c64-bb85-58221b25c00e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_25ff1e8b-2aa7-44ee-946a-f0218ce0b4b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_38b1f0fb-dfd7-4d95-a95b-394f185ff271" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_984773ad-f2e1-4c64-bb85-58221b25c00e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_38b1f0fb-dfd7-4d95-a95b-394f185ff271" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_42c0b629-78b9-4c27-8d50-207e4e543a28" xlink:href="hsy-20211231.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_a5960d0d-8d66-4158-8214-21ffd8cc3c9a" xlink:href="hsy-20211231.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_42c0b629-78b9-4c27-8d50-207e4e543a28" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_a5960d0d-8d66-4158-8214-21ffd8cc3c9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_55cfee1a-8ca9-4fbc-8c2a-c55a6975bd66" xlink:href="hsy-20211231.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_42c0b629-78b9-4c27-8d50-207e4e543a28" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_55cfee1a-8ca9-4fbc-8c2a-c55a6975bd66" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="hsy-20211231.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_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_8f53dd2b-eb7f-4f48-9b03-dd6f169ce700" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_b3e5ae7e-9ac4-4259-bb5b-b73e07a47d26" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_8f53dd2b-eb7f-4f48-9b03-dd6f169ce700" xlink:to="loc_us-gaap_StockholdersEquity_b3e5ae7e-9ac4-4259-bb5b-b73e07a47d26" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MinorityInterest_5b0588b0-d9a7-4bb8-b30d-bea153e8b1f2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MinorityInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_8f53dd2b-eb7f-4f48-9b03-dd6f169ce700" xlink:to="loc_us-gaap_MinorityInterest_5b0588b0-d9a7-4bb8-b30d-bea153e8b1f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_35e519a1-2092-44c0-8f0b-a2721d18bdf6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_dac51d23-d8d0-4c4a-af51-669338583856" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_35e519a1-2092-44c0-8f0b-a2721d18bdf6" xlink:to="loc_us-gaap_CommonStockValue_dac51d23-d8d0-4c4a-af51-669338583856" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_e3ef3f46-7de7-476a-89ac-bec06e186311" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_35e519a1-2092-44c0-8f0b-a2721d18bdf6" xlink:to="loc_us-gaap_AdditionalPaidInCapital_e3ef3f46-7de7-476a-89ac-bec06e186311" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_7b611548-cc9f-4184-a64b-b0f66fd73ddf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockValue"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_35e519a1-2092-44c0-8f0b-a2721d18bdf6" xlink:to="loc_us-gaap_TreasuryStockValue_7b611548-cc9f-4184-a64b-b0f66fd73ddf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_80c9caac-c877-46b2-982a-609ff1180c77" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_35e519a1-2092-44c0-8f0b-a2721d18bdf6" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_80c9caac-c877-46b2-982a-609ff1180c77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_c28c58d8-97fe-4b4c-b51f-9be6a4e1da97" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_35e519a1-2092-44c0-8f0b-a2721d18bdf6" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_c28c58d8-97fe-4b4c-b51f-9be6a4e1da97" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_0146194e-139d-49c8-bc9f-52587a4ded1b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_35e519a1-2092-44c0-8f0b-a2721d18bdf6" xlink:to="loc_us-gaap_PreferredStockValue_0146194e-139d-49c8-bc9f-52587a4ded1b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_fb27ac73-a524-4697-bf55-9778fee84842" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_c281525b-d5d3-463a-b19a-e6a8bc3a7b61" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_fb27ac73-a524-4697-bf55-9778fee84842" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_c281525b-d5d3-463a-b19a-e6a8bc3a7b61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_ba80c7e7-a912-4331-af69-dbf95bce9936" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_fb27ac73-a524-4697-bf55-9778fee84842" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_ba80c7e7-a912-4331-af69-dbf95bce9936" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_cb9c46bf-6b31-48fb-95e7-3e2c4a270b87" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_fb27ac73-a524-4697-bf55-9778fee84842" xlink:to="loc_us-gaap_InventoryNet_cb9c46bf-6b31-48fb-95e7-3e2c4a270b87" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_0020d413-92fe-4d7b-ad6c-68fbc2f38507" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_fb27ac73-a524-4697-bf55-9778fee84842" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_0020d413-92fe-4d7b-ad6c-68fbc2f38507" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_cb155bea-66cb-456d-9ab6-d0de15cd3ade" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_f520bf5a-865f-4967-9714-2bbd44370028" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_cb155bea-66cb-456d-9ab6-d0de15cd3ade" xlink:to="loc_us-gaap_Liabilities_f520bf5a-865f-4967-9714-2bbd44370028" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_65879e7c-30f0-484a-bd5c-ba7d86cf2d25" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_cb155bea-66cb-456d-9ab6-d0de15cd3ade" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_65879e7c-30f0-484a-bd5c-ba7d86cf2d25" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_b921a8b0-03f8-4c47-bd0d-824e37d35f55" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_e995c58b-db58-4df6-8cfb-71be3155c450" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_b921a8b0-03f8-4c47-bd0d-824e37d35f55" xlink:to="loc_us-gaap_LiabilitiesCurrent_e995c58b-db58-4df6-8cfb-71be3155c450" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_4df88b95-abd5-40ec-9f82-1571c6281d0f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_b921a8b0-03f8-4c47-bd0d-824e37d35f55" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_4df88b95-abd5-40ec-9f82-1571c6281d0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_5fb43a37-89da-4d1e-8401-c3035bb28c2b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_b921a8b0-03f8-4c47-bd0d-824e37d35f55" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_5fb43a37-89da-4d1e-8401-c3035bb28c2b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_b7bcc557-4242-408a-8825-7ff1311db83b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_b921a8b0-03f8-4c47-bd0d-824e37d35f55" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_b7bcc557-4242-408a-8825-7ff1311db83b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_ff083404-6d28-4673-bca3-fc674dc22c8e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_f3868e04-81d5-4c1e-ac01-34e4218ad27b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ff083404-6d28-4673-bca3-fc674dc22c8e" xlink:to="loc_us-gaap_AccountsPayableCurrent_f3868e04-81d5-4c1e-ac01-34e4218ad27b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_d59a819f-b012-42c9-b4fa-77fdc5dc4c42" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ff083404-6d28-4673-bca3-fc674dc22c8e" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_d59a819f-b012-42c9-b4fa-77fdc5dc4c42" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_71c7f0a4-3dd9-4565-95c6-55e2093a6bab" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ff083404-6d28-4673-bca3-fc674dc22c8e" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_71c7f0a4-3dd9-4565-95c6-55e2093a6bab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_cce8eb34-6c42-49db-a81a-6fd5936c009d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ff083404-6d28-4673-bca3-fc674dc22c8e" xlink:to="loc_us-gaap_ShortTermBorrowings_cce8eb34-6c42-49db-a81a-6fd5936c009d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligationsCurrent_ebf3f28e-10a0-45b1-a42d-3c2948eca99c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtAndCapitalLeaseObligationsCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_ff083404-6d28-4673-bca3-fc674dc22c8e" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligationsCurrent_ebf3f28e-10a0-45b1-a42d-3c2948eca99c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_37eff0cd-118f-4b3b-9035-51a8ea63b0aa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_9726df82-a89c-4fdb-a550-bffe3ef1fd9d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_37eff0cd-118f-4b3b-9035-51a8ea63b0aa" xlink:to="loc_us-gaap_AssetsCurrent_9726df82-a89c-4fdb-a550-bffe3ef1fd9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_00bbc95b-791e-44fe-b255-1ce489d1570b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_37eff0cd-118f-4b3b-9035-51a8ea63b0aa" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_00bbc95b-791e-44fe-b255-1ce489d1570b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_425bb024-fd28-4d79-b205-825581b631ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_37eff0cd-118f-4b3b-9035-51a8ea63b0aa" xlink:to="loc_us-gaap_Goodwill_425bb024-fd28-4d79-b205-825581b631ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_649086a4-acf9-4333-949c-924929a5b801" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_37eff0cd-118f-4b3b-9035-51a8ea63b0aa" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_649086a4-acf9-4333-949c-924929a5b801" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_aef3054f-dad1-4466-8937-3b631d4c4e39" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_37eff0cd-118f-4b3b-9035-51a8ea63b0aa" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_aef3054f-dad1-4466-8937-3b631d4c4e39" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_4d392467-973b-4d36-bee9-14ffac7f0fe6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_37eff0cd-118f-4b3b-9035-51a8ea63b0aa" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_4d392467-973b-4d36-bee9-14ffac7f0fe6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="hsy-20211231.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_NetCashProvidedByUsedInFinancingActivities_9c9d4b50-eba1-4687-9ebc-8ca19f46398c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_c88e571e-eec3-484d-8e3a-9fd8bd29b5a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromRepaymentsOfShortTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9c9d4b50-eba1-4687-9ebc-8ca19f46398c" xlink:to="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_c88e571e-eec3-484d-8e3a-9fd8bd29b5a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_3c90e82d-ae73-442c-bce5-a8072d845dc9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromIssuanceOfLongTermDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9c9d4b50-eba1-4687-9ebc-8ca19f46398c" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_3c90e82d-ae73-442c-bce5-a8072d845dc9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_9021be3e-c44a-4d3a-86af-a445a8045692" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9c9d4b50-eba1-4687-9ebc-8ca19f46398c" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_9021be3e-c44a-4d3a-86af-a445a8045692" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_e34a0c61-cf36-4143-9213-fd3a0216aef1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9c9d4b50-eba1-4687-9ebc-8ca19f46398c" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_e34a0c61-cf36-4143-9213-fd3a0216aef1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_ba923d02-2794-4e2a-81dd-5ec97ea25872" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9c9d4b50-eba1-4687-9ebc-8ca19f46398c" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_ba923d02-2794-4e2a-81dd-5ec97ea25872" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_43f04f8f-22ac-4270-aa82-e552cbdd5bcb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9c9d4b50-eba1-4687-9ebc-8ca19f46398c" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_43f04f8f-22ac-4270-aa82-e552cbdd5bcb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_3a6c8dd3-2544-4a29-a98c-5efa91bef45a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_ProfitLoss_3a6c8dd3-2544-4a29-a98c-5efa91bef45a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_95ab1723-68c4-497b-919a-94d7c48ecfdf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_95ab1723-68c4-497b-919a-94d7c48ecfdf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_04df1af8-dff6-41b2-8cbf-bca1fabb2fcd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_ShareBasedCompensation_04df1af8-dff6-41b2-8cbf-bca1fabb2fcd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_53c9b966-0d36-4a29-ad68-ada18bace917" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_53c9b966-0d36-4a29-ad68-ada18bace917" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostsAndAssetImpairmentCharges_e0c25793-c406-4957-9962-7fc0d9e2fb8d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCostsAndAssetImpairmentCharges"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_RestructuringCostsAndAssetImpairmentCharges_e0c25793-c406-4957-9962-7fc0d9e2fb8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_a6031073-9983-470d-bee0-2ec48844d730" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_a6031073-9983-470d-bee0-2ec48844d730" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_176eafa9-8264-412b-84bd-3f1cd425f611" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_176eafa9-8264-412b-84bd-3f1cd425f611" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_4ef3fab3-888b-4681-b7da-ffa833550e65" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_4ef3fab3-888b-4681-b7da-ffa833550e65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_8e52d996-68e9-4ca4-bd08-ed3d8638af70" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_8e52d996-68e9-4ca4-bd08-ed3d8638af70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_1519682d-bd1e-463d-91b2-03f03ecf03de" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_1519682d-bd1e-463d-91b2-03f03ecf03de" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_721385b7-08af-4e5f-957f-76ebc081fa18" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_721385b7-08af-4e5f-957f-76ebc081fa18" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_d77f1dd9-f39b-4509-93c4-595340476627" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedTaxesPayable"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_d77f1dd9-f39b-4509-93c4-595340476627" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_a508dbb2-0d8c-4a71-8228-deed9476574b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PensionAndOtherPostretirementBenefitContributions"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_a508dbb2-0d8c-4a71-8228-deed9476574b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_ee35d84b-61d9-41c4-bbb0-91e2b3b880c1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet"/>
    <link:calculationArc order="14" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_5ffdc6a0-0830-4fbf-87a4-9c4d69d24a10" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_ee35d84b-61d9-41c4-bbb0-91e2b3b880c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_3f0d34a2-07bd-4295-a0d0-4d7eed13d70f" xlink:href="hsy-20211231.xsd#hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents_fd6d3594-5ddc-423c-9395-e596e34a3e4e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_3f0d34a2-07bd-4295-a0d0-4d7eed13d70f" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents_fd6d3594-5ddc-423c-9395-e596e34a3e4e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d24c8f8d-f6d2-4289-b611-9a0955290bdc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_3f0d34a2-07bd-4295-a0d0-4d7eed13d70f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d24c8f8d-f6d2-4289-b611-9a0955290bdc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_cb46b64f-f6cc-423d-bb14-70339dab4f30" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_3f0d34a2-07bd-4295-a0d0-4d7eed13d70f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_cb46b64f-f6cc-423d-bb14-70339dab4f30" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f14a6d94-67fb-4485-a4d5-ec8d85fce528" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_3f0d34a2-07bd-4295-a0d0-4d7eed13d70f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f14a6d94-67fb-4485-a4d5-ec8d85fce528" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_05cfada4-e3ec-4868-b2f8-d0ba9babcc02" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_CashandCashEquivalentsClassifiedasHeldforSaleIncreaseDecrease_8081f780-1cb0-44f2-8941-8a22dc5a030e" xlink:href="hsy-20211231.xsd#hsy_CashandCashEquivalentsClassifiedasHeldforSaleIncreaseDecrease"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_05cfada4-e3ec-4868-b2f8-d0ba9babcc02" xlink:to="loc_hsy_CashandCashEquivalentsClassifiedasHeldforSaleIncreaseDecrease_8081f780-1cb0-44f2-8941-8a22dc5a030e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_715b5456-6a37-43a6-98ca-4f9216485689" xlink:href="hsy-20211231.xsd#hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_05cfada4-e3ec-4868-b2f8-d0ba9babcc02" xlink:to="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_715b5456-6a37-43a6-98ca-4f9216485689" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1cdda3c1-dfce-4236-a615-eaa018726475" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_cd6d4be5-66d0-409b-9306-dcedc94d2394" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1cdda3c1-dfce-4236-a615-eaa018726475" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_cd6d4be5-66d0-409b-9306-dcedc94d2394" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_7a258b02-8459-45d9-8c01-5856f245f181" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsToAcquireEquityMethodInvestments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1cdda3c1-dfce-4236-a615-eaa018726475" xlink:to="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_7a258b02-8459-45d9-8c01-5856f245f181" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_4be83bb2-0044-45e5-b532-ccf051548412" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1cdda3c1-dfce-4236-a615-eaa018726475" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_4be83bb2-0044-45e5-b532-ccf051548412" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_f27a14a6-7a6e-4ef0-a599-0942d6e327e2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsForProceedsFromOtherInvestingActivities"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_1cdda3c1-dfce-4236-a615-eaa018726475" xlink:to="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_f27a14a6-7a6e-4ef0-a599-0942d6e327e2" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITURESPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#BUSINESSACQUISITIONSANDDIVESTITURESPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITURESPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_03be99af-98c1-42d8-ba81-3023de30fd53" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_03be99af-98c1-42d8-ba81-3023de30fd53" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_bba91e73-c886-4756-8894-676d67bae2b3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_bba91e73-c886-4756-8894-676d67bae2b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_a26fe30f-f2a7-48cc-9b1b-185a70c2209a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_a26fe30f-f2a7-48cc-9b1b-185a70c2209a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_4f2ff84c-07e7-428f-9ead-deb53d802e9d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_4f2ff84c-07e7-428f-9ead-deb53d802e9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_860ea729-d31c-4b37-adcd-ccf65770489e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_860ea729-d31c-4b37-adcd-ccf65770489e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_77c80dc4-fad3-4d5c-a7f1-4aefe4b9163d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_77c80dc4-fad3-4d5c-a7f1-4aefe4b9163d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_0a0d6da1-d4bf-4a2f-a43b-6651777e86c9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_0a0d6da1-d4bf-4a2f-a43b-6651777e86c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_1ce437c9-96ab-4ac0-b5a1-a54c7d936362" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_Goodwill_1ce437c9-96ab-4ac0-b5a1-a54c7d936362" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_b37a9745-913a-436c-99ad-d2433b349e87" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_b37a9745-913a-436c-99ad-d2433b349e87" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_9f45ac6a-c8cd-4a8f-9dcc-85173e8cf330" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_9f45ac6a-c8cd-4a8f-9dcc-85173e8cf330" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_27649315-655c-432f-9acc-0890b1cfd75d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_f7397161-cc47-4d25-9215-739d0d158bf3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_27649315-655c-432f-9acc-0890b1cfd75d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_d97dbba1-569a-4572-9247-0dc335ca04cf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillGross_0b63f331-85a8-4fa0-a16b-2e80cfabf647" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_d97dbba1-569a-4572-9247-0dc335ca04cf" xlink:to="loc_us-gaap_GoodwillGross_0b63f331-85a8-4fa0-a16b-2e80cfabf647" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_331cd561-371d-4ac2-a105-a7476ea3ca3f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_d97dbba1-569a-4572-9247-0dc335ca04cf" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_331cd561-371d-4ac2-a105-a7476ea3ca3f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndCapitalLeaseObligations_0fa6e233-88c2-4c12-aeee-3c8cfa2f1978" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtAndCapitalLeaseObligations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiability_462356c2-d727-4e1a-984b-8208a25ed8b6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtAndCapitalLeaseObligations_0fa6e233-88c2-4c12-aeee-3c8cfa2f1978" xlink:to="loc_us-gaap_FinanceLeaseLiability_462356c2-d727-4e1a-984b-8208a25ed8b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_bbb0dde6-9ac9-4c4b-b162-a9f52b160c3c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtAndCapitalLeaseObligations_0fa6e233-88c2-4c12-aeee-3c8cfa2f1978" xlink:to="loc_us-gaap_LongTermDebt_bbb0dde6-9ac9-4c4b-b162-a9f52b160c3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_a76423be-24cb-492f-8dfc-260fc88fd318" xlink:href="hsy-20211231.xsd#hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtAndCapitalLeaseObligations_0fa6e233-88c2-4c12-aeee-3c8cfa2f1978" xlink:to="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_a76423be-24cb-492f-8dfc-260fc88fd318" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_d5e59362-875f-4c7c-ba79-b656144e8ef0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestCostsCapitalizedAdjustment_e88a06ee-363b-489c-a0df-a1982f33ba78" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestCostsCapitalizedAdjustment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_d5e59362-875f-4c7c-ba79-b656144e8ef0" xlink:to="loc_us-gaap_InterestCostsCapitalizedAdjustment_e88a06ee-363b-489c-a0df-a1982f33ba78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebt_4a6b0fe8-afd2-4f91-bd77-2b2343fdf5ea" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpenseDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_d5e59362-875f-4c7c-ba79-b656144e8ef0" xlink:to="loc_us-gaap_InterestExpenseDebt_4a6b0fe8-afd2-4f91-bd77-2b2343fdf5ea" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFCOMPONENETSOFLEASEEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20211231.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_a3754ddd-263f-40e2-b21b-0fd95f9f2871" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_ef084091-6363-4dfc-bc04-92fcd4b08d83" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a3754ddd-263f-40e2-b21b-0fd95f9f2871" xlink:to="loc_us-gaap_OperatingLeaseCost_ef084091-6363-4dfc-bc04-92fcd4b08d83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_07d57cdf-5f3a-4fb7-be5d-4d85c885fca3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a3754ddd-263f-40e2-b21b-0fd95f9f2871" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_07d57cdf-5f3a-4fb7-be5d-4d85c885fca3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseInterestExpense_3d7211e8-0427-42fc-b4dc-df8d5f0929ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a3754ddd-263f-40e2-b21b-0fd95f9f2871" xlink:to="loc_us-gaap_FinanceLeaseInterestExpense_3d7211e8-0427-42fc-b4dc-df8d5f0929ff" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseRightofUseAsset_b20d0911-a260-4db2-aeeb-db497525bad4" xlink:href="hsy-20211231.xsd#hsy_LeaseRightofUseAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_9b9c403d-8688-4538-a68f-fb9651ae0da5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_b20d0911-a260-4db2-aeeb-db497525bad4" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_9b9c403d-8688-4538-a68f-fb9651ae0da5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_78b505e0-f87b-44f5-aa45-816d9c1f2237" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_b20d0911-a260-4db2-aeeb-db497525bad4" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_78b505e0-f87b-44f5-aa45-816d9c1f2237" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseLiability_e53477db-2ee8-4d81-ba6a-d1b7be4303ba" xlink:href="hsy-20211231.xsd#hsy_LeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_56cc80c1-f001-476c-914d-18fd688eed83" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_e53477db-2ee8-4d81-ba6a-d1b7be4303ba" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_56cc80c1-f001-476c-914d-18fd688eed83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_d663f914-88be-4aef-9349-0d408713873d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_e53477db-2ee8-4d81-ba6a-d1b7be4303ba" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_d663f914-88be-4aef-9349-0d408713873d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_f1caefc5-2857-4080-b292-2cea0246fb80" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_e53477db-2ee8-4d81-ba6a-d1b7be4303ba" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_f1caefc5-2857-4080-b292-2cea0246fb80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_4c50300f-cc09-4ac0-8d13-31a620525909" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_e53477db-2ee8-4d81-ba6a-d1b7be4303ba" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_4c50300f-cc09-4ac0-8d13-31a620525909" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_cb3f4eeb-6ceb-4efc-9588-cbe15ba311de" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_17796e52-34e0-49c4-882f-3dc5c73e92f2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseRightOfUseAsset_cb3f4eeb-6ceb-4efc-9588-cbe15ba311de" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_17796e52-34e0-49c4-882f-3dc5c73e92f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetBeforeAccumulatedAmortization_a828b4a6-6cf3-45b8-afdb-b8a5b298acb0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseRightOfUseAssetBeforeAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseRightOfUseAsset_cb3f4eeb-6ceb-4efc-9588-cbe15ba311de" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetBeforeAccumulatedAmortization_a828b4a6-6cf3-45b8-afdb-b8a5b298acb0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_685172ea-70a6-4f3e-b4ad-4de85a93060c" xlink:href="hsy-20211231.xsd#hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_a006f3cb-df42-45e6-90dd-32a04de66f91" xlink:href="hsy-20211231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_685172ea-70a6-4f3e-b4ad-4de85a93060c" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_a006f3cb-df42-45e6-90dd-32a04de66f91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_9e96823e-993b-4b09-b8f3-7ae9af40bcc1" xlink:href="hsy-20211231.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_685172ea-70a6-4f3e-b4ad-4de85a93060c" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_9e96823e-993b-4b09-b8f3-7ae9af40bcc1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_5c184db5-7191-43bb-a075-8dc12d2b3625" xlink:href="hsy-20211231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_685172ea-70a6-4f3e-b4ad-4de85a93060c" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_5c184db5-7191-43bb-a075-8dc12d2b3625" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFive_ff6e6d75-92a1-4533-bd4f-74b1bdcd0a37" xlink:href="hsy-20211231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFive"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_685172ea-70a6-4f3e-b4ad-4de85a93060c" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFive_ff6e6d75-92a1-4533-bd4f-74b1bdcd0a37" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFive_0ff3fe7b-05da-4447-bf70-6dcec17df9d7" xlink:href="hsy-20211231.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_685172ea-70a6-4f3e-b4ad-4de85a93060c" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFive_0ff3fe7b-05da-4447-bf70-6dcec17df9d7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_24c4da8b-d3ff-4936-8dc4-33b26d114f95" xlink:href="hsy-20211231.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_685172ea-70a6-4f3e-b4ad-4de85a93060c" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_24c4da8b-d3ff-4936-8dc4-33b26d114f95" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c5cbf889-8909-4f0e-b78f-efdda5cb374c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_b0f42183-a9c7-4f2b-8038-574a6e4a17fa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c5cbf889-8909-4f0e-b78f-efdda5cb374c" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_b0f42183-a9c7-4f2b-8038-574a6e4a17fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_f47b6a36-9038-4b92-ad47-e25041ae9bfa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_c5cbf889-8909-4f0e-b78f-efdda5cb374c" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_f47b6a36-9038-4b92-ad47-e25041ae9bfa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_c688e5c8-a419-4b6c-bb14-abf8352aece8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c5cbf889-8909-4f0e-b78f-efdda5cb374c" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_c688e5c8-a419-4b6c-bb14-abf8352aece8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive_b47d3597-cb04-4315-aba0-8b7ff68c8839" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c5cbf889-8909-4f0e-b78f-efdda5cb374c" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive_b47d3597-cb04-4315-aba0-8b7ff68c8839" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_893004c3-4501-408b-b918-85d06e1c755b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c5cbf889-8909-4f0e-b78f-efdda5cb374c" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_893004c3-4501-408b-b918-85d06e1c755b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive_74118231-1f27-48be-8047-7be4412b7be7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c5cbf889-8909-4f0e-b78f-efdda5cb374c" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive_74118231-1f27-48be-8047-7be4412b7be7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ad09ef3a-ee7e-469a-bc95-07dc5267a9fc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_e4b34e97-75df-473e-b7c0-4868cc125fda" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ad09ef3a-ee7e-469a-bc95-07dc5267a9fc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_e4b34e97-75df-473e-b7c0-4868cc125fda" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_1ae0ec2d-5f63-43b0-8048-86aed7b248fe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ad09ef3a-ee7e-469a-bc95-07dc5267a9fc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_1ae0ec2d-5f63-43b0-8048-86aed7b248fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_e3473289-892a-45d1-87d1-b9b34acdc599" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ad09ef3a-ee7e-469a-bc95-07dc5267a9fc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_e3473289-892a-45d1-87d1-b9b34acdc599" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_b3645c22-228e-40dc-b632-710d1d4c8d23" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ad09ef3a-ee7e-469a-bc95-07dc5267a9fc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_b3645c22-228e-40dc-b632-710d1d4c8d23" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_d4a23948-0da6-4546-80a4-473b2220d028" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ad09ef3a-ee7e-469a-bc95-07dc5267a9fc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_d4a23948-0da6-4546-80a4-473b2220d028" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_819be424-fac2-4b84-b624-163c35a79197" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_ad09ef3a-ee7e-469a-bc95-07dc5267a9fc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_819be424-fac2-4b84-b624-163c35a79197" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFINCOMELOSSBEFORETAXESDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#INCOMETAXESSCHEDULEOFINCOMELOSSBEFORETAXESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFINCOMELOSSBEFORETAXESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e515c41c-a276-42e5-851b-3ad4bc77c731" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_ab6df617-8024-4074-a037-aa8a78c4445b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e515c41c-a276-42e5-851b-3ad4bc77c731" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_ab6df617-8024-4074-a037-aa8a78c4445b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_f7ccfbc3-41da-48b8-8670-51bd638e3710" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e515c41c-a276-42e5-851b-3ad4bc77c731" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_f7ccfbc3-41da-48b8-8670-51bd638e3710" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFCOMPONENTSOFINCOMETAXEXPENSEBENEFITDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#INCOMETAXESSCHEDULEOFCOMPONENTSOFINCOMETAXEXPENSEBENEFITDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFCOMPONENTSOFINCOMETAXEXPENSEBENEFITDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_77e6ba59-872a-4905-a2df-5b55c62d9c6c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_cdf14597-140d-437c-aab7-7f7e9eb19795" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredFederalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_77e6ba59-872a-4905-a2df-5b55c62d9c6c" xlink:to="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_cdf14597-140d-437c-aab7-7f7e9eb19795" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_2449296f-1a00-488d-8957-44b1dd340b54" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_77e6ba59-872a-4905-a2df-5b55c62d9c6c" xlink:to="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_2449296f-1a00-488d-8957-44b1dd340b54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_e916d60f-6a42-46f4-abff-e0364c9a3c8c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredForeignIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_77e6ba59-872a-4905-a2df-5b55c62d9c6c" xlink:to="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_e916d60f-6a42-46f4-abff-e0364c9a3c8c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_3e6d5298-a9a7-4c00-8ad0-fd39dae4e94f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_7781bacf-758f-4da1-b5e0-ac6938c3f513" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_3e6d5298-a9a7-4c00-8ad0-fd39dae4e94f" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_7781bacf-758f-4da1-b5e0-ac6938c3f513" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_c3285e8d-5da1-481a-87bf-6af20f871ae3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_3e6d5298-a9a7-4c00-8ad0-fd39dae4e94f" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_c3285e8d-5da1-481a-87bf-6af20f871ae3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_5dbbe6df-2a2d-41bf-9fc6-e926c7444d54" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentFederalTaxExpenseBenefit_ac9806bd-8270-4e85-91cd-166feab048e8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CurrentFederalTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_5dbbe6df-2a2d-41bf-9fc6-e926c7444d54" xlink:to="loc_us-gaap_CurrentFederalTaxExpenseBenefit_ac9806bd-8270-4e85-91cd-166feab048e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_79baa30f-6c6e-4e05-997d-1980896276a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CurrentStateAndLocalTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_5dbbe6df-2a2d-41bf-9fc6-e926c7444d54" xlink:to="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_79baa30f-6c6e-4e05-997d-1980896276a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentForeignTaxExpenseBenefit_4fe19d0f-5d2b-47f1-a4f7-dd94029b3d02" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CurrentForeignTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_5dbbe6df-2a2d-41bf-9fc6-e926c7444d54" xlink:to="loc_us-gaap_CurrentForeignTaxExpenseBenefit_4fe19d0f-5d2b-47f1-a4f7-dd94029b3d02" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFDEFERREDTAXASSETANDLIABILITIESDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#INCOMETAXESSCHEDULEOFDEFERREDTAXASSETANDLIABILITIESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFDEFERREDTAXASSETANDLIABILITIESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPostretirementBenefits_4e712e6e-6ccf-4227-8baf-e9ce3eacc1a3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPostretirementBenefits"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPostretirementBenefits_4e712e6e-6ccf-4227-8baf-e9ce3eacc1a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther_5210707f-7520-4bb5-b53a-324c4664aa70" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsOther_5210707f-7520-4bb5-b53a-324c4664aa70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_5130c100-834d-4e8f-914b-64249439b5ec" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_5130c100-834d-4e8f-914b-64249439b5ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsDerivativeInstruments_cdda30ae-f769-4a59-b0d2-7c0c85342c29" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsDerivativeInstruments"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsDerivativeInstruments_cdda30ae-f769-4a59-b0d2-7c0c85342c29" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions_72fbdc81-1078-4ffc-be1d-1d581878d75c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsPensions_72fbdc81-1078-4ffc-be1d-1d581878d75c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredTaxAssetLeasingArrangements_e76d8b55-087a-438b-977c-333153676382" xlink:href="hsy-20211231.xsd#hsy_DeferredTaxAssetLeasingArrangements"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_hsy_DeferredTaxAssetLeasingArrangements_e76d8b55-087a-438b-977c-333153676382" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredTaxAssetTaxDeferredExpenseAccruedTradePromotionReserves_c6d7be26-f0eb-47c0-9d67-3a81c3a14124" xlink:href="hsy-20211231.xsd#hsy_DeferredTaxAssetTaxDeferredExpenseAccruedTradePromotionReserves"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_hsy_DeferredTaxAssetTaxDeferredExpenseAccruedTradePromotionReserves_c6d7be26-f0eb-47c0-9d67-3a81c3a14124" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_447656b2-e26f-43fa-a90b-b7b212c94f10" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_447656b2-e26f-43fa-a90b-b7b212c94f10" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsCapitalLossCarryforwards_effd3b23-8450-4331-a76c-d3aeb7d9bf69" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsCapitalLossCarryforwards"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsCapitalLossCarryforwards_effd3b23-8450-4331-a76c-d3aeb7d9bf69" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_3480cb4d-cd97-45df-934c-1b8cdc9ae8ec" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_b367de5e-50a9-4036-b860-121f665281b3" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_3480cb4d-cd97-45df-934c-1b8cdc9ae8ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_822c8dae-3115-4f53-97a8-185cf03a71d8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_822c8dae-3115-4f53-97a8-185cf03a71d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDerivatives_86f815f8-ac7f-45a1-8aca-4be3e3a60b2d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesDerivatives"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDerivatives_86f815f8-ac7f-45a1-8aca-4be3e3a60b2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_2d25f30d-a4de-490c-a7b1-f02c74a016da" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_2d25f30d-a4de-490c-a7b1-f02c74a016da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredTaxLiabilitiesDeferredExpenseCompensationAndBenefitsPensions_4b695f6c-d1ed-4c9a-b62e-3afa01026e0c" xlink:href="hsy-20211231.xsd#hsy_DeferredTaxLiabilitiesDeferredExpenseCompensationAndBenefitsPensions"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:to="loc_hsy_DeferredTaxLiabilitiesDeferredExpenseCompensationAndBenefitsPensions_4b695f6c-d1ed-4c9a-b62e-3afa01026e0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedInventoryCosts_3c6b7d50-2102-490d-bed9-ca7d70c1192f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedInventoryCosts"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesDeferredExpenseCapitalizedInventoryCosts_3c6b7d50-2102-490d-bed9-ca7d70c1192f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_1ae08f15-2c2e-46aa-a09d-e7441f359441" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesGoodwillAndIntangibleAssetsIntangibleAssets_1ae08f15-2c2e-46aa-a09d-e7441f359441" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesLeasingArrangements_c26db5a9-3da8-4013-aded-69541cbb3ae8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesLeasingArrangements"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_808769e7-16e9-40a6-af3e-a9e7a1f91a3d" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesLeasingArrangements_c26db5a9-3da8-4013-aded-69541cbb3ae8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_ef1f5caf-178c-4770-9dad-4d52c97e057a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_a185f4d1-18e9-4c57-9469-be741f352572" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_ef1f5caf-178c-4770-9dad-4d52c97e057a" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_a185f4d1-18e9-4c57-9469-be741f352572" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_39f7d2b7-8fa6-4ef6-ba45-e7c42e85272e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_ef1f5caf-178c-4770-9dad-4d52c97e057a" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_39f7d2b7-8fa6-4ef6-ba45-e7c42e85272e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilities_57576d73-0307-4d92-8c21-70758ef7b99a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_6b9bd370-7b4c-4b1e-b1d2-4a225fe3a579" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_57576d73-0307-4d92-8c21-70758ef7b99a" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_6b9bd370-7b4c-4b1e-b1d2-4a225fe3a579" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_c67e6bda-1feb-415a-adc6-1590a6f415b0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_57576d73-0307-4d92-8c21-70758ef7b99a" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_c67e6bda-1feb-415a-adc6-1590a6f415b0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFEFFECTIVEINCOMETAXRATERECONCILIATIONDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#INCOMETAXESSCHEDULEOFEFFECTIVEINCOMETAXRATERECONCILIATIONDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/INCOMETAXESSCHEDULEOFEFFECTIVEINCOMETAXRATERECONCILIATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_9ff1f7c4-6b49-4ac3-9883-2d16f384e4bc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_9ff1f7c4-6b49-4ac3-9883-2d16f384e4bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_aadc43ad-e107-47ef-a029-2a1d2e44746e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_aadc43ad-e107-47ef-a029-2a1d2e44746e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential_e77391da-3d60-45d0-8bfa-dbfea9fcfa1f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential_e77391da-3d60-45d0-8bfa-dbfea9fcfa1f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits_9607e127-4000-45a3-9b61-67601a1e6eee" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits_9607e127-4000-45a3-9b61-67601a1e6eee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies_5ff2b83c-231e-4e08-99d6-d5b9b5857a1d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies_5ff2b83c-231e-4e08-99d6-d5b9b5857a1d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent_53ecf321-f3e1-48cc-8c29-8561fb879811" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent_53ecf321-f3e1-48cc-8c29-8561fb879811" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_cd0ef59d-e46b-46e8-a3f7-5a5b0c4874bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_cd0ef59d-e46b-46e8-a3f7-5a5b0c4874bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherReconcilingItemsPercent_5595f2ba-b2b3-407c-825b-8087e161877e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherReconcilingItemsPercent"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_ef695ee7-859b-4338-a4d0-bf80505a4d94" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherReconcilingItemsPercent_5595f2ba-b2b3-407c-825b-8087e161877e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFDEFINEDBENEFITOBLIGATIONSPLANASSETSANDFUNDEDSTATUSDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFDEFINEDBENEFITOBLIGATIONSPLANASSETSANDFUNDEDSTATUSDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFDEFINEDBENEFITOBLIGATIONSPLANASSETSANDFUNDEDSTATUSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_7d83c542-69e2-402e-bdd6-b7f7d4e2841d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax_09c84cd1-c171-40de-818c-fb6f3c65db2c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_7d83c542-69e2-402e-bdd6-b7f7d4e2841d" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax_09c84cd1-c171-40de-818c-fb6f3c65db2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax_3d8141ca-c41b-49cd-b458-6f26e4b55085" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_7d83c542-69e2-402e-bdd6-b7f7d4e2841d" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax_3d8141ca-c41b-49cd-b458-6f26e4b55085" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_e819a597-734e-4289-9c0e-ba1b9f5ba338" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_0e5837a1-0651-4fac-a0ce-bdd1473b6f6c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_e819a597-734e-4289-9c0e-ba1b9f5ba338" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_0e5837a1-0651-4fac-a0ce-bdd1473b6f6c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities_e7946189-2f47-4345-bc61-2933943e4448" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_e819a597-734e-4289-9c0e-ba1b9f5ba338" xlink:to="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities_e7946189-2f47-4345-bc61-2933943e4448" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent_966b9f42-9e1e-46b5-a569-fdd34059d497" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_e819a597-734e-4289-9c0e-ba1b9f5ba338" xlink:to="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent_966b9f42-9e1e-46b5-a569-fdd34059d497" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_eeb5b1ad-b8f4-4c70-a3f7-72798139308f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanFundedStatusOfPlan"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligation_7c0b7411-fbec-4f5a-b48f-d241314d8aff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanBenefitObligation"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_eeb5b1ad-b8f4-4c70-a3f7-72798139308f" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligation_7c0b7411-fbec-4f5a-b48f-d241314d8aff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_6a95148e-d197-4d9f-8b2a-705a839e7294" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_eeb5b1ad-b8f4-4c70-a3f7-72798139308f" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_6a95148e-d197-4d9f-8b2a-705a839e7294" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="simple" xlink:href="hsy-20211231.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_61a33c1c-b9fc-4bee-84f5-e08f47272d2d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax_17ff90d1-14c7-462f-8d82-4897ba6325f6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_61a33c1c-b9fc-4bee-84f5-e08f47272d2d" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax_17ff90d1-14c7-462f-8d82-4897ba6325f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_6bc55f13-f434-4834-9d65-269425087b17" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_61a33c1c-b9fc-4bee-84f5-e08f47272d2d" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_6bc55f13-f434-4834-9d65-269425087b17" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_49d1e80b-1664-44fa-8c1d-3060f4e05ec1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_9f075a39-4e55-43a7-b885-d1787935f7cb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_49d1e80b-1664-44fa-8c1d-3060f4e05ec1" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_9f075a39-4e55-43a7-b885-d1787935f7cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_3431afd9-9f7c-47c9-bf7b-e80f464c46c2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_49d1e80b-1664-44fa-8c1d-3060f4e05ec1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_3431afd9-9f7c-47c9-bf7b-e80f464c46c2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_a22279dd-8ed1-4463-a189-2cfa90503fb1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_0fee7d6f-6100-4aa2-a5e5-cfb27c61ebb6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_a22279dd-8ed1-4463-a189-2cfa90503fb1" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_0fee7d6f-6100-4aa2-a5e5-cfb27c61ebb6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_e81ae9e3-0e2c-4b49-9633-0d8915420571" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_a22279dd-8ed1-4463-a189-2cfa90503fb1" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_e81ae9e3-0e2c-4b49-9633-0d8915420571" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_f111b819-1c23-4974-a5f0-beb1316b47b2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_a22279dd-8ed1-4463-a189-2cfa90503fb1" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_f111b819-1c23-4974-a5f0-beb1316b47b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_c70a4584-8158-4f45-b78b-0457e11b9b30" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_a22279dd-8ed1-4463-a189-2cfa90503fb1" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_c70a4584-8158-4f45-b78b-0457e11b9b30" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_5c64d719-2488-4282-b607-de33b73eef84" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_a22279dd-8ed1-4463-a189-2cfa90503fb1" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_5c64d719-2488-4282-b607-de33b73eef84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_676b999a-dfe9-485f-b26b-15175bb13cfd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_a22279dd-8ed1-4463-a189-2cfa90503fb1" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_676b999a-dfe9-485f-b26b-15175bb13cfd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="simple" xlink:href="hsy-20211231.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_f800d259-8b1d-481d-982c-e0f006ff3631" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_0d925157-d684-4efd-a219-9c6dee3334be" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_f800d259-8b1d-481d-982c-e0f006ff3631" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_0d925157-d684-4efd-a219-9c6dee3334be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DistributedEarnings_a4aee4e1-eaf0-466a-ab49-0f15ccb0c1d9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DistributedEarnings"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_f800d259-8b1d-481d-982c-e0f006ff3631" xlink:to="loc_us-gaap_DistributedEarnings_a4aee4e1-eaf0-466a-ab49-0f15ccb0c1d9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_f831050f-c223-442d-9315-d7e57258d197" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_f800d259-8b1d-481d-982c-e0f006ff3631" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_f831050f-c223-442d-9315-d7e57258d197" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_fb82649d-ebef-44d3-aa38-17bc4ec81192" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Dividends_619991c4-03ca-4a68-8879-31a4f81cfe77" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Dividends"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_fb82649d-ebef-44d3-aa38-17bc4ec81192" xlink:to="loc_us-gaap_Dividends_619991c4-03ca-4a68-8879-31a4f81cfe77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_9de816e9-0741-42ac-a7e7-d9fd8c0f9d15" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_fb82649d-ebef-44d3-aa38-17bc4ec81192" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_9de816e9-0741-42ac-a7e7-d9fd8c0f9d15" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/OTHERINCOMEEXPENSENETSCHEDULEOFOTHERINCOMEANDEXPENSENETDetails" xlink:type="simple" xlink:href="hsy-20211231.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_d889664f-cda0-465c-bb72-770e99b9662f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_0f7fc623-e968-457f-afba-7d9744fcb514" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_d889664f-cda0-465c-bb72-770e99b9662f" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_0f7fc623-e968-457f-afba-7d9744fcb514" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DefinedBenefitPlanNonServiceCost_b1a3d16b-bb55-4cb8-b145-83ea19442338" xlink:href="hsy-20211231.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_d889664f-cda0-465c-bb72-770e99b9662f" xlink:to="loc_hsy_DefinedBenefitPlanNonServiceCost_b1a3d16b-bb55-4cb8-b145-83ea19442338" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherNonoperatingGainLoss_ab7dbe2a-c55b-4b19-ba51-62bc25a08417" xlink:href="hsy-20211231.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_d889664f-cda0-465c-bb72-770e99b9662f" xlink:to="loc_hsy_OtherNonoperatingGainLoss_ab7dbe2a-c55b-4b19-ba51-62bc25a08417" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SUPPLEMENTALBALANCESHEETINFORMATIONSCHEDULEOFSUPPLEMENTALBALANCESHEETINFORMATIONDetails" xlink:type="simple" xlink:href="hsy-20211231.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_AccruedLiabilitiesCurrent_f17b777f-2526-4369-b041-0cc14b71377c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_43fa3234-d2ed-4ac9-8e75-c0fd5dd2fe98" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_f17b777f-2526-4369-b041-0cc14b71377c" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_43fa3234-d2ed-4ac9-8e75-c0fd5dd2fe98" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedMarketingCostsCurrent_ae202f16-af60-4950-ad7c-2dcac2d38766" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_f17b777f-2526-4369-b041-0cc14b71377c" xlink:to="loc_us-gaap_AccruedMarketingCostsCurrent_ae202f16-af60-4950-ad7c-2dcac2d38766" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_e3c2382f-949d-467c-8455-a69c4b4ff200" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_f17b777f-2526-4369-b041-0cc14b71377c" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_e3c2382f-949d-467c-8455-a69c4b4ff200" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_23593fcd-8577-4bc9-8600-9369bf57484c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_f17b777f-2526-4369-b041-0cc14b71377c" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_23593fcd-8577-4bc9-8600-9369bf57484c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_5cc8ac9f-0f7c-4efd-9f02-27fba79ae155" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_dad300aa-566e-4950-9665-41a2f4b3963d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5cc8ac9f-0f7c-4efd-9f02-27fba79ae155" xlink:to="loc_us-gaap_FIFOInventoryAmount_dad300aa-566e-4950-9665-41a2f4b3963d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryLIFOReserve_c164f611-af30-41f0-a21a-5fadb6a8b8e5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5cc8ac9f-0f7c-4efd-9f02-27fba79ae155" xlink:to="loc_us-gaap_InventoryLIFOReserve_c164f611-af30-41f0-a21a-5fadb6a8b8e5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_ee893fca-16d2-4452-926d-73268471a08f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_8e9f7b93-8e93-4d12-aa8e-b8f2e3d496d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_ee893fca-16d2-4452-926d-73268471a08f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_8e9f7b93-8e93-4d12-aa8e-b8f2e3d496d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAccumulatedDepreciationAndAmortization_ac4df0b3-750c-490d-bdd6-33a551efad34" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAccumulatedDepreciationAndAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization_ee893fca-16d2-4452-926d-73268471a08f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAccumulatedDepreciationAndAmortization_ac4df0b3-750c-490d-bdd6-33a551efad34" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PrepaidExpensesandOther_833927d0-dadb-4731-9ee6-a0e19d1acc10" xlink:href="hsy-20211231.xsd#hsy_PrepaidExpensesandOther"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_40b1cd6b-ef22-430d-9308-047ecb5c0775" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_833927d0-dadb-4731-9ee6-a0e19d1acc10" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_40b1cd6b-ef22-430d-9308-047ecb5c0775" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_203fe1e3-1b9e-4944-9480-e5e4fda6242e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_833927d0-dadb-4731-9ee6-a0e19d1acc10" xlink:to="loc_us-gaap_OtherAssetsCurrent_203fe1e3-1b9e-4944-9480-e5e4fda6242e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_5ab80c09-e4bd-4e0e-a8de-6864b7cef8ba" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Land_0dbbfd02-d134-4066-933b-65accbb142ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5ab80c09-e4bd-4e0e-a8de-6864b7cef8ba" xlink:to="loc_us-gaap_Land_0dbbfd02-d134-4066-933b-65accbb142ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingsAndImprovementsGross_45f6e536-00e8-4fcf-842d-d1672623db57" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5ab80c09-e4bd-4e0e-a8de-6864b7cef8ba" xlink:to="loc_us-gaap_BuildingsAndImprovementsGross_45f6e536-00e8-4fcf-842d-d1672623db57" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentGross_fbfe3abb-84cc-40a3-902a-b7d55b4561aa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5ab80c09-e4bd-4e0e-a8de-6864b7cef8ba" xlink:to="loc_us-gaap_MachineryAndEquipmentGross_fbfe3abb-84cc-40a3-902a-b7d55b4561aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressGross_59f6d837-62f5-4cbf-b2d3-c600ac15e70c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5ab80c09-e4bd-4e0e-a8de-6864b7cef8ba" xlink:to="loc_us-gaap_ConstructionInProgressGross_59f6d837-62f5-4cbf-b2d3-c600ac15e70c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_5184a485-51b7-4bf7-976a-8384314eb4d9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_ed1324bd-6521-47d7-971f-b4a9be9bc464" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5184a485-51b7-4bf7-976a-8384314eb4d9" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_ed1324bd-6521-47d7-971f-b4a9be9bc464" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_7ed61db3-c1b9-498a-98f2-cc8916de7fcf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5184a485-51b7-4bf7-976a-8384314eb4d9" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_7ed61db3-c1b9-498a-98f2-cc8916de7fcf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_78b813f8-07d5-47fd-a9fc-9cc14148479b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_5184a485-51b7-4bf7-976a-8384314eb4d9" xlink:to="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_78b813f8-07d5-47fd-a9fc-9cc14148479b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_995113e0-5954-4ce1-8edf-2e6e53e757e4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FIFOInventoryAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_b6e99377-1980-4d0d-846f-f7f17e273c83" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_995113e0-5954-4ce1-8edf-2e6e53e757e4" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_b6e99377-1980-4d0d-846f-f7f17e273c83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_ef8ce29f-b14c-4213-899c-bb785d4c92f4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_995113e0-5954-4ce1-8edf-2e6e53e757e4" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_ef8ce29f-b14c-4213-899c-bb785d4c92f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_619356a3-65fe-4de7-87c1-10ce213d8af3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_995113e0-5954-4ce1-8edf-2e6e53e757e4" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_619356a3-65fe-4de7-87c1-10ce213d8af3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_98ce0af2-e6e1-41d5-a383-e650c3cb655a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_94ceaf17-8094-4c57-aa79-022463901990" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_98ce0af2-e6e1-41d5-a383-e650c3cb655a" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_94ceaf17-8094-4c57-aa79-022463901990" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_73b196c4-a136-495f-9107-1559c56203af" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_98ce0af2-e6e1-41d5-a383-e650c3cb655a" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_73b196c4-a136-495f-9107-1559c56203af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_a554a6cc-5d88-4fcb-a2f6-18045b2e1f9b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_98ce0af2-e6e1-41d5-a383-e650c3cb655a" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_a554a6cc-5d88-4fcb-a2f6-18045b2e1f9b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousAssetsNonCurrent_9e62a1d3-e3cf-49c9-a9b3-c6fdfadf50e9" xlink:href="hsy-20211231.xsd#hsy_OtherMiscellaneousAssetsNonCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_98ce0af2-e6e1-41d5-a383-e650c3cb655a" xlink:to="loc_hsy_OtherMiscellaneousAssetsNonCurrent_9e62a1d3-e3cf-49c9-a9b3-c6fdfadf50e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalizedComputerSoftwareNet_414fc573-5569-444b-a1c8-877c717f605a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_98ce0af2-e6e1-41d5-a383-e650c3cb655a" xlink:to="loc_us-gaap_CapitalizedComputerSoftwareNet_414fc573-5569-444b-a1c8-877c717f605a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_ff4ea8bf-f530-4739-8023-8a0bbc300b16" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_e22822c0-5605-4f25-ab4b-2d9d59d66542" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ff4ea8bf-f530-4739-8023-8a0bbc300b16" xlink:to="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_e22822c0-5605-4f25-ab4b-2d9d59d66542" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_553efa8d-ed82-44b8-889e-2b59bf1732bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ff4ea8bf-f530-4739-8023-8a0bbc300b16" xlink:to="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_553efa8d-ed82-44b8-889e-2b59bf1732bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_ad187252-787b-4d2f-961a-19e4a17e6db8" xlink:href="hsy-20211231.xsd#hsy_OtherMiscellaneousLiabilitiesNonCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_ff4ea8bf-f530-4739-8023-8a0bbc300b16" xlink:to="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_ad187252-787b-4d2f-961a-19e4a17e6db8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_a265169a-df95-4382-a61e-7c94eb07f32f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_ff4ea8bf-f530-4739-8023-8a0bbc300b16" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_a265169a-df95-4382-a61e-7c94eb07f32f" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
