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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:069a08f4-39ed-4a95-9a27-cbc862a0545b,g:f4c452e7-7320-4da1-a969-162c5b061ea9-->
<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-20220703.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_NetIncomeLoss_c55ce3a1-4a5c-4450-93f2-e25d369275a0" 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_367c8970-657b-4315-b623-1e8165f94b8a" 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_c55ce3a1-4a5c-4450-93f2-e25d369275a0" xlink:to="loc_us-gaap_ProfitLoss_367c8970-657b-4315-b623-1e8165f94b8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_b2f39906-57cc-456d-bdd6-6bbc03f0ae75" 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_c55ce3a1-4a5c-4450-93f2-e25d369275a0" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_b2f39906-57cc-456d-bdd6-6bbc03f0ae75" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_00aa205a-69df-420c-a476-c51a70642179" 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_17b25ed6-d5e9-473b-8b23-044243a5ea71" 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_00aa205a-69df-420c-a476-c51a70642179" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_17b25ed6-d5e9-473b-8b23-044243a5ea71" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_d43329f6-0371-4498-8377-b2b8fec24caa" 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_00aa205a-69df-420c-a476-c51a70642179" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_d43329f6-0371-4498-8377-b2b8fec24caa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_743939dc-e63a-4e7b-b2f3-076bd33dafc2" 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_OperatingIncomeLoss_29ef351b-9db8-4933-a38d-4ddd1f65eeb4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_743939dc-e63a-4e7b-b2f3-076bd33dafc2" xlink:to="loc_us-gaap_OperatingIncomeLoss_29ef351b-9db8-4933-a38d-4ddd1f65eeb4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_a5402d20-d41f-4212-a2ea-50768da8b65a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_743939dc-e63a-4e7b-b2f3-076bd33dafc2" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_a5402d20-d41f-4212-a2ea-50768da8b65a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_7d85da40-92d2-465c-b1fc-c252cb2173a4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_743939dc-e63a-4e7b-b2f3-076bd33dafc2" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_7d85da40-92d2-465c-b1fc-c252cb2173a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_3c504e35-1d67-4585-92fb-efaa78f2eb04" 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_GrossProfit_38a4a4c9-8124-4b71-911a-fab34c8731b8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_3c504e35-1d67-4585-92fb-efaa78f2eb04" xlink:to="loc_us-gaap_GrossProfit_38a4a4c9-8124-4b71-911a-fab34c8731b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_db8caea9-cac4-4bd6-9d6b-5c4a551fe73e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_3c504e35-1d67-4585-92fb-efaa78f2eb04" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_db8caea9-cac4-4bd6-9d6b-5c4a551fe73e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_52ba59cb-de4a-4dbf-8778-ce6b175a6fa6" xlink:href="hsy-20220703.xsd#hsy_RestructuringChargesBusinessRealignment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_3c504e35-1d67-4585-92fb-efaa78f2eb04" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_52ba59cb-de4a-4dbf-8778-ce6b175a6fa6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_b8be4e58-cb91-450c-aa3e-cfa0d7a015eb" 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_a57feebc-cc61-4574-b58f-6c23be83f654" 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_b8be4e58-cb91-450c-aa3e-cfa0d7a015eb" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_a57feebc-cc61-4574-b58f-6c23be83f654" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_eabea89f-5ad3-4dd8-b0be-b751f2aa5586" 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_b8be4e58-cb91-450c-aa3e-cfa0d7a015eb" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_eabea89f-5ad3-4dd8-b0be-b751f2aa5586" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="simple" xlink:href="hsy-20220703.xsd#CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_0e0f43ed-89ff-41c0-b6dd-3c0eed839ac8" 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_2149f26c-131f-484c-9be3-5dc882817e2c" 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_0e0f43ed-89ff-41c0-b6dd-3c0eed839ac8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_2149f26c-131f-484c-9be3-5dc882817e2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_e3daed64-ab4c-46df-a29c-2066a8209740" 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_0e0f43ed-89ff-41c0-b6dd-3c0eed839ac8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_e3daed64-ab4c-46df-a29c-2066a8209740" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_c2ee23cc-3141-4bd1-ad65-7c3e4105b1c9" 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_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_483020c0-224c-4fc5-bea9-d90329a64cf1" xlink:href="hsy-20220703.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_c2ee23cc-3141-4bd1-ad65-7c3e4105b1c9" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_483020c0-224c-4fc5-bea9-d90329a64cf1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_e1bd2b31-0d12-48d5-bfb3-3420f2927206" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_c2ee23cc-3141-4bd1-ad65-7c3e4105b1c9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_e1bd2b31-0d12-48d5-bfb3-3420f2927206" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_95017fa3-cd3c-4af9-9327-99e5e386a05e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_c2ee23cc-3141-4bd1-ad65-7c3e4105b1c9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_95017fa3-cd3c-4af9-9327-99e5e386a05e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_e9f01491-83a1-4750-81f0-da02c3d586bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_c2ee23cc-3141-4bd1-ad65-7c3e4105b1c9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_e9f01491-83a1-4750-81f0-da02c3d586bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_875737dd-7fc3-4592-89a5-eeef2dbd4455" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_c2ee23cc-3141-4bd1-ad65-7c3e4105b1c9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_875737dd-7fc3-4592-89a5-eeef2dbd4455" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_318ce172-d18f-4b88-9693-583e34a944ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_c2ee23cc-3141-4bd1-ad65-7c3e4105b1c9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_318ce172-d18f-4b88-9693-583e34a944ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_66db5f32-cc88-48a4-82e3-84774f6a61f8" 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_2648872f-90ae-4797-9dc7-c9531d1497a6" 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_66db5f32-cc88-48a4-82e3-84774f6a61f8" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_2648872f-90ae-4797-9dc7-c9531d1497a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest_e2030a36-3e9b-4ba0-a9b6-cfb89bb551f6" 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_66db5f32-cc88-48a4-82e3-84774f6a61f8" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest_e2030a36-3e9b-4ba0-a9b6-cfb89bb551f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_4121e29c-7c4a-4584-a694-974af0216da6" 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_59a720eb-cc12-427b-a058-2221e5566230" 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_4121e29c-7c4a-4584-a694-974af0216da6" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_59a720eb-cc12-427b-a058-2221e5566230" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_db623c6f-040b-4556-94a8-58b1f915e6d3" 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_4121e29c-7c4a-4584-a694-974af0216da6" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_db623c6f-040b-4556-94a8-58b1f915e6d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_39ae7081-5608-42bc-b288-c762ad75b1ab" xlink:href="hsy-20220703.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_72eafbfd-07f5-435d-b9d9-56397578c2b6" xlink:href="hsy-20220703.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_39ae7081-5608-42bc-b288-c762ad75b1ab" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_72eafbfd-07f5-435d-b9d9-56397578c2b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_ea1076af-05d6-48a3-915c-fca62104dcb2" xlink:href="hsy-20220703.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationNetOfTax_39ae7081-5608-42bc-b288-c762ad75b1ab" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_ea1076af-05d6-48a3-915c-fca62104dcb2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_287b75b5-6c54-400a-8ead-3d71d72faf25" 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_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_b8afce63-c368-4edc-8894-750bfb2234c3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_287b75b5-6c54-400a-8ead-3d71d72faf25" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_b8afce63-c368-4edc-8894-750bfb2234c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_3d586b4b-0faa-44dd-8fb3-c348d268a3fd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_287b75b5-6c54-400a-8ead-3d71d72faf25" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_3d586b4b-0faa-44dd-8fb3-c348d268a3fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_9d2892a2-9ec6-4d9d-9155-5b19f73a2967" 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_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_0c375d27-6a04-4a74-a3be-e089fc65228b" 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_OtherComprehensiveIncomeLossBeforeTax_9d2892a2-9ec6-4d9d-9155-5b19f73a2967" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_0c375d27-6a04-4a74-a3be-e089fc65228b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_c0dad4e2-9879-4191-bbf1-5c52eafd196c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_9d2892a2-9ec6-4d9d-9155-5b19f73a2967" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_c0dad4e2-9879-4191-bbf1-5c52eafd196c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_b6dfb55e-014d-428f-a96c-802332fc5e5c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_9d2892a2-9ec6-4d9d-9155-5b19f73a2967" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_b6dfb55e-014d-428f-a96c-802332fc5e5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_6390c432-017e-4c4b-8281-fe8e9ffd8e62" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_9d2892a2-9ec6-4d9d-9155-5b19f73a2967" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_6390c432-017e-4c4b-8281-fe8e9ffd8e62" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_78cf31c9-7aff-4ddb-8c6d-50fc3afabf6e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_9d2892a2-9ec6-4d9d-9155-5b19f73a2967" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_78cf31c9-7aff-4ddb-8c6d-50fc3afabf6e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_b99b8a98-2b09-484b-95bf-42380591b276" xlink:href="hsy-20220703.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_9d2892a2-9ec6-4d9d-9155-5b19f73a2967" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationBeforeTax_b99b8a98-2b09-484b-95bf-42380591b276" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_69ab37ac-7267-4928-9804-33153b967e84" 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_b3cac017-d20c-4eac-9d97-0de36fb580b2" 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_69ab37ac-7267-4928-9804-33153b967e84" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_b3cac017-d20c-4eac-9d97-0de36fb580b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_2a27857b-a5ad-46bb-b9dd-c0f32b28b3f9" 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_69ab37ac-7267-4928-9804-33153b967e84" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_2a27857b-a5ad-46bb-b9dd-c0f32b28b3f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_53117bd6-a77f-4068-96ed-29803e273b08" 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_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_c31f194d-5ef9-4663-960c-651e8703f40a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_53117bd6-a77f-4068-96ed-29803e273b08" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_c31f194d-5ef9-4663-960c-651e8703f40a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_e7e4a2c9-ed03-4b75-a85b-ad92747bfcb9" 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_OtherComprehensiveIncomeLossTax_53117bd6-a77f-4068-96ed-29803e273b08" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_e7e4a2c9-ed03-4b75-a85b-ad92747bfcb9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_b80a0bd2-667a-4797-b9b1-5fb21c80b9e9" xlink:href="hsy-20220703.xsd#hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_53117bd6-a77f-4068-96ed-29803e273b08" xlink:to="loc_hsy_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationReclassificationAdjustmentToEarningsRealizedUponSaleOrLiquidationTax_b80a0bd2-667a-4797-b9b1-5fb21c80b9e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_11ea10a9-2b15-425a-ae06-e849585335df" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_53117bd6-a77f-4068-96ed-29803e273b08" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_11ea10a9-2b15-425a-ae06-e849585335df" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_80d82a56-1b81-4103-a8cb-ba981402733e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_53117bd6-a77f-4068-96ed-29803e273b08" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_80d82a56-1b81-4103-a8cb-ba981402733e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_addb3226-fdaa-4c62-a71c-edec0c36f767" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_53117bd6-a77f-4068-96ed-29803e273b08" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_addb3226-fdaa-4c62-a71c-edec0c36f767" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_d1875c7c-4f4a-43bb-926f-c6044852747e" 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_f4d734e4-eaf8-45b3-97c9-63aeb7daa736" 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_d1875c7c-4f4a-43bb-926f-c6044852747e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_f4d734e4-eaf8-45b3-97c9-63aeb7daa736" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_97df5fde-4faf-4600-ad39-0f58316ae344" 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_d1875c7c-4f4a-43bb-926f-c6044852747e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_97df5fde-4faf-4600-ad39-0f58316ae344" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="hsy-20220703.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_AssetsCurrent_70218201-54ab-4993-9495-213e841df561" 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_5afa7a67-8c3a-4ac8-876e-530d0d588ba5" 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_70218201-54ab-4993-9495-213e841df561" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_5afa7a67-8c3a-4ac8-876e-530d0d588ba5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_0420c7a6-0c18-42ee-bdec-654377e171da" 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_70218201-54ab-4993-9495-213e841df561" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_0420c7a6-0c18-42ee-bdec-654377e171da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_b5e9880c-ddc9-4bdd-9465-822aae977f3b" 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_70218201-54ab-4993-9495-213e841df561" xlink:to="loc_us-gaap_InventoryNet_b5e9880c-ddc9-4bdd-9465-822aae977f3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_02155add-6433-43c3-9bfd-a517229f2c12" 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_70218201-54ab-4993-9495-213e841df561" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_02155add-6433-43c3-9bfd-a517229f2c12" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_294101c7-85a6-4648-a418-800014d07f6f" 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_24339a4d-4ab9-46d5-a549-5309e837d286" 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_294101c7-85a6-4648-a418-800014d07f6f" xlink:to="loc_us-gaap_LiabilitiesCurrent_24339a4d-4ab9-46d5-a549-5309e837d286" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_ee0ba8c8-b5a1-4970-a9f3-6bd30bb00dfd" 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_294101c7-85a6-4648-a418-800014d07f6f" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_ee0ba8c8-b5a1-4970-a9f3-6bd30bb00dfd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_24570478-34b1-4131-8263-fca22e3e2925" 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_294101c7-85a6-4648-a418-800014d07f6f" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_24570478-34b1-4131-8263-fca22e3e2925" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_0f630a46-a01b-41aa-8bb8-511bf558aae1" 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_294101c7-85a6-4648-a418-800014d07f6f" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_0f630a46-a01b-41aa-8bb8-511bf558aae1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_3e240095-2fc8-4a85-8ab8-c521269bb8c3" 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_3e3088a5-9150-4e1f-9ee4-a082664fc797" 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_3e240095-2fc8-4a85-8ab8-c521269bb8c3" xlink:to="loc_us-gaap_AssetsCurrent_3e3088a5-9150-4e1f-9ee4-a082664fc797" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_3e78a750-3b2c-47df-a6c7-1b8fcc001972" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_3e240095-2fc8-4a85-8ab8-c521269bb8c3" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_3e78a750-3b2c-47df-a6c7-1b8fcc001972" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_9c583dad-5dfa-4fc5-805a-1e12d201ae14" 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_3e240095-2fc8-4a85-8ab8-c521269bb8c3" xlink:to="loc_us-gaap_Goodwill_9c583dad-5dfa-4fc5-805a-1e12d201ae14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_542beb14-612a-4cb6-bccd-f39a9922f437" 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_3e240095-2fc8-4a85-8ab8-c521269bb8c3" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_542beb14-612a-4cb6-bccd-f39a9922f437" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_a38d3346-7941-4ad4-9a5f-84012f1a2c4a" 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_3e240095-2fc8-4a85-8ab8-c521269bb8c3" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_a38d3346-7941-4ad4-9a5f-84012f1a2c4a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_8094c242-6ccf-4dac-8b8b-8377e141c0ef" 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_3e240095-2fc8-4a85-8ab8-c521269bb8c3" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_8094c242-6ccf-4dac-8b8b-8377e141c0ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_cd00c181-78cf-4cf5-aca6-a72522d9a444" 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_f09816fb-7cdd-40ce-98d8-89326a1a59d0" 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_cd00c181-78cf-4cf5-aca6-a72522d9a444" xlink:to="loc_us-gaap_AccountsPayableCurrent_f09816fb-7cdd-40ce-98d8-89326a1a59d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_e51c81d2-190c-4aa6-8fb5-f0802f23d860" 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_cd00c181-78cf-4cf5-aca6-a72522d9a444" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_e51c81d2-190c-4aa6-8fb5-f0802f23d860" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_944ece35-b7e8-434c-93bc-76593607d26f" 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_cd00c181-78cf-4cf5-aca6-a72522d9a444" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_944ece35-b7e8-434c-93bc-76593607d26f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_e784de82-eba8-431c-a041-2a042a61f1dd" 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_cd00c181-78cf-4cf5-aca6-a72522d9a444" xlink:to="loc_us-gaap_ShortTermBorrowings_e784de82-eba8-431c-a041-2a042a61f1dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_77fc8b25-e3e8-4b67-9ad9-dc9bc3f77fd2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_cd00c181-78cf-4cf5-aca6-a72522d9a444" xlink:to="loc_us-gaap_LongTermDebtCurrent_77fc8b25-e3e8-4b67-9ad9-dc9bc3f77fd2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_8add90c2-fcee-462f-a2d6-b7cb42b7033c" 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_02be62f2-14d0-4ce1-96d5-fb815d0cd0ef" 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_8add90c2-fcee-462f-a2d6-b7cb42b7033c" xlink:to="loc_us-gaap_Liabilities_02be62f2-14d0-4ce1-96d5-fb815d0cd0ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_6fc7541c-8f2e-485c-a095-ee01ed447821" 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_8add90c2-fcee-462f-a2d6-b7cb42b7033c" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_6fc7541c-8f2e-485c-a095-ee01ed447821" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_ab1303b8-c29b-4720-a6be-70401dda5fb7" 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_AdditionalPaidInCapital_a091babb-5d93-43a8-9568-1433fa2bba6b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_ab1303b8-c29b-4720-a6be-70401dda5fb7" xlink:to="loc_us-gaap_AdditionalPaidInCapital_a091babb-5d93-43a8-9568-1433fa2bba6b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_c4f98317-a748-4abc-ac21-edf307f0f589" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_ab1303b8-c29b-4720-a6be-70401dda5fb7" xlink:to="loc_us-gaap_CommonStockValue_c4f98317-a748-4abc-ac21-edf307f0f589" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_74a66bcc-a581-4f82-bdc5-b8af74847a4a" 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_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_ab1303b8-c29b-4720-a6be-70401dda5fb7" xlink:to="loc_us-gaap_TreasuryStockValue_74a66bcc-a581-4f82-bdc5-b8af74847a4a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_ec9c4c2f-1916-4c29-bd08-0de3890ca954" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_ab1303b8-c29b-4720-a6be-70401dda5fb7" xlink:to="loc_us-gaap_PreferredStockValue_ec9c4c2f-1916-4c29-bd08-0de3890ca954" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a3eb2d94-f7ed-4c93-9ce6-30e8cc999686" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_ab1303b8-c29b-4720-a6be-70401dda5fb7" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a3eb2d94-f7ed-4c93-9ce6-30e8cc999686" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_2656ff94-a3c6-4293-b742-e4b2229d52fa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_ab1303b8-c29b-4720-a6be-70401dda5fb7" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_2656ff94-a3c6-4293-b742-e4b2229d52fa" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="hsy-20220703.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWS"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_ff471d4f-4563-40ed-bc8c-cf87f3a949aa" 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_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_6b0c2019-a796-4ef8-a83f-d5e234e0fa87" xlink:href="hsy-20220703.xsd#hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_ff471d4f-4563-40ed-bc8c-cf87f3a949aa" xlink:to="loc_hsy_CashCashEquivalentsRestrictedCashandRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffectandCashClassifiedasHeldforSale_6b0c2019-a796-4ef8-a83f-d5e234e0fa87" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_CashandCashEquivalentsClassifiedasHeldforSaleIncreaseDecrease_fea9565f-f2a7-4862-bfbd-5461670c9e2c" xlink:href="hsy-20220703.xsd#hsy_CashandCashEquivalentsClassifiedasHeldforSaleIncreaseDecrease"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_ff471d4f-4563-40ed-bc8c-cf87f3a949aa" xlink:to="loc_hsy_CashandCashEquivalentsClassifiedasHeldforSaleIncreaseDecrease_fea9565f-f2a7-4862-bfbd-5461670c9e2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" 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_f311ea6a-f34f-4352-a769-b89fa72deb3c" 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_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_ProfitLoss_f311ea6a-f34f-4352-a769-b89fa72deb3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_58182a69-6047-407a-bc66-70fe2582e562" 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_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_58182a69-6047-407a-bc66-70fe2582e562" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_57be98e7-b43c-4b0e-9b53-4fb69a3ebfcf" 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_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_ShareBasedCompensation_57be98e7-b43c-4b0e-9b53-4fb69a3ebfcf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_f10c67f9-c8a4-4e8f-a236-fdd9a3cb4866" 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_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_f10c67f9-c8a4-4e8f-a236-fdd9a3cb4866" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_a5819550-d5e8-4ebb-86f3-05f0f284b62e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_a5819550-d5e8-4ebb-86f3-05f0f284b62e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_92c327fe-9333-4c90-b152-d4d063fef31a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_92c327fe-9333-4c90-b152-d4d063fef31a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_57decfb5-398e-4587-ad54-c2abb468f843" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_57decfb5-398e-4587-ad54-c2abb468f843" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_110ca883-a300-4f64-9df0-25d7cf99ac8e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_110ca883-a300-4f64-9df0-25d7cf99ac8e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_5276f075-32f2-4d4e-9839-d36194218082" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_5276f075-32f2-4d4e-9839-d36194218082" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_a66d2a0c-3467-4572-a23b-55b72aac4a20" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_a66d2a0c-3467-4572-a23b-55b72aac4a20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_a63e8924-789e-462c-a01d-807ed0ade4ee" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedTaxesPayable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_a63e8924-789e-462c-a01d-807ed0ade4ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_8a9598f9-94e8-4731-925a-641a53e6602f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PensionAndOtherPostretirementBenefitContributions"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_8a9598f9-94e8-4731-925a-641a53e6602f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_eb24ecad-8ed2-4ffd-8155-0d4bf4aa7f27" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_dee9f5c2-2636-4ea5-9ec6-c580deb4073a" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_eb24ecad-8ed2-4ffd-8155-0d4bf4aa7f27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c8c1aa12-a612-419a-9400-bdb7d7b99b47" 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_ProceedsFromStockOptionsExercised_46146c7d-e707-4d8e-854a-8c2b34cfef85" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c8c1aa12-a612-419a-9400-bdb7d7b99b47" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_46146c7d-e707-4d8e-854a-8c2b34cfef85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_a95d51ea-6a68-457d-a235-9a7e11dc00a4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c8c1aa12-a612-419a-9400-bdb7d7b99b47" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_a95d51ea-6a68-457d-a235-9a7e11dc00a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_d641148f-d99a-4baf-bf70-3ce2a9e078ba" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c8c1aa12-a612-419a-9400-bdb7d7b99b47" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_d641148f-d99a-4baf-bf70-3ce2a9e078ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_606a9c50-1cf7-44c7-8f49-6db03a2eea19" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c8c1aa12-a612-419a-9400-bdb7d7b99b47" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_606a9c50-1cf7-44c7-8f49-6db03a2eea19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_1875efb7-7605-451d-9f17-356ad4fffe77" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c8c1aa12-a612-419a-9400-bdb7d7b99b47" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_1875efb7-7605-451d-9f17-356ad4fffe77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_99ed8309-eb06-442a-b59b-b9a8f1aa0846" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromRepaymentsOfShortTermDebt"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c8c1aa12-a612-419a-9400-bdb7d7b99b47" xlink:to="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_99ed8309-eb06-442a-b59b-b9a8f1aa0846" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ed45d2c3-581f-48b9-b44b-5bd3faa229a8" 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_PaymentsForProceedsFromOtherInvestingActivities_dabede1d-a10e-4e6b-831d-58de2f9c59a8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsForProceedsFromOtherInvestingActivities"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ed45d2c3-581f-48b9-b44b-5bd3faa229a8" xlink:to="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_dabede1d-a10e-4e6b-831d-58de2f9c59a8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_16f898e3-c773-47f6-ae3c-5ba577585fb1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ed45d2c3-581f-48b9-b44b-5bd3faa229a8" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_16f898e3-c773-47f6-ae3c-5ba577585fb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_86d0aabc-e892-4523-a552-6028fffa3e24" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsToAcquireEquityMethodInvestments"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ed45d2c3-581f-48b9-b44b-5bd3faa229a8" xlink:to="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_86d0aabc-e892-4523-a552-6028fffa3e24" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_18ba3846-fe30-423e-ac93-dc502ca1ecd0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ed45d2c3-581f-48b9-b44b-5bd3faa229a8" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_18ba3846-fe30-423e-ac93-dc502ca1ecd0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESLILYSSWEETSLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20220703.xsd#BUSINESSACQUISITIONANDDIVESTITURESLILYSSWEETSLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESLILYSSWEETSLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" 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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_dece5946-a2c1-447e-a0be-151e1d1e0e85" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_dece5946-a2c1-447e-a0be-151e1d1e0e85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_df4a67b8-f72b-4c91-bd04-206d6dd8b280" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_Goodwill_df4a67b8-f72b-4c91-bd04-206d6dd8b280" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_ce24cc13-0fa2-41de-9f32-126d86eddeb3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_ce24cc13-0fa2-41de-9f32-126d86eddeb3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_f9a44c99-8c11-4873-a6d2-0c8f6bd2cb87" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_f9a44c99-8c11-4873-a6d2-0c8f6bd2cb87" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_97152814-1dfd-4325-8569-c50a6478f468" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_97152814-1dfd-4325-8569-c50a6478f468" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_f78ac020-f29e-4348-9a52-c2b3bae50308" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_f78ac020-f29e-4348-9a52-c2b3bae50308" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_5bb92ae5-ccff-4a2e-97bf-81c98be618a2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_5bb92ae5-ccff-4a2e-97bf-81c98be618a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_02f4ad3b-2464-4be6-b407-f00e42bcb493" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_02f4ad3b-2464-4be6-b407-f00e42bcb493" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_bdc667d6-cb9a-4cf1-a1a4-2d81cec731d3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_bdc667d6-cb9a-4cf1-a1a4-2d81cec731d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_c7e6b356-c464-46b7-943d-88c7104fc107" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_c7e6b356-c464-46b7-943d-88c7104fc107" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_4a37081c-e723-4561-ad67-47a7c404c839" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_872d4a64-ba52-4ada-81bb-d1fa6935c584" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_4a37081c-e723-4561-ad67-47a7c404c839" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="simple" xlink:href="hsy-20220703.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_1772f30f-053a-474c-a1e3-44dc0c6090fe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_7550412d-54dc-4149-8b46-6e84eed1e2fd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_1772f30f-053a-474c-a1e3-44dc0c6090fe" xlink:to="loc_us-gaap_LongTermDebtCurrent_7550412d-54dc-4149-8b46-6e84eed1e2fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_165a3451-e863-4072-9950-1c4eadd57b1b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_1772f30f-053a-474c-a1e3-44dc0c6090fe" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_165a3451-e863-4072-9950-1c4eadd57b1b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20220703.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_60b23eec-1dc6-4f17-b123-907215bfa84c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_95539d12-1513-41d3-92ab-5afafb6c10d4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_60b23eec-1dc6-4f17-b123-907215bfa84c" xlink:to="loc_us-gaap_InterestExpense_95539d12-1513-41d3-92ab-5afafb6c10d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_9b4d7560-338b-4a60-8901-b639fe685f6d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_60b23eec-1dc6-4f17-b123-907215bfa84c" xlink:to="loc_us-gaap_InvestmentIncomeInterest_9b4d7560-338b-4a60-8901-b639fe685f6d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_e0f75fc3-1b27-4429-b0b8-57485df45d3f" 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_InterestExpenseDebt_273c7e31-e723-4f37-867b-7a4b4c0ee703" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpenseDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_e0f75fc3-1b27-4429-b0b8-57485df45d3f" xlink:to="loc_us-gaap_InterestExpenseDebt_273c7e31-e723-4f37-867b-7a4b4c0ee703" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestCostsCapitalizedAdjustment_6aa996cc-97ab-46dc-8821-536403027c58" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestCostsCapitalizedAdjustment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_e0f75fc3-1b27-4429-b0b8-57485df45d3f" xlink:to="loc_us-gaap_InterestCostsCapitalizedAdjustment_6aa996cc-97ab-46dc-8821-536403027c58" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFCOMPONENETSOFLEASEEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20220703.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_f0a9f253-82f8-4bc0-aecd-c594ba6ae8cd" 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_2f6b12bb-f1e4-4800-9c23-811515f54c86" 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_f0a9f253-82f8-4bc0-aecd-c594ba6ae8cd" xlink:to="loc_us-gaap_OperatingLeaseCost_2f6b12bb-f1e4-4800-9c23-811515f54c86" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_0af7975d-5697-4e6f-ba92-ca93f9ac9e4c" 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_f0a9f253-82f8-4bc0-aecd-c594ba6ae8cd" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_0af7975d-5697-4e6f-ba92-ca93f9ac9e4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseInterestExpense_4c166487-9ffa-4e06-a33c-a80b0b1034c9" 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_f0a9f253-82f8-4bc0-aecd-c594ba6ae8cd" xlink:to="loc_us-gaap_FinanceLeaseInterestExpense_4c166487-9ffa-4e06-a33c-a80b0b1034c9" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="simple" xlink:href="hsy-20220703.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_bce2f16c-74ba-4282-be56-70c5c33213b3" xlink:href="hsy-20220703.xsd#hsy_LeaseRightofUseAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_8012c2be-8671-499c-b97e-acb58a63674f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_bce2f16c-74ba-4282-be56-70c5c33213b3" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_8012c2be-8671-499c-b97e-acb58a63674f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_6e477d63-54a5-4c7d-a571-fb08273e8817" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_bce2f16c-74ba-4282-be56-70c5c33213b3" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_6e477d63-54a5-4c7d-a571-fb08273e8817" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseLiability_32ff3498-d2f8-4dd6-8030-50b880fd6cab" xlink:href="hsy-20220703.xsd#hsy_LeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_15f58815-044d-4c99-9745-c4164caaf764" 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_32ff3498-d2f8-4dd6-8030-50b880fd6cab" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_15f58815-044d-4c99-9745-c4164caaf764" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_ca84df49-a525-4215-9ac5-7bfdd5551d8a" 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_32ff3498-d2f8-4dd6-8030-50b880fd6cab" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_ca84df49-a525-4215-9ac5-7bfdd5551d8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_aeb8e06d-7ed1-440b-8d6a-e98cfec6ca47" 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_32ff3498-d2f8-4dd6-8030-50b880fd6cab" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_aeb8e06d-7ed1-440b-8d6a-e98cfec6ca47" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_acec332f-953f-4846-96f4-44f425702cbd" 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_32ff3498-d2f8-4dd6-8030-50b880fd6cab" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_acec332f-953f-4846-96f4-44f425702cbd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="simple" xlink:href="hsy-20220703.xsd#LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_b233425f-a98b-4790-9a7b-e43b9c095fe4" 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_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_536088ca-8772-4309-ae17-79147a704e35" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_b233425f-a98b-4790-9a7b-e43b9c095fe4" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_536088ca-8772-4309-ae17-79147a704e35" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_a58ee95d-bf71-4dd0-b120-15aee9ddab8f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_b233425f-a98b-4790-9a7b-e43b9c095fe4" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_a58ee95d-bf71-4dd0-b120-15aee9ddab8f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_ba5cd370-dffd-47e1-b6fb-fe9b29fd0bc4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_b233425f-a98b-4790-9a7b-e43b9c095fe4" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_ba5cd370-dffd-47e1-b6fb-fe9b29fd0bc4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_292df56a-72d6-4ebe-8c68-2d41d1655e48" 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_b233425f-a98b-4790-9a7b-e43b9c095fe4" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_292df56a-72d6-4ebe-8c68-2d41d1655e48" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_91404c97-19ee-417b-98fa-8b3e1906f46f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_b233425f-a98b-4790-9a7b-e43b9c095fe4" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_91404c97-19ee-417b-98fa-8b3e1906f46f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_24d91856-fce0-4ff2-bf16-f6e26a223fcd" xlink:href="hsy-20220703.xsd#hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_b233425f-a98b-4790-9a7b-e43b9c095fe4" xlink:to="loc_hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_24d91856-fce0-4ff2-bf16-f6e26a223fcd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_a8d72bbd-d4a4-4f36-9797-558c185e8eea" 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_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear_37ce4698-4ab3-4aa4-9898-507ff4d89801" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_a8d72bbd-d4a4-4f36-9797-558c185e8eea" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear_37ce4698-4ab3-4aa4-9898-507ff4d89801" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_16fcff15-1cbb-4f5e-b7f4-e877be55293e" 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_a8d72bbd-d4a4-4f36-9797-558c185e8eea" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_16fcff15-1cbb-4f5e-b7f4-e877be55293e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_a7fc487c-bc8b-4fba-9712-eeb8f00572b2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_a8d72bbd-d4a4-4f36-9797-558c185e8eea" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_a7fc487c-bc8b-4fba-9712-eeb8f00572b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_ca9785b9-6876-4ef5-a2ff-f90f9c44a6b6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_a8d72bbd-d4a4-4f36-9797-558c185e8eea" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_ca9785b9-6876-4ef5-a2ff-f90f9c44a6b6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_310f3f44-e438-4072-a12b-2de39727b7a7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_a8d72bbd-d4a4-4f36-9797-558c185e8eea" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_310f3f44-e438-4072-a12b-2de39727b7a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_FinancingLeaseLiabilityToBePaidAfterYearFour_8a3eaada-152f-4798-870a-102d1f0d2e79" xlink:href="hsy-20220703.xsd#hsy_FinancingLeaseLiabilityToBePaidAfterYearFour"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_a8d72bbd-d4a4-4f36-9797-558c185e8eea" xlink:to="loc_hsy_FinancingLeaseLiabilityToBePaidAfterYearFour_8a3eaada-152f-4798-870a-102d1f0d2e79" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_43ab457d-4427-4665-bc74-5cdb5c50c9c4" xlink:href="hsy-20220703.xsd#hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_1481a391-aec4-46a3-b1f5-709cbd4b0997" xlink:href="hsy-20220703.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_43ab457d-4427-4665-bc74-5cdb5c50c9c4" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_1481a391-aec4-46a3-b1f5-709cbd4b0997" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_5d29a070-9c12-47d0-8543-2f9e03ea8592" xlink:href="hsy-20220703.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_43ab457d-4427-4665-bc74-5cdb5c50c9c4" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_5d29a070-9c12-47d0-8543-2f9e03ea8592" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear_65e99bd9-0bca-458e-8fa4-95454eb29a98" xlink:href="hsy-20220703.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_43ab457d-4427-4665-bc74-5cdb5c50c9c4" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear_65e99bd9-0bca-458e-8fa4-95454eb29a98" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour_0e8e3bf6-3737-4fac-94e1-20b60c42f340" xlink:href="hsy-20220703.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_43ab457d-4427-4665-bc74-5cdb5c50c9c4" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour_0e8e3bf6-3737-4fac-94e1-20b60c42f340" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_298889b0-7b22-4c20-9ff4-e2279e1e5925" xlink:href="hsy-20220703.xsd#hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_43ab457d-4427-4665-bc74-5cdb5c50c9c4" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_298889b0-7b22-4c20-9ff4-e2279e1e5925" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_eec85dfe-c386-40a6-81f8-3b5fdf186656" xlink:href="hsy-20220703.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_43ab457d-4427-4665-bc74-5cdb5c50c9c4" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_eec85dfe-c386-40a6-81f8-3b5fdf186656" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="simple" xlink:href="hsy-20220703.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efdfaed8-ce89-4aba-a528-53a8fa077b69" 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_DefinedBenefitPlanInterestCost_6c5b8e70-4648-4837-8acf-5b1d1efe3faf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efdfaed8-ce89-4aba-a528-53a8fa077b69" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_6c5b8e70-4648-4837-8acf-5b1d1efe3faf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_94056c1f-b940-4b80-911e-754f34eb33fe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efdfaed8-ce89-4aba-a528-53a8fa077b69" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_94056c1f-b940-4b80-911e-754f34eb33fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_d5c22050-9137-43f9-b827-0f114bc802cb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efdfaed8-ce89-4aba-a528-53a8fa077b69" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_d5c22050-9137-43f9-b827-0f114bc802cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_b07ac5fa-4370-4b82-b0fb-6473277aaabf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efdfaed8-ce89-4aba-a528-53a8fa077b69" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_b07ac5fa-4370-4b82-b0fb-6473277aaabf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_2779e876-bab9-4e5f-913a-a0990cf57a42" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efdfaed8-ce89-4aba-a528-53a8fa077b69" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_2779e876-bab9-4e5f-913a-a0990cf57a42" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_b6d48c76-e4ef-4320-8a66-4b8db31b9b8f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_efdfaed8-ce89-4aba-a528-53a8fa077b69" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_b6d48c76-e4ef-4320-8a66-4b8db31b9b8f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="simple" xlink:href="hsy-20220703.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_3b25a93e-1352-4d9e-8ab8-5dabeb0a5d2e" 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_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_07c361e3-494f-4e79-89c2-5f5b90f47634" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_3b25a93e-1352-4d9e-8ab8-5dabeb0a5d2e" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_07c361e3-494f-4e79-89c2-5f5b90f47634" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_61e323b7-2770-45cb-b8e2-7277e3901d5b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_3b25a93e-1352-4d9e-8ab8-5dabeb0a5d2e" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_61e323b7-2770-45cb-b8e2-7277e3901d5b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DistributedEarnings_9eadecc3-1eea-41a7-b780-63576550d6d1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DistributedEarnings"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_3b25a93e-1352-4d9e-8ab8-5dabeb0a5d2e" xlink:to="loc_us-gaap_DistributedEarnings_9eadecc3-1eea-41a7-b780-63576550d6d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_89c26453-c9e6-40f4-9c13-99276f0035ff" 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_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_13bdfad0-b196-41dc-903a-a6ed8b6b147b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_89c26453-c9e6-40f4-9c13-99276f0035ff" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_13bdfad0-b196-41dc-903a-a6ed8b6b147b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Dividends_1c51910f-10b1-4e27-a2e7-d8f220e32771" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Dividends"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_89c26453-c9e6-40f4-9c13-99276f0035ff" xlink:to="loc_us-gaap_Dividends_1c51910f-10b1-4e27-a2e7-d8f220e32771" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/OTHERINCOMEEXPENSENETSCHEDULEOFOTHERINCOMEANDEXPENSENETDetails" xlink:type="simple" xlink:href="hsy-20220703.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_cc1e28c5-6b5e-419a-92a6-d00a4873e9f6" 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_9aee2cb9-9527-456c-bd25-287d4bd00831" 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_cc1e28c5-6b5e-419a-92a6-d00a4873e9f6" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_9aee2cb9-9527-456c-bd25-287d4bd00831" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DefinedBenefitPlanNonServiceCost_e2d888f0-463f-4ac1-9aeb-554a6e9a0fbb" xlink:href="hsy-20220703.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_cc1e28c5-6b5e-419a-92a6-d00a4873e9f6" xlink:to="loc_hsy_DefinedBenefitPlanNonServiceCost_e2d888f0-463f-4ac1-9aeb-554a6e9a0fbb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherNonoperatingGainLoss_2dba1c86-227a-40ab-9aa7-940113da559b" xlink:href="hsy-20220703.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_cc1e28c5-6b5e-419a-92a6-d00a4873e9f6" xlink:to="loc_hsy_OtherNonoperatingGainLoss_2dba1c86-227a-40ab-9aa7-940113da559b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SUPPLEMENTALBALANCESHEETINFORMATIONSCHEDULEOFSUPPLEMENTALBALANCESHEETINFORMATIONDetails" xlink:type="simple" xlink:href="hsy-20220703.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_AccumulatedOtherComprehensiveIncomeLossNetOfTax_68de6ee4-b289-424b-bb3c-7a84b20df7b8" 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_c2c6407e-caa7-4b32-8df7-8cc14fed07b8" 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_68de6ee4-b289-424b-bb3c-7a84b20df7b8" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_c2c6407e-caa7-4b32-8df7-8cc14fed07b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_dcc4ba46-c5a1-4874-aeef-b1f0395457ae" 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_68de6ee4-b289-424b-bb3c-7a84b20df7b8" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_dcc4ba46-c5a1-4874-aeef-b1f0395457ae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_6a875ac2-19ca-4563-84cb-fc95f45fd525" 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_68de6ee4-b289-424b-bb3c-7a84b20df7b8" xlink:to="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_6a875ac2-19ca-4563-84cb-fc95f45fd525" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_d355b2db-5a00-440a-951d-586a0402cf81" 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_fd3125cc-39b7-4bba-bd75-62d82e305d19" 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_d355b2db-5a00-440a-951d-586a0402cf81" xlink:to="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_fd3125cc-39b7-4bba-bd75-62d82e305d19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_b678a3c8-fd02-4f75-bfd5-6a2d0935944f" 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_d355b2db-5a00-440a-951d-586a0402cf81" xlink:to="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_b678a3c8-fd02-4f75-bfd5-6a2d0935944f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_35f7b5a2-fbb2-4dcc-9cef-0fa66cb7b4be" 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_us-gaap_OtherLiabilitiesNoncurrent_d355b2db-5a00-440a-951d-586a0402cf81" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_35f7b5a2-fbb2-4dcc-9cef-0fa66cb7b4be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_35e2a097-8928-4425-aa98-2f8edabbc6f0" xlink:href="hsy-20220703.xsd#hsy_OtherMiscellaneousLiabilitiesNonCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_d355b2db-5a00-440a-951d-586a0402cf81" xlink:to="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_35e2a097-8928-4425-aa98-2f8edabbc6f0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_f37e1cfd-8787-465a-a402-065111a2f9de" 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_d458a2d9-4837-4eee-9749-5862a59c1f74" 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_f37e1cfd-8787-465a-a402-065111a2f9de" xlink:to="loc_us-gaap_FIFOInventoryAmount_d458a2d9-4837-4eee-9749-5862a59c1f74" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryLIFOReserve_3ff0820c-a665-409b-a70c-ebe7bbfb906e" 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_f37e1cfd-8787-465a-a402-065111a2f9de" xlink:to="loc_us-gaap_InventoryLIFOReserve_3ff0820c-a665-409b-a70c-ebe7bbfb906e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_120c6a04-f2a7-46d3-a994-66d02613eefd" 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_2fda226f-9f91-4f3f-81c3-1ca893140b3b" 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_120c6a04-f2a7-46d3-a994-66d02613eefd" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_2fda226f-9f91-4f3f-81c3-1ca893140b3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedMarketingCostsCurrent_6056f6f1-9137-4f3f-976c-053ea2841ef8" 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_120c6a04-f2a7-46d3-a994-66d02613eefd" xlink:to="loc_us-gaap_AccruedMarketingCostsCurrent_6056f6f1-9137-4f3f-976c-053ea2841ef8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_2e53f9c0-0eec-4a7d-bc11-f509c4431b0d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_120c6a04-f2a7-46d3-a994-66d02613eefd" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_2e53f9c0-0eec-4a7d-bc11-f509c4431b0d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_e30b7ed5-52bb-4871-9b40-2e5e555b7e57" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_120c6a04-f2a7-46d3-a994-66d02613eefd" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_e30b7ed5-52bb-4871-9b40-2e5e555b7e57" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_03c89e07-5ec9-46d5-86b2-b054e9cf3def" 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_c0d864ee-1422-4b66-be47-d57fc719c7e6" 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_03c89e07-5ec9-46d5-86b2-b054e9cf3def" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_c0d864ee-1422-4b66-be47-d57fc719c7e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_a33cc24c-d508-433f-8cc6-386b1b79227e" 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_03c89e07-5ec9-46d5-86b2-b054e9cf3def" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_a33cc24c-d508-433f-8cc6-386b1b79227e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_c118781e-0a0f-41b2-b3bb-9c8d107cd1a3" 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_03c89e07-5ec9-46d5-86b2-b054e9cf3def" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_c118781e-0a0f-41b2-b3bb-9c8d107cd1a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_8b70baa2-50e2-42dc-a845-99ce067c5ef2" 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_4203d436-db17-4256-8d96-ac1c3a24241d" 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_8b70baa2-50e2-42dc-a845-99ce067c5ef2" xlink:to="loc_us-gaap_Land_4203d436-db17-4256-8d96-ac1c3a24241d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingsAndImprovementsGross_fad21fcf-d07c-4700-bf5f-969cd58e2597" 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_8b70baa2-50e2-42dc-a845-99ce067c5ef2" xlink:to="loc_us-gaap_BuildingsAndImprovementsGross_fad21fcf-d07c-4700-bf5f-969cd58e2597" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentGross_7f667365-fa8a-466b-a67c-9f0274c10fb1" 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_8b70baa2-50e2-42dc-a845-99ce067c5ef2" xlink:to="loc_us-gaap_MachineryAndEquipmentGross_7f667365-fa8a-466b-a67c-9f0274c10fb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressGross_5a7d5cf5-bf4b-45e1-b4db-3412a251f9f7" 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_8b70baa2-50e2-42dc-a845-99ce067c5ef2" xlink:to="loc_us-gaap_ConstructionInProgressGross_5a7d5cf5-bf4b-45e1-b4db-3412a251f9f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PrepaidExpensesandOther_2df84045-6dbd-41a5-a887-ad640546b1bc" xlink:href="hsy-20220703.xsd#hsy_PrepaidExpensesandOther"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_63d02a7c-d09a-40e9-a9f0-190f35855a5d" 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_2df84045-6dbd-41a5-a887-ad640546b1bc" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_63d02a7c-d09a-40e9-a9f0-190f35855a5d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_a9831229-7b47-424c-a316-c20c377cde8d" 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_2df84045-6dbd-41a5-a887-ad640546b1bc" xlink:to="loc_us-gaap_OtherAssetsCurrent_a9831229-7b47-424c-a316-c20c377cde8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_778b5039-6179-43b4-813a-cca293da982d" 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_hsy_OtherMiscellaneousAssetsNonCurrent_7d470b0b-be8c-419e-97b0-54759baa54c7" xlink:href="hsy-20220703.xsd#hsy_OtherMiscellaneousAssetsNonCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_778b5039-6179-43b4-813a-cca293da982d" xlink:to="loc_hsy_OtherMiscellaneousAssetsNonCurrent_7d470b0b-be8c-419e-97b0-54759baa54c7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_e8e61642-acf1-4754-9c98-b3e9166d7ee7" 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_778b5039-6179-43b4-813a-cca293da982d" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_e8e61642-acf1-4754-9c98-b3e9166d7ee7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_b3ab5061-b05a-42f8-a84d-72088672f9ab" 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_778b5039-6179-43b4-813a-cca293da982d" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_b3ab5061-b05a-42f8-a84d-72088672f9ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_a5f5d363-20df-4c3f-9c5c-96974bf93d49" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_778b5039-6179-43b4-813a-cca293da982d" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_a5f5d363-20df-4c3f-9c5c-96974bf93d49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalizedComputerSoftwareNet_81ee712f-ee70-4464-9929-89a2d2197952" 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_778b5039-6179-43b4-813a-cca293da982d" xlink:to="loc_us-gaap_CapitalizedComputerSoftwareNet_81ee712f-ee70-4464-9929-89a2d2197952" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_655dea9f-651a-4cc6-8977-bd6499c96081" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_a60ec0a7-80ad-40c1-b3c6-d37e66847a1e" 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_PropertyPlantAndEquipmentNet_655dea9f-651a-4cc6-8977-bd6499c96081" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_a60ec0a7-80ad-40c1-b3c6-d37e66847a1e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_11a8b8d6-7414-4899-8820-ded98ba2548a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_655dea9f-651a-4cc6-8977-bd6499c96081" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_11a8b8d6-7414-4899-8820-ded98ba2548a" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
