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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2023 Workiva-->
<!--r:4ab01bee-9d05-428a-be29-42a00b016c66,g:a3f8c5b3-d180-41f8-8eed-668e74ba6e74-->
<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-20230702.xsd#CONSOLIDATEDSTATEMENTSOFINCOME"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFINCOME" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_41a3f15d-b114-46d6-8889-2528acd966c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_ef195973-6bc2-4b64-a0d6-437ce568dff9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_41a3f15d-b114-46d6-8889-2528acd966c7" xlink:to="loc_us-gaap_OperatingIncomeLoss_ef195973-6bc2-4b64-a0d6-437ce568dff9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_96ba19d9-2366-4a36-8b31-ea1b6a18e9e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_41a3f15d-b114-46d6-8889-2528acd966c7" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_96ba19d9-2366-4a36-8b31-ea1b6a18e9e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_4a439c36-9f04-4311-be17-20aa69ab650c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_41a3f15d-b114-46d6-8889-2528acd966c7" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_4a439c36-9f04-4311-be17-20aa69ab650c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_dcc6a0de-a8c0-42cb-b82b-f1238989be3b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_c7b04c03-fccc-49ef-b90d-042111867222" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GrossProfit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_dcc6a0de-a8c0-42cb-b82b-f1238989be3b" xlink:to="loc_us-gaap_GrossProfit_c7b04c03-fccc-49ef-b90d-042111867222" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_c9cdcb79-90d7-44eb-84fb-0c83894144d0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_dcc6a0de-a8c0-42cb-b82b-f1238989be3b" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_c9cdcb79-90d7-44eb-84fb-0c83894144d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_0e7042d0-e738-49e0-bb6f-53db39a51b01" xlink:href="hsy-20230702.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_dcc6a0de-a8c0-42cb-b82b-f1238989be3b" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_0e7042d0-e738-49e0-bb6f-53db39a51b01" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_8783fef6-4261-4821-a6b3-0970e87a6e71" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_c0a0d2ae-d45c-4d97-84cb-be2ac227a5bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_8783fef6-4261-4821-a6b3-0970e87a6e71" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_c0a0d2ae-d45c-4d97-84cb-be2ac227a5bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e83c0564-2edf-4a61-895a-917418e33df5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_8783fef6-4261-4821-a6b3-0970e87a6e71" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e83c0564-2edf-4a61-895a-917418e33df5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_6d69832b-b312-4bb8-bc97-00a9e2e14d9b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GrossProfit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_6ea244a8-fd18-416a-8b4a-2d18f1683cbe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_6d69832b-b312-4bb8-bc97-00a9e2e14d9b" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_6ea244a8-fd18-416a-8b4a-2d18f1683cbe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_794fd17e-e392-478d-9ef8-3c15d7e63845" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossProfit_6d69832b-b312-4bb8-bc97-00a9e2e14d9b" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_794fd17e-e392-478d-9ef8-3c15d7e63845" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" xlink:type="simple" xlink:href="hsy-20230702.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_ComprehensiveIncomeNetOfTax_f633848a-028f-46ed-9ee1-c560072ad8ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_42a4e0f9-c4fd-4422-85da-9f3d03469ad3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_f633848a-028f-46ed-9ee1-c560072ad8ec" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_42a4e0f9-c4fd-4422-85da-9f3d03469ad3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_0d79b731-9e19-4fa7-95c1-fc887e7df74d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_f633848a-028f-46ed-9ee1-c560072ad8ec" xlink:to="loc_us-gaap_NetIncomeLoss_0d79b731-9e19-4fa7-95c1-fc887e7df74d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_cdad7763-c4aa-4aa9-a5be-4d43a92cf55e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_3d1c35b9-f608-4742-9df8-4cea204e90d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_cdad7763-c4aa-4aa9-a5be-4d43a92cf55e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_3d1c35b9-f608-4742-9df8-4cea204e90d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_9e3337cf-18f2-42aa-bd96-0aa16ccecf06" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_cdad7763-c4aa-4aa9-a5be-4d43a92cf55e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_9e3337cf-18f2-42aa-bd96-0aa16ccecf06" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_599a6111-94ea-49ec-8aa5-14af2e46594b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_c341fcec-4bec-4d4d-a866-e49c90f509ff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_599a6111-94ea-49ec-8aa5-14af2e46594b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_c341fcec-4bec-4d4d-a866-e49c90f509ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_2dcb5d8c-4968-48db-a64a-7bea79c1a0a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_599a6111-94ea-49ec-8aa5-14af2e46594b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_2dcb5d8c-4968-48db-a64a-7bea79c1a0a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_3819a10e-f1d2-4d17-a9ab-8a52c2286d96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_599a6111-94ea-49ec-8aa5-14af2e46594b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_3819a10e-f1d2-4d17-a9ab-8a52c2286d96" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_810545e4-7c9b-48ae-9c7f-3dca16d10c5b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_599a6111-94ea-49ec-8aa5-14af2e46594b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_810545e4-7c9b-48ae-9c7f-3dca16d10c5b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_0134cabc-3f36-4090-9667-bb18691cf218" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_599a6111-94ea-49ec-8aa5-14af2e46594b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_0134cabc-3f36-4090-9667-bb18691cf218" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_15c8786b-6bdd-4d45-80a5-48ad64a81892" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_5b63bb92-354a-4f40-bffe-af17de76d70c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_15c8786b-6bdd-4d45-80a5-48ad64a81892" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_5b63bb92-354a-4f40-bffe-af17de76d70c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_b8d052c1-5f6c-4acb-9cf4-fe9c96e7875a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_15c8786b-6bdd-4d45-80a5-48ad64a81892" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_b8d052c1-5f6c-4acb-9cf4-fe9c96e7875a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07b59842-8c4d-4b06-a817-637de61587ae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_463f5dd3-d29e-48f0-b27a-aec5984c3b6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07b59842-8c4d-4b06-a817-637de61587ae" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_463f5dd3-d29e-48f0-b27a-aec5984c3b6c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_5fc72326-4931-492f-82cc-eb8735713d8a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07b59842-8c4d-4b06-a817-637de61587ae" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_5fc72326-4931-492f-82cc-eb8735713d8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_c78a4ea1-a6d5-4506-97c5-70b877aca5cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07b59842-8c4d-4b06-a817-637de61587ae" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_c78a4ea1-a6d5-4506-97c5-70b877aca5cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_6b957c28-5d75-400b-9210-aa2a238d4e2e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07b59842-8c4d-4b06-a817-637de61587ae" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_6b957c28-5d75-400b-9210-aa2a238d4e2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_01783690-2291-4d73-bfad-7ef3152dba52" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07b59842-8c4d-4b06-a817-637de61587ae" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_01783690-2291-4d73-bfad-7ef3152dba52" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_b9897f06-6fbe-4fd9-a1d3-0194e3089ec1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_870f138d-22a5-4b51-b958-0ba746b1b801" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_b9897f06-6fbe-4fd9-a1d3-0194e3089ec1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_870f138d-22a5-4b51-b958-0ba746b1b801" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_afdb618e-88a8-4ece-abc6-c1a0b3914d88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_b9897f06-6fbe-4fd9-a1d3-0194e3089ec1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationTax_afdb618e-88a8-4ece-abc6-c1a0b3914d88" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bd501d83-ac5d-4a95-ac4f-8ea549f140ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_eadede9d-fb7f-4646-9826-a0a885e29f6d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bd501d83-ac5d-4a95-ac4f-8ea549f140ea" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_eadede9d-fb7f-4646-9826-a0a885e29f6d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_b1e6dff7-5007-4b44-83c1-2f03b5455495" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bd501d83-ac5d-4a95-ac4f-8ea549f140ea" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_b1e6dff7-5007-4b44-83c1-2f03b5455495" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_de6edf9e-0c1c-44dd-a417-8abca036e67e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bd501d83-ac5d-4a95-ac4f-8ea549f140ea" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_de6edf9e-0c1c-44dd-a417-8abca036e67e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_258eef3a-3061-4f0b-a646-1c7a127413b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bd501d83-ac5d-4a95-ac4f-8ea549f140ea" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_258eef3a-3061-4f0b-a646-1c7a127413b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_263584a3-cf9c-4fcc-b63c-2c23b7db97a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_bd501d83-ac5d-4a95-ac4f-8ea549f140ea" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_263584a3-cf9c-4fcc-b63c-2c23b7db97a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_12ad2466-6c7c-4c93-a37f-040cfc552b9c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_af621971-87c3-4081-8039-65ce9e8d5e91" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_12ad2466-6c7c-4c93-a37f-040cfc552b9c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax_af621971-87c3-4081-8039-65ce9e8d5e91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_4f7a532c-8b10-4a5a-baae-daea7b3e6639" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_12ad2466-6c7c-4c93-a37f-040cfc552b9c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationTax_4f7a532c-8b10-4a5a-baae-daea7b3e6639" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_2b390230-de71-417c-af07-7aa713338969" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_98a13430-5a6b-48df-84b0-e8a8f0e4d3b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_2b390230-de71-417c-af07-7aa713338969" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_98a13430-5a6b-48df-84b0-e8a8f0e4d3b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_f4968e52-cc67-4a48-9850-82435ec6b4e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_2b390230-de71-417c-af07-7aa713338969" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_f4968e52-cc67-4a48-9850-82435ec6b4e8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="hsy-20230702.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_LiabilitiesCurrent_16ea2f29-afe3-4cff-b47b-e6f1a1360f1d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_cbaeee9d-e31b-45ba-8c16-d30ce59843f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_16ea2f29-afe3-4cff-b47b-e6f1a1360f1d" xlink:to="loc_us-gaap_AccountsPayableCurrent_cbaeee9d-e31b-45ba-8c16-d30ce59843f8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_275e6bb3-7cc9-478a-b13b-e00e9b9be276" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_16ea2f29-afe3-4cff-b47b-e6f1a1360f1d" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_275e6bb3-7cc9-478a-b13b-e00e9b9be276" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_9fc32d21-b20b-4c6b-93a2-7a60d70fb3a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedIncomeTaxesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_16ea2f29-afe3-4cff-b47b-e6f1a1360f1d" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_9fc32d21-b20b-4c6b-93a2-7a60d70fb3a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_5ceac0ce-44c5-4b1e-8866-877491f6cdb6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermBorrowings"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_16ea2f29-afe3-4cff-b47b-e6f1a1360f1d" xlink:to="loc_us-gaap_ShortTermBorrowings_5ceac0ce-44c5-4b1e-8866-877491f6cdb6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_8c6496cf-b070-4363-8f82-a5eecd8ade2e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_16ea2f29-afe3-4cff-b47b-e6f1a1360f1d" xlink:to="loc_us-gaap_LongTermDebtCurrent_8c6496cf-b070-4363-8f82-a5eecd8ade2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_6b2e0cfa-54fd-4681-ae8a-d00f57349cc6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_57e4ef38-b93c-4733-8f7a-f1fc589ae460" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6b2e0cfa-54fd-4681-ae8a-d00f57349cc6" xlink:to="loc_us-gaap_LiabilitiesCurrent_57e4ef38-b93c-4733-8f7a-f1fc589ae460" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_a17c181f-eca1-4bf9-a164-9fa4f9df6668" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtAndCapitalLeaseObligations"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6b2e0cfa-54fd-4681-ae8a-d00f57349cc6" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_a17c181f-eca1-4bf9-a164-9fa4f9df6668" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_42276a67-107f-4812-aa50-d05e68d0fd1c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6b2e0cfa-54fd-4681-ae8a-d00f57349cc6" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_42276a67-107f-4812-aa50-d05e68d0fd1c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_936db7be-f703-4465-94dc-bea73cd88b93" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_6b2e0cfa-54fd-4681-ae8a-d00f57349cc6" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_936db7be-f703-4465-94dc-bea73cd88b93" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_61370f84-bdad-4884-b94c-3202a755099d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_bca488a4-05cb-44ac-b4f5-f56805aab936" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_61370f84-bdad-4884-b94c-3202a755099d" xlink:to="loc_us-gaap_AdditionalPaidInCapital_bca488a4-05cb-44ac-b4f5-f56805aab936" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_561ee1c8-2b84-417f-b487-d0e0c219e92c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_61370f84-bdad-4884-b94c-3202a755099d" xlink:to="loc_us-gaap_CommonStockValue_561ee1c8-2b84-417f-b487-d0e0c219e92c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonValue_b8db717b-0e45-4997-8b8a-d3d867fb7f54" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonValue"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_61370f84-bdad-4884-b94c-3202a755099d" xlink:to="loc_us-gaap_TreasuryStockCommonValue_b8db717b-0e45-4997-8b8a-d3d867fb7f54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_7ca64b9b-15bb-4e38-b61c-3f99227f0b0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_61370f84-bdad-4884-b94c-3202a755099d" xlink:to="loc_us-gaap_PreferredStockValue_7ca64b9b-15bb-4e38-b61c-3f99227f0b0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_80518904-f80d-4643-b044-e2cfbcc16964" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_61370f84-bdad-4884-b94c-3202a755099d" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_80518904-f80d-4643-b044-e2cfbcc16964" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_f74114f7-a9b6-44f3-8c75-5e3e95ccfa9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_61370f84-bdad-4884-b94c-3202a755099d" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_f74114f7-a9b6-44f3-8c75-5e3e95ccfa9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_74b577a3-2d18-4455-be29-21148086d08f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_dd8f1011-62d3-430a-bd74-466fccd3db10" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_74b577a3-2d18-4455-be29-21148086d08f" xlink:to="loc_us-gaap_AssetsCurrent_dd8f1011-62d3-430a-bd74-466fccd3db10" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_78520540-b675-4bf7-a23c-e98a7dc7f059" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_74b577a3-2d18-4455-be29-21148086d08f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_78520540-b675-4bf7-a23c-e98a7dc7f059" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_5cb31050-5671-4f05-9323-5a9e82f903d0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_74b577a3-2d18-4455-be29-21148086d08f" xlink:to="loc_us-gaap_Goodwill_5cb31050-5671-4f05-9323-5a9e82f903d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_8e0a1a16-82ba-46a6-b780-ae739607f03e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_74b577a3-2d18-4455-be29-21148086d08f" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_8e0a1a16-82ba-46a6-b780-ae739607f03e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_e21110c9-313a-4d4a-b143-b717d10a63f1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_74b577a3-2d18-4455-be29-21148086d08f" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_e21110c9-313a-4d4a-b143-b717d10a63f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_7c88e236-f5a4-4407-8d18-49b16366b659" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_74b577a3-2d18-4455-be29-21148086d08f" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_7c88e236-f5a4-4407-8d18-49b16366b659" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_d2ec838a-656c-464d-872a-0f3007269067" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_f84196da-3542-43d1-9029-88c9cb8a5a8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d2ec838a-656c-464d-872a-0f3007269067" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_f84196da-3542-43d1-9029-88c9cb8a5a8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_cdd3e2b1-c623-4dd3-9aa7-6ed6b8913605" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d2ec838a-656c-464d-872a-0f3007269067" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_cdd3e2b1-c623-4dd3-9aa7-6ed6b8913605" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_745599db-047e-4365-ba36-57f4eb466fc4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d2ec838a-656c-464d-872a-0f3007269067" xlink:to="loc_us-gaap_InventoryNet_745599db-047e-4365-ba36-57f4eb466fc4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_547eb62b-9466-41d0-be15-687907fe4791" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d2ec838a-656c-464d-872a-0f3007269067" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_547eb62b-9466-41d0-be15-687907fe4791" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_61a13c8c-5b1c-4f14-a55a-9950254e2c33" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_baba4785-e4fe-463d-b630-b5fe67ab3dc1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_61a13c8c-5b1c-4f14-a55a-9950254e2c33" xlink:to="loc_us-gaap_Liabilities_baba4785-e4fe-463d-b630-b5fe67ab3dc1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_09b0cc7f-04f3-4265-8f9a-f1a36c0f5daf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_61a13c8c-5b1c-4f14-a55a-9950254e2c33" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_09b0cc7f-04f3-4265-8f9a-f1a36c0f5daf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="hsy-20230702.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWS"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_cf2d06bf-6044-4bb5-9683-08bd1151f399" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_cf2d06bf-6044-4bb5-9683-08bd1151f399" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_5d5fde6e-7b4a-4d3e-b2ed-135ea534620d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_5d5fde6e-7b4a-4d3e-b2ed-135ea534620d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_2fcc21de-1074-4812-a557-b9b065bdd573" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_2fcc21de-1074-4812-a557-b9b065bdd573" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_c28b657b-e911-41d6-b4f5-9a8c6c07e749" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_c28b657b-e911-41d6-b4f5-9a8c6c07e749" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_49f7773c-d970-4b84-acee-de3f9d54c856" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_49f7773c-d970-4b84-acee-de3f9d54c856" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_a7f950b0-a881-4bfb-96b7-38873f4ec357" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromRepaymentsOfShortTermDebt"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:to="loc_us-gaap_ProceedsFromRepaymentsOfShortTermDebt_a7f950b0-a881-4bfb-96b7-38873f4ec357" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_e5bf04cb-f77f-44a8-9a16-528f7f87453f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfLongTermDebt"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ec852e1a-0df7-48ed-995f-c9c0db25b494" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_e5bf04cb-f77f-44a8-9a16-528f7f87453f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_dcae0d81-6b6d-4fea-833f-f3ac6505a1b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f0a3a2bc-1439-4db9-8cec-bda0518bd604" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_dcae0d81-6b6d-4fea-833f-f3ac6505a1b9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f0a3a2bc-1439-4db9-8cec-bda0518bd604" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_88ef7743-1409-418b-b410-df66d88ffc1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_dcae0d81-6b6d-4fea-833f-f3ac6505a1b9" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_88ef7743-1409-418b-b410-df66d88ffc1b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_a86a01cd-91cb-4e63-b497-a6c4703facf6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_dcae0d81-6b6d-4fea-833f-f3ac6505a1b9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_a86a01cd-91cb-4e63-b497-a6c4703facf6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c9418d5d-11ee-4b83-ab2f-4aca83073ebd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_dcae0d81-6b6d-4fea-833f-f3ac6505a1b9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c9418d5d-11ee-4b83-ab2f-4aca83073ebd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d730fd43-57ed-4c76-b0d8-092f463e7124" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_c4b280e8-dace-4485-95b9-ea3db9f681bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d730fd43-57ed-4c76-b0d8-092f463e7124" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_c4b280e8-dace-4485-95b9-ea3db9f681bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_3b860b3e-0d0b-4bc4-ab56-7b5f8fe98350" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForProceedsFromOtherInvestingActivities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d730fd43-57ed-4c76-b0d8-092f463e7124" xlink:to="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_3b860b3e-0d0b-4bc4-ab56-7b5f8fe98350" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_f11d84b3-bb4c-4a16-8670-c12be199f53f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireEquityMethodInvestments"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d730fd43-57ed-4c76-b0d8-092f463e7124" xlink:to="loc_us-gaap_PaymentsToAcquireEquityMethodInvestments_f11d84b3-bb4c-4a16-8670-c12be199f53f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_3ed36a0f-7c6f-405b-9801-c5dc498bd5fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_d730fd43-57ed-4c76-b0d8-092f463e7124" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_3ed36a0f-7c6f-405b-9801-c5dc498bd5fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_fb4bb09f-597d-4f8f-9396-b4febbe5eb62" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_NetIncomeLoss_fb4bb09f-597d-4f8f-9396-b4febbe5eb62" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_70c87453-08ef-4c26-9048-877d5f51ed21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_70c87453-08ef-4c26-9048-877d5f51ed21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_664936d1-edf0-47a7-aa36-4dcaa2f2fb61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_ShareBasedCompensation_664936d1-edf0-47a7-aa36-4dcaa2f2fb61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_87546d93-655d-41cc-b31f-6dc56a54f863" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxesAndTaxCredits"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_87546d93-655d-41cc-b31f-6dc56a54f863" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_fcd8d01e-356d-4dc0-98ec-22b5b962504c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_fcd8d01e-356d-4dc0-98ec-22b5b962504c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_05a82c56-6486-4754-81fe-a1002851d657" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_05a82c56-6486-4754-81fe-a1002851d657" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_bf86d847-68cb-40a0-be3d-776191ae0bed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_bf86d847-68cb-40a0-be3d-776191ae0bed" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_04bee6d4-fa4d-4e76-8913-0f19dde3ee41" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_04bee6d4-fa4d-4e76-8913-0f19dde3ee41" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_6b18c812-7260-4336-be63-d75ecea325e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_6b18c812-7260-4336-be63-d75ecea325e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_87458ba0-75e6-4894-b7e9-840f53111070" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_87458ba0-75e6-4894-b7e9-840f53111070" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_8614b2f5-8a97-4d49-8d55-843f019b272e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccruedTaxesPayable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedTaxesPayable_8614b2f5-8a97-4d49-8d55-843f019b272e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_16315187-ea26-40ff-98ce-bd7ee01093e1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PensionAndOtherPostretirementBenefitContributions"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_PensionAndOtherPostretirementBenefitContributions_16315187-ea26-40ff-98ce-bd7ee01093e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_78a45c07-1a8b-439a-9c07-074a65a43591" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_ea5c34eb-21a2-4b32-b7ca-8a01756f89d7" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingCapitalNet_78a45c07-1a8b-439a-9c07-074a65a43591" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20230702.xsd#BUSINESSACQUISITIONSPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_c323713f-78f3-4807-8708-f96bf887a2d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_c323713f-78f3-4807-8708-f96bf887a2d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_827d759e-c326-4dc5-9f30-e603f6773ae1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_Goodwill_827d759e-c326-4dc5-9f30-e603f6773ae1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_17288447-ccd1-41fd-838e-1774c15da536" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_17288447-ccd1-41fd-838e-1774c15da536" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_50739d4c-627c-4f65-97e2-7cdee239af7d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_50739d4c-627c-4f65-97e2-7cdee239af7d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_d6a12dd9-e44b-4459-9048-63293166b844" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_d6a12dd9-e44b-4459-9048-63293166b844" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_2d6aa95a-a312-44bb-9790-363aa74caa74" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_2d6aa95a-a312-44bb-9790-363aa74caa74" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_c36cfd4b-55c6-4170-b351-bb6d149527fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_c36cfd4b-55c6-4170-b351-bb6d149527fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_692cbbad-e3df-4311-aad3-9d4c436b6287" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_692cbbad-e3df-4311-aad3-9d4c436b6287" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_6f2735f3-53ef-4201-8619-1342a95cf490" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_38ef53ad-2e57-4d1f-8388-4d94f98fec24" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_6f2735f3-53ef-4201-8619-1342a95cf490" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="simple" xlink:href="hsy-20230702.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_01ec3b35-3b13-4608-8cc0-55b53f3636f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_2f2c7f0b-109c-41fa-820b-2f4f0892c25a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_01ec3b35-3b13-4608-8cc0-55b53f3636f4" xlink:to="loc_us-gaap_LongTermDebtCurrent_2f2c7f0b-109c-41fa-820b-2f4f0892c25a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_ba1a172b-20eb-45e6-8439-14f3797f7811" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_01ec3b35-3b13-4608-8cc0-55b53f3636f4" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_ba1a172b-20eb-45e6-8439-14f3797f7811" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFNETINTERESTEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20230702.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_18e4511d-8bf0-4e10-a872-c54f981c4562" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_9d9b62b7-89fe-484d-a379-fe845e0da94a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_18e4511d-8bf0-4e10-a872-c54f981c4562" xlink:to="loc_us-gaap_InterestExpense_9d9b62b7-89fe-484d-a379-fe845e0da94a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_d6dbbf27-f814-4fb7-9977-98dc050abece" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_18e4511d-8bf0-4e10-a872-c54f981c4562" xlink:to="loc_us-gaap_InvestmentIncomeInterest_d6dbbf27-f814-4fb7-9977-98dc050abece" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_ed3c4743-66c7-447f-a83c-636832fe5b8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebt_d418bbc1-10bc-4168-b62c-d77859c30d11" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_ed3c4743-66c7-447f-a83c-636832fe5b8d" xlink:to="loc_us-gaap_InterestExpenseDebt_d418bbc1-10bc-4168-b62c-d77859c30d11" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestCostsCapitalizedAdjustment_eb6b6d36-a83c-4724-912d-99caff0807c3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestCostsCapitalizedAdjustment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_ed3c4743-66c7-447f-a83c-636832fe5b8d" xlink:to="loc_us-gaap_InterestCostsCapitalizedAdjustment_eb6b6d36-a83c-4724-912d-99caff0807c3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFCOMPONENETSOFLEASEEXPENSEDetails" xlink:type="simple" xlink:href="hsy-20230702.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_9888826a-c0b4-4a93-9073-364d6e1a4dd6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_ced8d544-4628-4e58-8057-887049802717" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_9888826a-c0b4-4a93-9073-364d6e1a4dd6" xlink:to="loc_us-gaap_OperatingLeaseCost_ced8d544-4628-4e58-8057-887049802717" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_b00b1dfc-ff2b-4bf2-b6b3-46d1fbdf8a85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseRightOfUseAssetAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_9888826a-c0b4-4a93-9073-364d6e1a4dd6" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_b00b1dfc-ff2b-4bf2-b6b3-46d1fbdf8a85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseInterestExpense_ea665eea-f73a-4caf-b647-49753f4a98d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseInterestExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_9888826a-c0b4-4a93-9073-364d6e1a4dd6" xlink:to="loc_us-gaap_FinanceLeaseInterestExpense_ea665eea-f73a-4caf-b647-49753f4a98d5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="simple" xlink:href="hsy-20230702.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_5c07bb88-15db-45da-987b-2e926cd5fe1c" xlink:href="hsy-20230702.xsd#hsy_LeaseRightofUseAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_42853c4f-ad5e-4bb1-a293-3f46ccdf1cad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_5c07bb88-15db-45da-987b-2e926cd5fe1c" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_42853c4f-ad5e-4bb1-a293-3f46ccdf1cad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_2275d107-a83b-428a-a704-cb2c7601200c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseRightofUseAsset_5c07bb88-15db-45da-987b-2e926cd5fe1c" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_2275d107-a83b-428a-a704-cb2c7601200c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseLiability_8141f363-7a20-4a66-967c-62e781628110" xlink:href="hsy-20230702.xsd#hsy_LeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_87a74796-a931-4ad8-bcc0-f5f8db49599b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_8141f363-7a20-4a66-967c-62e781628110" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_87a74796-a931-4ad8-bcc0-f5f8db49599b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_f05e0e13-79b3-47d0-9190-6c0a22cd7861" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_8141f363-7a20-4a66-967c-62e781628110" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_f05e0e13-79b3-47d0-9190-6c0a22cd7861" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_1a080410-3fb6-4367-9d78-d603285a02d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_8141f363-7a20-4a66-967c-62e781628110" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_1a080410-3fb6-4367-9d78-d603285a02d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_8a0a1471-a4ef-4e44-bbe6-85ad54ca7b4d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_LeaseLiability_8141f363-7a20-4a66-967c-62e781628110" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_8a0a1471-a4ef-4e44-bbe6-85ad54ca7b4d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSCHEDULEOFMATURITIESOFLEASELIABILITIESDetails" xlink:type="simple" xlink:href="hsy-20230702.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_d49c8522-559f-4c3d-9c14-e756f1f21079" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_7686e399-c250-442a-ac38-7af9664e7691" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_d49c8522-559f-4c3d-9c14-e756f1f21079" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_7686e399-c250-442a-ac38-7af9664e7691" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_4cf4dc70-b4ef-4e56-9e5c-a5a664b6b4fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_d49c8522-559f-4c3d-9c14-e756f1f21079" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_4cf4dc70-b4ef-4e56-9e5c-a5a664b6b4fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_0ff1559b-9fac-4e6b-9322-daa2289d90bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_d49c8522-559f-4c3d-9c14-e756f1f21079" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_0ff1559b-9fac-4e6b-9322-daa2289d90bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_4f10152c-a276-466c-abb0-4c3001cc102b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_d49c8522-559f-4c3d-9c14-e756f1f21079" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_4f10152c-a276-466c-abb0-4c3001cc102b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_611ff376-a9d0-4b75-be72-5b2f92f43880" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_d49c8522-559f-4c3d-9c14-e756f1f21079" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_611ff376-a9d0-4b75-be72-5b2f92f43880" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_047e770e-0741-4869-aa40-edf7661edd13" xlink:href="hsy-20230702.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_d49c8522-559f-4c3d-9c14-e756f1f21079" xlink:to="loc_hsy_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour_047e770e-0741-4869-aa40-edf7661edd13" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue_494fad58-c349-4f8d-97d7-261c80440f39" xlink:href="hsy-20230702.xsd#hsy_LesseeOperatingandFinancingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_5a31a7fe-eb6d-4c0c-b925-2f74609d0df2" xlink:href="hsy-20230702.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_494fad58-c349-4f8d-97d7-261c80440f39" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearTwo_5a31a7fe-eb6d-4c0c-b925-2f74609d0df2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_baf8f81c-2904-441c-a400-60ab146c0cab" xlink:href="hsy-20230702.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_494fad58-c349-4f8d-97d7-261c80440f39" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearThree_baf8f81c-2904-441c-a400-60ab146c0cab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear_1299ac01-48d0-45d6-a293-27ccc612482b" xlink:href="hsy-20230702.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_494fad58-c349-4f8d-97d7-261c80440f39" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidRemainderOfFiscalYear_1299ac01-48d0-45d6-a293-27ccc612482b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour_a0619bbe-f8e7-4fd6-aa08-7dc0fbc91d2c" xlink:href="hsy-20230702.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_494fad58-c349-4f8d-97d7-261c80440f39" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidAfterYearFour_a0619bbe-f8e7-4fd6-aa08-7dc0fbc91d2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_70c4fd6f-a717-49a5-9a86-b37ed3e6b281" xlink:href="hsy-20230702.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_494fad58-c349-4f8d-97d7-261c80440f39" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearFour_70c4fd6f-a717-49a5-9a86-b37ed3e6b281" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_f4a63937-cb1f-4bd6-ad1d-3ff3f34d1599" xlink:href="hsy-20230702.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_494fad58-c349-4f8d-97d7-261c80440f39" xlink:to="loc_hsy_LesseeOperatingAndFinancingLeaseLiabilityToBePaidYearOne_f4a63937-cb1f-4bd6-ad1d-3ff3f34d1599" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c30f0bed-6c65-47c0-9841-8385987b4213" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear_9a66bb7d-e450-446a-894f-c3c627903146" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c30f0bed-6c65-47c0-9841-8385987b4213" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear_9a66bb7d-e450-446a-894f-c3c627903146" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_e831c4eb-36df-41c0-84f0-6ff743b8a800" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c30f0bed-6c65-47c0-9841-8385987b4213" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths_e831c4eb-36df-41c0-84f0-6ff743b8a800" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_5ba11d72-bd81-43c7-bb7d-93642f69f10d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c30f0bed-6c65-47c0-9841-8385987b4213" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo_5ba11d72-bd81-43c7-bb7d-93642f69f10d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_e5fe74e6-ca9e-440e-a838-43edb9a47264" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c30f0bed-6c65-47c0-9841-8385987b4213" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree_e5fe74e6-ca9e-440e-a838-43edb9a47264" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_7b523719-efff-4e3e-abb2-55f7ec23a086" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinanceLeaseLiabilityPaymentsDue_c30f0bed-6c65-47c0-9841-8385987b4213" xlink:to="loc_us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour_7b523719-efff-4e3e-abb2-55f7ec23a086" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_FinancingLeaseLiabilityToBePaidAfterYearFour_8c9a088b-a22e-47da-985a-4c1f204b3d2d" xlink:href="hsy-20230702.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_c30f0bed-6c65-47c0-9841-8385987b4213" xlink:to="loc_hsy_FinancingLeaseLiabilityToBePaidAfterYearFour_8c9a088b-a22e-47da-985a-4c1f204b3d2d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="simple" xlink:href="hsy-20230702.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_0518b851-21e6-43e4-abbb-db8def363571" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_58554058-3d0a-45c8-a3fb-00e7a84225ff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_0518b851-21e6-43e4-abbb-db8def363571" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_58554058-3d0a-45c8-a3fb-00e7a84225ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_458a8736-c329-43ae-901c-898aa54a02ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_0518b851-21e6-43e4-abbb-db8def363571" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_458a8736-c329-43ae-901c-898aa54a02ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_40fddd03-4eaa-453f-907c-2cd3c38a46ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_0518b851-21e6-43e4-abbb-db8def363571" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_40fddd03-4eaa-453f-907c-2cd3c38a46ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_5f1cf266-0864-47c6-b0c7-7ed483d76729" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_0518b851-21e6-43e4-abbb-db8def363571" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_5f1cf266-0864-47c6-b0c7-7ed483d76729" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_09a8831e-3673-44d0-b4b8-2b69a4ffb530" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_0518b851-21e6-43e4-abbb-db8def363571" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_09a8831e-3673-44d0-b4b8-2b69a4ffb530" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_4d2413ea-1d69-4b03-bb70-78af3c718ec1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_0518b851-21e6-43e4-abbb-db8def363571" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_4d2413ea-1d69-4b03-bb70-78af3c718ec1" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20230702.xsd#TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExcludingExciseTax_36181f0e-f18f-4dc0-80ef-b27c617ea127" xlink:href="hsy-20230702.xsd#hsy_TreasuryStockSharesExcludingExciseTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExciseTax_71eaee6c-e947-4f72-a7dc-5332dc299a05" xlink:href="hsy-20230702.xsd#hsy_TreasuryStockSharesExciseTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_36181f0e-f18f-4dc0-80ef-b27c617ea127" xlink:to="loc_hsy_TreasuryStockSharesExciseTax_71eaee6c-e947-4f72-a7dc-5332dc299a05" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesNetChangeDuringPeriod_f14b9730-a476-415a-b0b8-aff3b2999243" xlink:href="hsy-20230702.xsd#hsy_TreasuryStockSharesNetChangeDuringPeriod"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_36181f0e-f18f-4dc0-80ef-b27c617ea127" xlink:to="loc_hsy_TreasuryStockSharesNetChangeDuringPeriod_f14b9730-a476-415a-b0b8-aff3b2999243" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockValueExcludingExciseTax_c8d9626e-fb1f-454b-b891-c2219f73197d" xlink:href="hsy-20230702.xsd#hsy_TreasuryStockValueExcludingExciseTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodValue_5851fa11-90b0-45bb-974a-2c56cae08af3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockRepurchasedDuringPeriodValue"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockValueExcludingExciseTax_c8d9626e-fb1f-454b-b891-c2219f73197d" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_5851fa11-90b0-45bb-974a-2c56cae08af3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_10cffe03-586f-4bb8-8061-95b70bb1f7dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockValueExcludingExciseTax_c8d9626e-fb1f-454b-b891-c2219f73197d" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_10cffe03-586f-4bb8-8061-95b70bb1f7dc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails_1" xlink:type="simple" xlink:href="hsy-20230702.xsd#TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails_1"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExcludingExciseTax_d2e4327f-b4a1-4e04-91c0-993b66184b33" xlink:href="hsy-20230702.xsd#hsy_TreasuryStockSharesExcludingExciseTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_a1229d97-8076-4437-ab84-c39604bb8ab5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_d2e4327f-b4a1-4e04-91c0-993b66184b33" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_a1229d97-8076-4437-ab84-c39604bb8ab5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_13701f46-dd78-4a22-8a75-fe73fc993912" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_TreasuryStockSharesExcludingExciseTax_d2e4327f-b4a1-4e04-91c0-993b66184b33" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_13701f46-dd78-4a22-8a75-fe73fc993912" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="simple" xlink:href="hsy-20230702.xsd#EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails"/>
  <link:calculationLink xlink:role="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_613f3795-3247-4af7-82a1-e648ebae9c1c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_1528d973-405a-40dc-a5d7-c16dd098d114" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_613f3795-3247-4af7-82a1-e648ebae9c1c" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_1528d973-405a-40dc-a5d7-c16dd098d114" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Dividends_d811d77a-6bf6-44a3-9b5f-2e147ac16084" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Dividends"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_613f3795-3247-4af7-82a1-e648ebae9c1c" xlink:to="loc_us-gaap_Dividends_d811d77a-6bf6-44a3-9b5f-2e147ac16084" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_bc7084bc-8b0d-4008-8beb-09b6ef8f5da4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_f7e02496-aeea-43d5-af99-b4b84069d2bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_bc7084bc-8b0d-4008-8beb-09b6ef8f5da4" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_f7e02496-aeea-43d5-af99-b4b84069d2bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_9064b36f-5ced-4b69-9522-3824f5928fc4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_bc7084bc-8b0d-4008-8beb-09b6ef8f5da4" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_9064b36f-5ced-4b69-9522-3824f5928fc4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DistributedEarnings_f092c069-afba-47f6-b406-74324e9254ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DistributedEarnings"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_bc7084bc-8b0d-4008-8beb-09b6ef8f5da4" xlink:to="loc_us-gaap_DistributedEarnings_f092c069-afba-47f6-b406-74324e9254ee" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/OTHERINCOMEEXPENSENETSCHEDULEOFOTHERINCOMEANDEXPENSENETDetails" xlink:type="simple" xlink:href="hsy-20230702.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_e48e32c5-1113-4f8f-bbcc-6332fb1a727b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_dc1cbf6f-c7d5-4a76-a433-cde579a6e0ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_e48e32c5-1113-4f8f-bbcc-6332fb1a727b" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_dc1cbf6f-c7d5-4a76-a433-cde579a6e0ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DefinedBenefitPlanNonServiceCost_0b967e3f-c39d-4f14-8e99-0a3c9536f423" xlink:href="hsy-20230702.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_e48e32c5-1113-4f8f-bbcc-6332fb1a727b" xlink:to="loc_hsy_DefinedBenefitPlanNonServiceCost_0b967e3f-c39d-4f14-8e99-0a3c9536f423" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherNonoperatingGainLoss_f2dfea21-0a7a-4d1e-9750-e2aa07be80ae" xlink:href="hsy-20230702.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_e48e32c5-1113-4f8f-bbcc-6332fb1a727b" xlink:to="loc_hsy_OtherNonoperatingGainLoss_f2dfea21-0a7a-4d1e-9750-e2aa07be80ae" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SUPPLEMENTALBALANCESHEETINFORMATIONSCHEDULEOFSUPPLEMENTALBALANCESHEETINFORMATIONDetails" xlink:type="simple" xlink:href="hsy-20230702.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_InventoryNet_5a898e51-ce4c-484e-b2f3-dac7b4e3e347" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_256cb648-efa8-47f4-8fd8-b0a0bf974b6e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FIFOInventoryAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_5a898e51-ce4c-484e-b2f3-dac7b4e3e347" xlink:to="loc_us-gaap_FIFOInventoryAmount_256cb648-efa8-47f4-8fd8-b0a0bf974b6e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryLIFOReserve_fe24799b-6664-443c-9019-e5c3ac610258" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryLIFOReserve"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_5a898e51-ce4c-484e-b2f3-dac7b4e3e347" xlink:to="loc_us-gaap_InventoryLIFOReserve_fe24799b-6664-443c-9019-e5c3ac610258" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_cef74966-6275-4ef8-abe1-4ff5b5404632" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Land_321537fa-d0e4-486b-b7aa-caeff83ad655" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Land"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_cef74966-6275-4ef8-abe1-4ff5b5404632" xlink:to="loc_us-gaap_Land_321537fa-d0e4-486b-b7aa-caeff83ad655" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BuildingsAndImprovementsGross_8bace17c-6449-4b43-a7c3-81450dd878c3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BuildingsAndImprovementsGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_cef74966-6275-4ef8-abe1-4ff5b5404632" xlink:to="loc_us-gaap_BuildingsAndImprovementsGross_8bace17c-6449-4b43-a7c3-81450dd878c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MachineryAndEquipmentGross_1c3e8a58-2154-491c-a36a-cc4fdbf7825e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MachineryAndEquipmentGross"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_cef74966-6275-4ef8-abe1-4ff5b5404632" xlink:to="loc_us-gaap_MachineryAndEquipmentGross_1c3e8a58-2154-491c-a36a-cc4fdbf7825e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionInProgressGross_c927c10a-a445-4c9d-9df6-3d2c8335bb9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConstructionInProgressGross"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentGross_cef74966-6275-4ef8-abe1-4ff5b5404632" xlink:to="loc_us-gaap_ConstructionInProgressGross_c927c10a-a445-4c9d-9df6-3d2c8335bb9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_69c75a2b-1d3d-43c9-bc9e-468317ade2b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_a6fe9db9-f14c-47c8-a6dc-c811bf1efbb7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_69c75a2b-1d3d-43c9-bc9e-468317ade2b8" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_a6fe9db9-f14c-47c8-a6dc-c811bf1efbb7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedMarketingCostsCurrent_700fdf09-d090-4e26-87e8-69c5314cb625" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedMarketingCostsCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_69c75a2b-1d3d-43c9-bc9e-468317ade2b8" xlink:to="loc_us-gaap_AccruedMarketingCostsCurrent_700fdf09-d090-4e26-87e8-69c5314cb625" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_dfbc9ef0-f3fd-46d9-9a4f-94ccb1b825f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_69c75a2b-1d3d-43c9-bc9e-468317ade2b8" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_dfbc9ef0-f3fd-46d9-9a4f-94ccb1b825f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_74077cc3-48f2-4555-b07a-fdf20af062fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_69c75a2b-1d3d-43c9-bc9e-468317ade2b8" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_74077cc3-48f2-4555-b07a-fdf20af062fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_65b1d1a8-1925-4aae-9d69-1c77d6731ac8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_1f909544-805b-469f-be5a-be91387b3cf6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_65b1d1a8-1925-4aae-9d69-1c77d6731ac8" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_1f909544-805b-469f-be5a-be91387b3cf6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_5c4cf43f-6da9-4c35-ba36-77f369f326b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_65b1d1a8-1925-4aae-9d69-1c77d6731ac8" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_5c4cf43f-6da9-4c35-ba36-77f369f326b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_ddfedaa7-486a-43f1-b1d0-dcff4e3a574d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_c0f66299-5bb3-425c-9ec8-3096fc511a5c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_ddfedaa7-486a-43f1-b1d0-dcff4e3a574d" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax_c0f66299-5bb3-425c-9ec8-3096fc511a5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_75c32627-2edd-4fad-97ae-ea7334d4612c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_ddfedaa7-486a-43f1-b1d0-dcff4e3a574d" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_75c32627-2edd-4fad-97ae-ea7334d4612c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_d62e35c4-1fb3-4843-8aae-b0b71bcc30b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_ddfedaa7-486a-43f1-b1d0-dcff4e3a574d" xlink:to="loc_us-gaap_AociLossCashFlowHedgeCumulativeGainLossAfterTax_d62e35c4-1fb3-4843-8aae-b0b71bcc30b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_d0f48f12-bf09-4041-9713-c7879f313d84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_7d893736-4a4b-49de-b8db-07ba72b010ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_d0f48f12-bf09-4041-9713-c7879f313d84" xlink:to="loc_us-gaap_OtherPostretirementDefinedBenefitPlanLiabilitiesNoncurrent_7d893736-4a4b-49de-b8db-07ba72b010ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_2f22c82c-83ea-4203-a8af-ae523b8ac304" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_d0f48f12-bf09-4041-9713-c7879f313d84" xlink:to="loc_us-gaap_DefinedBenefitPensionPlanLiabilitiesNoncurrent_2f22c82c-83ea-4203-a8af-ae523b8ac304" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_f100671b-5027-43a9-a544-d61df6c5fd1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherLiabilitiesNoncurrent_d0f48f12-bf09-4041-9713-c7879f313d84" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_f100671b-5027-43a9-a544-d61df6c5fd1b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_1ae52025-cc49-42bd-9ad5-436a06b27a7b" xlink:href="hsy-20230702.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_d0f48f12-bf09-4041-9713-c7879f313d84" xlink:to="loc_hsy_OtherMiscellaneousLiabilitiesNonCurrent_1ae52025-cc49-42bd-9ad5-436a06b27a7b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_8dc73168-61ab-4af2-833d-6f5ca140deed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableTradeCurrent_35c3d568-6d93-4a13-967b-49900d68f91a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableTradeCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_8dc73168-61ab-4af2-833d-6f5ca140deed" xlink:to="loc_us-gaap_AccountsPayableTradeCurrent_35c3d568-6d93-4a13-967b-49900d68f91a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplierFinanceProgramObligationCurrent_021b000a-98d2-474c-82ec-c57f6e77264c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SupplierFinanceProgramObligationCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_8dc73168-61ab-4af2-833d-6f5ca140deed" xlink:to="loc_us-gaap_SupplierFinanceProgramObligationCurrent_021b000a-98d2-474c-82ec-c57f6e77264c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableOtherCurrent_ad4d09d0-bf13-4253-a1a9-fdface387c43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableOtherCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccountsPayableCurrent_8dc73168-61ab-4af2-833d-6f5ca140deed" xlink:to="loc_us-gaap_AccountsPayableOtherCurrent_ad4d09d0-bf13-4253-a1a9-fdface387c43" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_f3b68d2c-f9c8-4841-a46b-3f65322c76af" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_OtherMiscellaneousAssetsNonCurrent_10d8d608-d04c-47ec-8c79-792e9212e28c" xlink:href="hsy-20230702.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_f3b68d2c-f9c8-4841-a46b-3f65322c76af" xlink:to="loc_hsy_OtherMiscellaneousAssetsNonCurrent_10d8d608-d04c-47ec-8c79-792e9212e28c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_b31b883f-cfec-4b8b-aa53-3d16e91e2064" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_f3b68d2c-f9c8-4841-a46b-3f65322c76af" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_b31b883f-cfec-4b8b-aa53-3d16e91e2064" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_4c4d462d-c0ea-4635-9d64-e25adbafef45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_f3b68d2c-f9c8-4841-a46b-3f65322c76af" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_4c4d462d-c0ea-4635-9d64-e25adbafef45" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_12b641f4-e220-4659-8bf6-081dd74e0ab8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_f3b68d2c-f9c8-4841-a46b-3f65322c76af" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_12b641f4-e220-4659-8bf6-081dd74e0ab8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalizedComputerSoftwareNet_159713d8-21a1-4b72-b0b4-36a07348137c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CapitalizedComputerSoftwareNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherAssetsNoncurrent_f3b68d2c-f9c8-4841-a46b-3f65322c76af" xlink:to="loc_us-gaap_CapitalizedComputerSoftwareNet_159713d8-21a1-4b72-b0b4-36a07348137c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FIFOInventoryAmount_da6f738e-1771-47b3-9384-465bd0fa7ff2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FIFOInventoryAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_575ee592-771d-44ad-ae82-e07eb3fd8526" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryRawMaterialsNetOfReserves"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FIFOInventoryAmount_da6f738e-1771-47b3-9384-465bd0fa7ff2" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_575ee592-771d-44ad-ae82-e07eb3fd8526" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_e06ff606-685e-4b26-a36c-8a0fffd6c588" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryWorkInProcessNetOfReserves"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FIFOInventoryAmount_da6f738e-1771-47b3-9384-465bd0fa7ff2" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_e06ff606-685e-4b26-a36c-8a0fffd6c588" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_3519dea7-b1c2-42cf-9189-14fc444957cc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryFinishedGoodsNetOfReserves"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FIFOInventoryAmount_da6f738e-1771-47b3-9384-465bd0fa7ff2" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_3519dea7-b1c2-42cf-9189-14fc444957cc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PrepaidExpensesandOther_17a83cfc-577b-49ae-a1bf-ec7ba0272896" xlink:href="hsy-20230702.xsd#hsy_PrepaidExpensesandOther"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_51781a4c-bd97-4f67-8605-2634d2ecadff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_PrepaidExpensesandOther_17a83cfc-577b-49ae-a1bf-ec7ba0272896" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_51781a4c-bd97-4f67-8605-2634d2ecadff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsCurrent_0d025603-54c3-426a-b292-18bcca86577c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_hsy_PrepaidExpensesandOther_17a83cfc-577b-49ae-a1bf-ec7ba0272896" xlink:to="loc_us-gaap_OtherAssetsCurrent_0d025603-54c3-426a-b292-18bcca86577c" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
