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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019e4114-4eb9-745d-b7e0-e0a7d38f9919,g:d52baf7e-edd4-4478-acf0-9a36f3803232-->
<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:arcroleRef arcroleURI="https://xbrl.org/2023/arcrole/summation-item" xlink:type="simple" xlink:href="https://www.xbrl.org/2023/calculation-1.1.xsd#summation-item"/>
  <link:roleRef roleURI="http://www.midpennbank.com/role/CONSOLIDATEDBALANCESHEETSUNAUDITED" xlink:type="simple" xlink:href="mpb-20260630.xsd#CONSOLIDATEDBALANCESHEETSUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/CONSOLIDATEDBALANCESHEETSUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Deposits_019e4114-5597-7334-a3f6-10f0e9186a25" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Deposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDeposits_019e4114-5597-7da1-9edb-ef157674f944" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDeposits"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Deposits_019e4114-5597-7334-a3f6-10f0e9186a25" xlink:to="loc_us-gaap_TimeDeposits_019e4114-5597-7da1-9edb-ef157674f944" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestBearingDepositLiabilities_019e4114-5597-7656-bda8-1b7190681dbd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestBearingDepositLiabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Deposits_019e4114-5597-7334-a3f6-10f0e9186a25" xlink:to="loc_us-gaap_InterestBearingDepositLiabilities_019e4114-5597-7656-bda8-1b7190681dbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestBearingDepositLiabilitiesDomestic_019e4114-5597-7c78-b06f-8ad3018ec758" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestBearingDepositLiabilitiesDomestic"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Deposits_019e4114-5597-7334-a3f6-10f0e9186a25" xlink:to="loc_us-gaap_NoninterestBearingDepositLiabilitiesDomestic_019e4114-5597-7c78-b06f-8ad3018ec758" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019e4114-5597-7815-a864-f51d49bced3f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_Goodwill_019e4114-5597-7815-a864-f51d49bced3f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e4114-5597-7e21-98f7-30389ca93dbe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e4114-5597-7e21-98f7-30389ca93dbe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019e4114-5597-76c6-9af2-188bff97d1ad" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019e4114-5597-76c6-9af2-188bff97d1ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansReceivableHeldForSaleNetNotPartOfDisposalGroup_019e4114-5597-7d77-9174-24dea2a094fe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LoansReceivableHeldForSaleNetNotPartOfDisposalGroup"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_LoansReceivableHeldForSaleNetNotPartOfDisposalGroup_019e4114-5597-7d77-9174-24dea2a094fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_019e4114-5597-78e9-8f55-abcf546fc7ab" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_019e4114-5597-78e9-8f55-abcf546fc7ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019e4114-5597-737d-8cad-74e83c4ad2f3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019e4114-5597-737d-8cad-74e83c4ad2f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_019e4114-5597-79a6-a6ce-98c3856b56ff" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_019e4114-5597-79a6-a6ce-98c3856b56ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-5597-7340-929a-33fbddec6082" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-5597-7340-929a-33fbddec6082" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiCurrentAndNoncurrent_019e4114-5597-723e-825c-a4967c340d91" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquitySecuritiesFvNiCurrentAndNoncurrent"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_EquitySecuritiesFvNiCurrentAndNoncurrent_019e4114-5597-723e-825c-a4967c340d91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealEstateAcquiredThroughForeclosure_019e4114-5597-74f6-8c00-8f7bf3ab22e6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RealEstateAcquiredThroughForeclosure"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_RealEstateAcquiredThroughForeclosure_019e4114-5597-74f6-8c00-8f7bf3ab22e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BankOwnedLifeInsurance_019e4114-5597-71ff-90eb-c8f466e62b80" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BankOwnedLifeInsurance"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_BankOwnedLifeInsurance_019e4114-5597-71ff-90eb-c8f466e62b80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestReceivable_019e4114-5597-7b1d-81d0-87b204fd3cf6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestReceivable"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_InterestReceivable_019e4114-5597-7b1d-81d0-87b204fd3cf6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019e4114-5597-7a5d-b8b1-25301dbe5877" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019e4114-5597-7a5d-b8b1-25301dbe5877" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_019e4114-5597-79f5-8ea3-a5b1334d5f7c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_OtherAssets_019e4114-5597-79f5-8ea3-a5b1334d5f7c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019e4114-5597-7a7a-baa0-e131e72509d3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsAndFederalFundsSold"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019e4114-5597-7a7a-baa0-e131e72509d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalHomeLoanBankStock_019e4114-5597-7b61-9a60-58477f119b9c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FederalHomeLoanBankStock"/>
    <link:calculationArc order="16" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_FederalHomeLoanBankStock_019e4114-5597-7b61-9a60-58477f119b9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-5597-736d-bafd-352ed2dfdcc2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:calculationArc order="17" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e4114-5597-7806-9564-4ff611824b65" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-5597-736d-bafd-352ed2dfdcc2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019e4114-5597-714a-8781-ba789d6e8ab1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_019e4114-5597-7535-9fef-74b9c13f4982" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e4114-5597-714a-8781-ba789d6e8ab1" xlink:to="loc_us-gaap_CommonStockValue_019e4114-5597-7535-9fef-74b9c13f4982" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_019e4114-5597-7fbc-95d2-fc227862eac0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e4114-5597-714a-8781-ba789d6e8ab1" xlink:to="loc_us-gaap_AdditionalPaidInCapital_019e4114-5597-7fbc-95d2-fc227862eac0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e4114-5597-7581-8b5f-2535255c7f3c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e4114-5597-714a-8781-ba789d6e8ab1" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e4114-5597-7581-8b5f-2535255c7f3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019e4114-5597-7e42-93df-5aa72a7d9fbc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e4114-5597-714a-8781-ba789d6e8ab1" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019e4114-5597-7e42-93df-5aa72a7d9fbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_019e4114-5597-7cfa-9fe4-e3f5489f1836" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TreasuryStockValue"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e4114-5597-714a-8781-ba789d6e8ab1" xlink:to="loc_us-gaap_TreasuryStockValue_019e4114-5597-7cfa-9fe4-e3f5489f1836" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e4114-5597-7065-97e0-aea050b6aa25" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019e4114-5597-719e-b8af-61e31f1e8bbb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e4114-5597-7065-97e0-aea050b6aa25" xlink:to="loc_us-gaap_Liabilities_019e4114-5597-719e-b8af-61e31f1e8bbb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019e4114-5597-73fc-be5b-8814604df9f8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e4114-5597-7065-97e0-aea050b6aa25" xlink:to="loc_us-gaap_StockholdersEquity_019e4114-5597-73fc-be5b-8814604df9f8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019e4114-5597-78bf-9910-225d8f1ef9f8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsAndFederalFundsSold"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndDueFromBanks_019e4114-5597-7f4d-9623-d06f2508b59e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndDueFromBanks"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019e4114-5597-78bf-9910-225d8f1ef9f8" xlink:to="loc_us-gaap_CashAndDueFromBanks_019e4114-5597-7f4d-9623-d06f2508b59e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestBearingDepositsInBanks_019e4114-5597-7875-bccb-56934bd9dba5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestBearingDepositsInBanks"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019e4114-5597-78bf-9910-225d8f1ef9f8" xlink:to="loc_us-gaap_InterestBearingDepositsInBanks_019e4114-5597-7875-bccb-56934bd9dba5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalFundsSold_019e4114-5597-7b47-a72f-460ecc3df138" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FederalFundsSold"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019e4114-5597-78bf-9910-225d8f1ef9f8" xlink:to="loc_us-gaap_FederalFundsSold_019e4114-5597-7b47-a72f-460ecc3df138" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019e4114-5597-7b5c-90d6-ac53a3e1e982" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_019e4114-5597-7699-9175-33a94b56a103" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e4114-5597-7b5c-90d6-ac53a3e1e982" xlink:to="loc_us-gaap_OperatingLeaseLiability_019e4114-5597-7699-9175-33a94b56a103" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalHomeLoanBankAdvancesLongTerm_019e4114-5597-71aa-8db7-1ca6a2d6db3c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FederalHomeLoanBankAdvancesLongTerm"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e4114-5597-7b5c-90d6-ac53a3e1e982" xlink:to="loc_us-gaap_FederalHomeLoanBankAdvancesLongTerm_019e4114-5597-71aa-8db7-1ca6a2d6db3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Deposits_019e4114-5597-7c42-b011-b9e4efeb1a4a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Deposits"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e4114-5597-7b5c-90d6-ac53a3e1e982" xlink:to="loc_us-gaap_Deposits_019e4114-5597-7c42-b011-b9e4efeb1a4a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_019e4114-5597-7f4c-8566-b0b689f2b473" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShortTermBorrowings"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e4114-5597-7b5c-90d6-ac53a3e1e982" xlink:to="loc_us-gaap_ShortTermBorrowings_019e4114-5597-7f4c-8566-b0b689f2b473" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_019e4114-5597-7ba2-870c-2d97d390942e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestPayableCurrentAndNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e4114-5597-7b5c-90d6-ac53a3e1e982" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_019e4114-5597-7ba2-870c-2d97d390942e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_019e4114-5597-7474-96df-b6820a293ac5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilities"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e4114-5597-7b5c-90d6-ac53a3e1e982" xlink:to="loc_us-gaap_OtherLiabilities_019e4114-5597-7474-96df-b6820a293ac5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019e4114-5597-7363-bfc5-1f07eb14eb05" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-5597-75e8-8362-5314cafb8e3c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019e4114-5597-7363-bfc5-1f07eb14eb05" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-5597-75e8-8362-5314cafb8e3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_019e4114-5597-7760-8c58-e26be9e1ff8f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019e4114-5597-7363-bfc5-1f07eb14eb05" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_019e4114-5597-7760-8c58-e26be9e1ff8f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFINCOMEUNAUDITED" xlink:type="simple" xlink:href="mpb-20260630.xsd#CONSOLIDATEDSTATEMENTSOFINCOMEUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFINCOMEUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_019e4114-5597-7fcc-8eb4-528d69f99911" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019e4114-5597-7fcc-8eb4-528d69f99911" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FederalDepositInsuranceCorporationAssessmentExpenseBenefit_019e4114-5597-77fd-9d1e-ac6c09c0f77f" xlink:href="mpb-20260630.xsd#mpb_FederalDepositInsuranceCorporationAssessmentExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_mpb_FederalDepositInsuranceCorporationAssessmentExpenseBenefit_019e4114-5597-77fd-9d1e-ac6c09c0f77f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019e4114-5597-76d1-aa60-ba811f591c6d" xlink:href="mpb-20260630.xsd#mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019e4114-5597-76d1-aa60-ba811f591c6d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_019e4114-5597-7c52-9547-c4e609137db9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LaborAndRelatedExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_LaborAndRelatedExpense_019e4114-5597-7c52-9547-c4e609137db9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoninterestExpense_019e4114-5597-7d6c-933d-a16cf9ea8a47" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherNoninterestExpense"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_OtherNoninterestExpense_019e4114-5597-7d6c-933d-a16cf9ea8a47" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_CardProcessingFees_019e4114-5597-715f-923b-2f99c389f04b" xlink:href="mpb-20260630.xsd#mpb_CardProcessingFees"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_mpb_CardProcessingFees_019e4114-5597-715f-923b-2f99c389f04b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfessionalFees_019e4114-5597-76b1-8df9-2fd960756053" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProfessionalFees"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_ProfessionalFees_019e4114-5597-76b1-8df9-2fd960756053" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OccupancyNet_019e4114-5597-740e-ae5d-22fc49805f60" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OccupancyNet"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_OccupancyNet_019e4114-5597-740e-ae5d-22fc49805f60" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InformationTechnologyAndDataProcessing_019e4114-5597-77d4-bf19-addb539ff242" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InformationTechnologyAndDataProcessing"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_InformationTechnologyAndDataProcessing_019e4114-5597-77d4-bf19-addb539ff242" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_SharesTaxExpense_019e4114-5597-734b-be84-b08b01505697" xlink:href="mpb-20260630.xsd#mpb_SharesTaxExpense"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_mpb_SharesTaxExpense_019e4114-5597-734b-be84-b08b01505697" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquipmentExpense_019e4114-5597-77ab-be2b-ab9a1d77f420" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquipmentExpense"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_EquipmentExpense_019e4114-5597-77ab-be2b-ab9a1d77f420" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_019e4114-5597-7981-a008-da82407f5562" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationAcquisitionRelatedCosts"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_019e4114-5597-79d3-9cdd-e9c307d268cb" xlink:to="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_019e4114-5597-7981-a008-da82407f5562" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseOperating_019e4114-5597-72c9-a1ff-9e100e7bbf79" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestExpenseOperating"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDomesticDeposits_019e4114-5597-7a07-ac7a-5c84181a9bdb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestExpenseDomesticDeposits"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpenseOperating_019e4114-5597-72c9-a1ff-9e100e7bbf79" xlink:to="loc_us-gaap_InterestExpenseDomesticDeposits_019e4114-5597-7a07-ac7a-5c84181a9bdb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseShortTermBorrowings_019e4114-5597-7f34-adbd-90832c600064" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestExpenseShortTermBorrowings"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpenseOperating_019e4114-5597-72c9-a1ff-9e100e7bbf79" xlink:to="loc_us-gaap_InterestExpenseShortTermBorrowings_019e4114-5597-7f34-adbd-90832c600064" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_InterestOnLongTermAndSubordinatedDebt_019e4114-5597-7f54-b8ff-225cf2e79d70" xlink:href="mpb-20260630.xsd#mpb_InterestOnLongTermAndSubordinatedDebt"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpenseOperating_019e4114-5597-72c9-a1ff-9e100e7bbf79" xlink:to="loc_mpb_InterestOnLongTermAndSubordinatedDebt_019e4114-5597-7f54-b8ff-225cf2e79d70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_019e4114-5597-76a9-9c35-6bc65dd4842c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-7de1-a2a2-60422868f6b1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestAndDividendIncomeOperating"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNet_019e4114-5597-76a9-9c35-6bc65dd4842c" xlink:to="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-7de1-a2a2-60422868f6b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseOperating_019e4114-5597-7cda-9ee2-2eebcbcf017a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestExpenseOperating"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNet_019e4114-5597-76a9-9c35-6bc65dd4842c" xlink:to="loc_us-gaap_InterestExpenseOperating_019e4114-5597-7cda-9ee2-2eebcbcf017a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_019e4114-5597-7f1d-bd2d-b4a3a9376658" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_019e4114-5597-7146-afae-a6e20fc30ada" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_019e4114-5597-7f1d-bd2d-b4a3a9376658" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_019e4114-5597-7146-afae-a6e20fc30ada" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019e4114-5597-7de1-965f-1c614e6e9b0b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_019e4114-5597-7f1d-bd2d-b4a3a9376658" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019e4114-5597-7de1-965f-1c614e6e9b0b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_019e4114-5597-7c8c-89d8-092a58b52ec8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestIncome"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e4114-5597-7629-bab4-232aecd76f8a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_019e4114-5597-7c8c-89d8-092a58b52ec8" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e4114-5597-7629-bab4-232aecd76f8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSalesOfLoansNet_019e4114-5597-75af-9e9b-2768ff856592" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSalesOfLoansNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_019e4114-5597-7c8c-89d8-092a58b52ec8" xlink:to="loc_us-gaap_GainLossOnSalesOfLoansNet_019e4114-5597-75af-9e9b-2768ff856592" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BankOwnedLifeInsuranceIncome_019e4114-5597-7fae-9ecf-7ff778d5d540" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BankOwnedLifeInsuranceIncome"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_019e4114-5597-7c8c-89d8-092a58b52ec8" xlink:to="loc_us-gaap_BankOwnedLifeInsuranceIncome_019e4114-5597-7fae-9ecf-7ff778d5d540" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_019e4114-5597-7e7d-bc4d-764805265393" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestIncomeOtherOperatingIncome"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_019e4114-5597-7c8c-89d8-092a58b52ec8" xlink:to="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_019e4114-5597-7e7d-bc4d-764805265393" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e4114-5597-74fc-97ca-331acb6cbf61" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e4114-5597-7ad7-b414-22d6332782ff" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e4114-5597-74fc-97ca-331acb6cbf61" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e4114-5597-7ad7-b414-22d6332782ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019e4114-5597-78b9-9679-5e4c8fce5f3b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e4114-5597-74fc-97ca-331acb6cbf61" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019e4114-5597-78b9-9679-5e4c8fce5f3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-76dc-8448-037c8aea8dba" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestAndDividendIncomeOperating"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeFederalFundsSold_019e4114-5597-7b75-9b0b-567a78ef3abe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeFederalFundsSold"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-76dc-8448-037c8aea8dba" xlink:to="loc_us-gaap_InterestIncomeFederalFundsSold_019e4114-5597-7b75-9b0b-567a78ef3abe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeSecuritiesStateAndMunicipal_019e4114-5597-7059-a020-ab2b50865e69" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeSecuritiesStateAndMunicipal"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-76dc-8448-037c8aea8dba" xlink:to="loc_us-gaap_InterestIncomeSecuritiesStateAndMunicipal_019e4114-5597-7059-a020-ab2b50865e69" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_019e4114-5597-7ba7-97d8-acfc9e9b01c9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestAndFeeIncomeLoansAndLeases"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-76dc-8448-037c8aea8dba" xlink:to="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_019e4114-5597-7ba7-97d8-acfc9e9b01c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper_019e4114-5597-7eb9-b16e-e585894c1ddf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-76dc-8448-037c8aea8dba" xlink:to="loc_us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper_019e4114-5597-7eb9-b16e-e585894c1ddf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment_019e4114-5597-77b5-bc53-3bb4c5c613fe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_019e4114-5597-76dc-8448-037c8aea8dba" xlink:to="loc_us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment_019e4114-5597-77b5-bc53-3bb4c5c613fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019e4114-5597-79b6-b40c-a513ed6485d0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLossesExpensed_019e4114-5597-7a45-bcec-08bbcae7e75f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProvisionForLoanLossesExpensed"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019e4114-5597-79b6-b40c-a513ed6485d0" xlink:to="loc_us-gaap_ProvisionForLoanLossesExpensed_019e4114-5597-7a45-bcec-08bbcae7e75f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForOtherCreditLosses_019e4114-5597-737b-b165-c31517d7d599" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProvisionForOtherCreditLosses"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019e4114-5597-79b6-b40c-a513ed6485d0" xlink:to="loc_us-gaap_ProvisionForOtherCreditLosses_019e4114-5597-737b-b165-c31517d7d599" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e4114-5597-73ba-8381-b2ee076fb203" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_019e4114-5597-78b7-868f-8b16a6fb3dce" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e4114-5597-73ba-8381-b2ee076fb203" xlink:to="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_019e4114-5597-78b7-868f-8b16a6fb3dce" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_019e4114-5597-7684-bc18-6c02bdc8cf41" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestIncome"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e4114-5597-73ba-8381-b2ee076fb203" xlink:to="loc_us-gaap_NoninterestIncome_019e4114-5597-7684-bc18-6c02bdc8cf41" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_019e4114-5597-786e-a3d3-c074beb87687" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e4114-5597-73ba-8381-b2ee076fb203" xlink:to="loc_us-gaap_NoninterestExpense_019e4114-5597-786e-a3d3-c074beb87687" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEUNAUDITED" xlink:type="simple" xlink:href="mpb-20260630.xsd#CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019e4114-5597-7a33-b0bd-5d4b7513b0c7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_019e4114-5597-7b5a-a55d-3ed86154ae48" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019e4114-5597-7a33-b0bd-5d4b7513b0c7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_019e4114-5597-7b5a-a55d-3ed86154ae48" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_019e4114-5597-7245-a9a2-fc46b2f5bea8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019e4114-5597-7a33-b0bd-5d4b7513b0c7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_019e4114-5597-7245-a9a2-fc46b2f5bea8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_019e4114-5597-75da-acae-79a629a5a147" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019e4114-5597-7a33-b0bd-5d4b7513b0c7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_019e4114-5597-75da-acae-79a629a5a147" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForSettlementNetGainLossNetOfTax_019e4114-5597-7a1b-aae8-6c2f43de4308" xlink:href="mpb-20260630.xsd#mpb_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForSettlementNetGainLossNetOfTax"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019e4114-5597-7a33-b0bd-5d4b7513b0c7" xlink:to="loc_mpb_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForSettlementNetGainLossNetOfTax_019e4114-5597-7a1b-aae8-6c2f43de4308" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_019e4114-5597-7dd3-ab67-c65c519820cd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e4114-5597-766e-9ed2-9d338c1bfb0f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019e4114-5597-7dd3-ab67-c65c519820cd" xlink:to="loc_us-gaap_NetIncomeLoss_019e4114-5597-766e-9ed2-9d338c1bfb0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019e4114-5597-7406-a48a-005c00d415a0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019e4114-5597-7dd3-ab67-c65c519820cd" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019e4114-5597-7406-a48a-005c00d415a0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWSUNAUDITED" xlink:type="simple" xlink:href="mpb-20260630.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWSUNAUDITED"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWSUNAUDITED" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019e4114-5598-76b9-b040-1ac808e66dcb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7fc3-ae0b-05c87bcce118" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019e4114-5598-76b9-b040-1ac808e66dcb" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7fc3-ae0b-05c87bcce118" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7f2c-9fad-ee92da8e1b65" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019e4114-5598-76b9-b040-1ac808e66dcb" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7f2c-9fad-ee92da8e1b65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7b07-a776-bd7608d3f4c1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019e4114-5598-76b9-b040-1ac808e66dcb" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7b07-a776-bd7608d3f4c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_019e4114-5598-751a-a30e-1a50a485102f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_019e4114-5598-751a-a30e-1a50a485102f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_019e4114-5598-70e0-9bc9-0215bb4faadf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_ProceedsFromStockPlans_019e4114-5598-70e0-9bc9-0215bb4faadf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings_019e4114-5598-7825-9580-16cf25e3f3ae" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings_019e4114-5598-7825-9580-16cf25e3f3ae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfShortTermDebt_019e4114-5598-75d6-a581-d7ad3b8b323e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RepaymentsOfShortTermDebt"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_RepaymentsOfShortTermDebt_019e4114-5598-75d6-a581-d7ad3b8b323e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeasePrincipalPayments_019e4114-5598-7b0a-95e7-d337b2e83c6e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeasePrincipalPayments"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_FinanceLeasePrincipalPayments_019e4114-5598-7b0a-95e7-d337b2e83c6e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeposits_019e4114-5598-7a8b-8843-6df4680d69fb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInDeposits"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_IncreaseDecreaseInDeposits_019e4114-5598-7a8b-8843-6df4680d69fb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_019e4114-5598-78aa-9be8-071dc8246e7f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_019e4114-5598-78aa-9be8-071dc8246e7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfSubordinatedDebt_019e4114-5598-7de8-a80d-130954020240" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RepaymentsOfSubordinatedDebt"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_RepaymentsOfSubordinatedDebt_019e4114-5598-7de8-a80d-130954020240" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromShortTermDebt_019e4114-5598-7d65-b504-ba87fdef6aa6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromShortTermDebt"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_us-gaap_ProceedsFromShortTermDebt_019e4114-5598-7d65-b504-ba87fdef6aa6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PaymentInLieuOfFractionalShares_019fd01d-92ed-7bf9-86d7-8930a8f833c8" xlink:href="mpb-20260630.xsd#mpb_PaymentInLieuOfFractionalShares"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e4114-5598-7384-9eab-9e16624a40a2" xlink:to="loc_mpb_PaymentInLieuOfFractionalShares_019fd01d-92ed-7bf9-86d7-8930a8f833c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_019e4114-5598-75e1-bac5-d82fafd05b61" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_019e4114-5598-75e1-bac5-d82fafd05b61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_019e4114-5598-7f10-a87d-8dd724a9de83" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_019e4114-5598-7f10-a87d-8dd724a9de83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities_019e4114-5598-7359-a262-8202b08a5538" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities_019e4114-5598-7359-a262-8202b08a5538" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfFederalHomeLoanBankStock_019e4114-5598-76f2-ab0e-bc324bae95b0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleOfFederalHomeLoanBankStock"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_ProceedsFromSaleOfFederalHomeLoanBankStock_019e4114-5598-76f2-ab0e-bc324bae95b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireFederalHomeLoanBankStock_019e4114-5598-7d17-8694-636a7b6b4f96" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireFederalHomeLoanBankStock"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_PaymentsToAcquireFederalHomeLoanBankStock_019e4114-5598-7d17-8694-636a7b6b4f96" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAcquiredFromAcquisition_019e4114-5598-78b4-bb73-43a27e225721" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAcquiredFromAcquisition"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_CashAcquiredFromAcquisition_019e4114-5598-78b4-bb73-43a27e225721" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromLoansReceivable_019e4114-5598-71fa-974a-1c86a194fa53" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForProceedsFromLoansReceivable"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_PaymentsForProceedsFromLoansReceivable_019e4114-5598-71fa-974a-1c86a194fa53" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019e4114-5598-755c-919d-139601c0d375" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019e4114-5598-755c-919d-139601c0d375" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_019e4114-5598-72cc-8b6e-6a7e952540f0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_019e4114-5598-72cc-8b6e-6a7e952540f0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_019e4114-5598-7c92-8e07-f55adc08c9f4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleOfForeclosedAssets"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_019e4114-5598-7c92-8e07-f55adc08c9f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLifeInsurancePolicies_019e4114-5598-76ff-8464-3153107e45e0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromLifeInsurancePolicies"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_ProceedsFromLifeInsurancePolicies_019e4114-5598-76ff-8464-3153107e45e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PaymentsForProceedsFromInvestmentInTaxCreditsAndOtherPartnerships_019e4114-5598-7ce4-b863-db6ac6863d50" xlink:href="mpb-20260630.xsd#mpb_PaymentsForProceedsFromInvestmentInTaxCreditsAndOtherPartnerships"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_mpb_PaymentsForProceedsFromInvestmentInTaxCreditsAndOtherPartnerships_019e4114-5598-7ce4-b863-db6ac6863d50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireHeldToMaturitySecurities_019fa2a5-d10d-775d-a553-c5b64e6bf0d4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireHeldToMaturitySecurities"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e4114-5598-7691-a98d-17c04416515d" xlink:to="loc_us-gaap_PaymentsToAcquireHeldToMaturitySecurities_019fa2a5-d10d-775d-a553-c5b64e6bf0d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_019e4114-5598-78b0-8c76-e598410a493c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_ProfitLoss_019e4114-5598-78b0-8c76-e598410a493c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019e4114-5598-7010-a8f5-081ea1581c7e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019e4114-5598-7010-a8f5-081ea1581c7e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Depreciation_019e4114-5598-7f89-ba79-6b5212be904f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Depreciation"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_Depreciation_019e4114-5598-7f89-ba79-6b5212be904f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights_019e4114-5598-7879-88b9-5a93e61126ef" xlink:href="mpb-20260630.xsd#mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights_019e4114-5598-7879-88b9-5a93e61126ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_019e4114-5598-7422-80d0-4606515c2fdf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_019e4114-5598-7422-80d0-4606515c2fdf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019e4114-5598-7d40-893e-f2047356a8b5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019e4114-5598-7d40-893e-f2047356a8b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_019e4114-5598-7013-a2a9-9a82e958e93c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseRightOfUseAssetAmortization"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_019e4114-5598-7013-a2a9-9a82e958e93c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_019e4114-5598-7fe5-9d7b-23182ac37098" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleRealizedGainLoss_019e4114-5598-7fe5-9d7b-23182ac37098" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_EarningsOnCashSurrenderValueOfLifeInsuranceIncludingDeathBenefitProceeds_019e4114-5598-7b34-97cf-bc4d031b8419" xlink:href="mpb-20260630.xsd#mpb_EarningsOnCashSurrenderValueOfLifeInsuranceIncludingDeathBenefitProceeds"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_EarningsOnCashSurrenderValueOfLifeInsuranceIncludingDeathBenefitProceeds_019e4114-5598-7b34-97cf-bc4d031b8419" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale_019e4114-5598-7f09-aff0-7fb6d4519373" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale_019e4114-5598-7f09-aff0-7fb6d4519373" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndCollectionOfLoansHeldforsale_019e4114-5598-74e9-b065-98b39169957e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleAndCollectionOfLoansHeldforsale"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_ProceedsFromSaleAndCollectionOfLoansHeldforsale_019e4114-5598-74e9-b065-98b39169957e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfMortgageLoans_019e4114-5598-7c68-86d3-8788de32613f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfMortgageLoans"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_GainLossOnSaleOfMortgageLoans_019e4114-5598-7c68-86d3-8788de32613f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PaymentsToFundingLoansOriginatedForSale_019e4114-5598-7c15-a674-8dc77ed5cbf1" xlink:href="mpb-20260630.xsd#mpb_PaymentsToFundingLoansOriginatedForSale"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_PaymentsToFundingLoansOriginatedForSale_019e4114-5598-7c15-a674-8dc77ed5cbf1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_ProceedsFromSaleOfLoansOriginatedForSale_019e4114-5598-7c4b-908c-d3ffc499d5a1" xlink:href="mpb-20260630.xsd#mpb_ProceedsFromSaleOfLoansOriginatedForSale"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_ProceedsFromSaleOfLoansOriginatedForSale_019e4114-5598-7c4b-908c-d3ffc499d5a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_GainLossOnSalesOfLoans_019e4114-5598-7f8d-a03b-0b54873e504b" xlink:href="mpb-20260630.xsd#mpb_GainLossOnSalesOfLoans"/>
    <link:calculationArc order="15" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_GainLossOnSalesOfLoans_019e4114-5598-7f8d-a03b-0b54873e504b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_019e4114-5598-7eea-905d-4fd14818b6b8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <link:calculationArc order="16" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_019e4114-5598-7eea-905d-4fd14818b6b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019e4114-5598-7ecb-b599-771dc882a6c1" xlink:href="mpb-20260630.xsd#mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets"/>
    <link:calculationArc order="17" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019e4114-5598-7ecb-b599-771dc882a6c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_DiscountOnSubordinatedDebt_019e4114-5598-7f83-8b81-c52b194c03f6" xlink:href="mpb-20260630.xsd#mpb_DiscountOnSubordinatedDebt"/>
    <link:calculationArc order="18" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_DiscountOnSubordinatedDebt_019e4114-5598-7f83-8b81-c52b194c03f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionExpense_019e4114-5598-79b8-8e0a-8d6b32753d2c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccretionExpense"/>
    <link:calculationArc order="19" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_AccretionExpense_019e4114-5598-79b8-8e0a-8d6b32753d2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockExpense_019e4114-5598-7962-b920-81dc16d50b7c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedStockExpense"/>
    <link:calculationArc order="20" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_RestrictedStockExpense_019e4114-5598-7962-b920-81dc16d50b7c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockOptionPlanExpense_019e4114-5598-7d5d-b7ce-761465c22797" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockOptionPlanExpense"/>
    <link:calculationArc order="21" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_StockOptionPlanExpense_019e4114-5598-7d5d-b7ce-761465c22797" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019e4114-5598-78ba-946d-2cf4816c0f5e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="22" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019e4114-5598-78ba-946d-2cf4816c0f5e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables_019e4114-5598-7896-a60e-63f1d208fe80" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables"/>
    <link:calculationArc order="23" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables_019e4114-5598-7896-a60e-63f1d208fe80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_019e6eae-19c5-7d01-a368-35fd33530c97" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssets"/>
    <link:calculationArc order="24" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_019e6eae-19c5-7d01-a368-35fd33530c97" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities_019e72bd-d15c-75f6-b4b2-78c3dc48a3b3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities"/>
    <link:calculationArc order="25" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities_019e72bd-d15c-75f6-b4b2-78c3dc48a3b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_IncreaseDecreaseInOperatingLeaseLiabilities_019e72d1-f971-7111-9899-eff1f931c400" xlink:href="mpb-20260630.xsd#mpb_IncreaseDecreaseInOperatingLeaseLiabilities"/>
    <link:calculationArc order="26" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_mpb_IncreaseDecreaseInOperatingLeaseLiabilities_019e72d1-f971-7111-9899-eff1f931c400" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019fa2a4-6f47-7b5f-94ad-a25a456e0c01" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <link:calculationArc order="27" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e4114-5598-7a29-814e-9695d82c7d49" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019fa2a4-6f47-7b5f-94ad-a25a456e0c01" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/BusinessCombinationsScheduleofEstimatedFairValueofAssetsAcquiredDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#BusinessCombinationsScheduleofEstimatedFairValueofAssetsAcquiredDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/BusinessCombinationsScheduleofEstimatedFairValueofAssetsAcquiredDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_019e4114-566f-7719-b559-cf94c7027145" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7c66-b2c2-d64ca5099196" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_019e4114-566f-7719-b559-cf94c7027145" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7c66-b2c2-d64ca5099196" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019e4114-566f-75e8-b975-2428608e4d68" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_019e4114-566f-7719-b559-cf94c7027145" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019e4114-566f-75e8-b975-2428608e4d68" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019e7358-68d3-7229-ad76-d105146ceca8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationConsiderationTransferred1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationCashPaidInLieuOfFractionalShares_019e7358-68d3-7b05-89d4-e5d734757e61" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationCashPaidInLieuOfFractionalShares"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019e7358-68d3-7229-ad76-d105146ceca8" xlink:to="loc_mpb_BusinessCombinationCashPaidInLieuOfFractionalShares_019e7358-68d3-7b05-89d4-e5d734757e61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesGross_019e7358-68d3-76b5-b900-96702dfd37c3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireBusinessesGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019e7358-68d3-7229-ad76-d105146ceca8" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesGross_019e7358-68d3-76b5-b900-96702dfd37c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationPurchasePriceAssignedToStockOptionsSettledForCash_019e7358-68d3-7e0c-9c24-8fcff6ad225e" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationPurchasePriceAssignedToStockOptionsSettledForCash"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019e7358-68d3-7229-ad76-d105146ceca8" xlink:to="loc_mpb_BusinessCombinationPurchasePriceAssignedToStockOptionsSettledForCash_019e7358-68d3-7e0c-9c24-8fcff6ad225e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable_019e7358-68d3-7f92-a860-44906e5736db" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019e7358-68d3-7229-ad76-d105146ceca8" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable_019e7358-68d3-7f92-a860-44906e5736db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_019e4114-566f-7ca2-b42c-4cfbb94790e4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_019e4114-566f-7ca2-b42c-4cfbb94790e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedMoneyMarketDepositLiabilities_019e4114-566f-7b8b-a4c8-61c84f268361" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedMoneyMarketDepositLiabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedMoneyMarketDepositLiabilities_019e4114-566f-7b8b-a4c8-61c84f268361" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNonInterestBearingDemandDepositLiabilities_019e4114-566f-7996-b861-34883c445342" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNonInterestBearingDemandDepositLiabilities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNonInterestBearingDemandDepositLiabilities_019e4114-566f-7996-b861-34883c445342" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_019e4114-566f-71d3-a0e4-55bd7c18c998" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_019e4114-566f-71d3-a0e4-55bd7c18c998" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedTimeDepositLiabilities_019e4114-566f-7d97-8201-ed7062b7239f" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedTimeDepositLiabilities"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedTimeDepositLiabilities_019e4114-566f-7d97-8201-ed7062b7239f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInterestBearingDemandDepositLiabilities_019e4114-566f-7a84-9c65-06d49607e7b4" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInterestBearingDemandDepositLiabilities"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInterestBearingDemandDepositLiabilities_019e4114-566f-7a84-9c65-06d49607e7b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedSavingsDepositLiabilities_019e4114-566f-777b-9eb2-ab7035422a86" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedSavingsDepositLiabilities"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedSavingsDepositLiabilities_019e4114-566f-777b-9eb2-ab7035422a86" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCapitalLeaseObligation_019e4114-566f-7328-ba8b-2e6e7afa9f67" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCapitalLeaseObligation"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019e4114-566f-7e9d-aa5f-2a9fc723c8a6" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCapitalLeaseObligation_019e4114-566f-7328-ba8b-2e6e7afa9f67" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_019eb70f-dbff-7571-81e8-9ed5d74abc8c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_019eb70f-dbff-7571-81e8-9ed5d74abc8c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFederalFundsSold_019eb70f-dbff-71d9-aa9a-b46edcdf3f4c" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFederalFundsSold"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFederalFundsSold_019eb70f-dbff-71d9-aa9a-b46edcdf3f4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities_019eb70f-dbff-7fd6-864c-088cca0c8cbf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities_019eb70f-dbff-7fd6-864c-088cca0c8cbf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedAssetAcquiredLoansHeldForSale_019eb70f-dbff-72fb-87c0-88d8169248a3" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedAssetAcquiredLoansHeldForSale"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_mpb_BusinessCombinationRecognizedAssetAcquiredLoansHeldForSale_019eb70f-dbff-72fb-87c0-88d8169248a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets_019eb70f-dbff-7c3b-ad9e-db66b9c350f1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets_019eb70f-dbff-7c3b-ad9e-db66b9c350f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_019eb70f-dbff-75b8-9ee3-dc19806d4b20" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_019eb70f-dbff-75b8-9ee3-dc19806d4b20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_019eb70f-dbff-7faf-9486-b8734d08cfc5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_019eb70f-dbff-7faf-9486-b8734d08cfc5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOperatingLeaseRightOfUseAsset_019eb70f-dbff-7936-93c2-133aa38494d2" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOperatingLeaseRightOfUseAsset_019eb70f-dbff-7936-93c2-133aa38494d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashSurrenderValueOfLifeInsurance_019eb70f-dbff-7a05-8213-8470527bc632" xlink:href="mpb-20260630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashSurrenderValueOfLifeInsurance"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashSurrenderValueOfLifeInsurance_019eb70f-dbff-7a05-8213-8470527bc632" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_019eb70f-dbff-7498-9a89-92eefcf50ee7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_019eb70f-dbff-7498-9a89-92eefcf50ee7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables_019eb70f-dbff-7886-9152-9293932d40d5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables_019eb70f-dbff-7886-9152-9293932d40d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_019f043e-fd9b-7885-b6c8-e2aabcdc8372" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019eb70f-dbff-7040-be01-b5aa9df424b7" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_019f043e-fd9b-7885-b6c8-e2aabcdc8372" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019e4114-566f-7457-ab07-6eaa4083dbd5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019e4114-566f-7540-8f27-3bc59a568db2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019e4114-566f-7457-ab07-6eaa4083dbd5" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019e4114-566f-7540-8f27-3bc59a568db2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-566f-7455-8f90-2d8ec226a384" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019e4114-566f-7457-ab07-6eaa4083dbd5" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-566f-7455-8f90-2d8ec226a384" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-73e9-980c-a6a34db50b1b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_019e4114-566f-72b2-a4e5-76f765babf54" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-73e9-980c-a6a34db50b1b" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_019e4114-566f-72b2-a4e5-76f765babf54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019e4114-566f-74da-ae80-3276dbd7b7f1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-73e9-980c-a6a34db50b1b" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019e4114-566f-74da-ae80-3276dbd7b7f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019e4114-566f-7343-9396-8542a7724e5e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-73e9-980c-a6a34db50b1b" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019e4114-566f-7343-9396-8542a7724e5e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain_019e4114-566f-7e41-a26a-4a84a3acba35" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_019e4114-566f-7ae7-a7e0-7928acd77118" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain_019e4114-566f-7e41-a26a-4a84a3acba35" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_019e4114-566f-7ae7-a7e0-7928acd77118" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_019e4114-566f-73f6-b564-ed2387b329fe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain_019e4114-566f-7e41-a26a-4a84a3acba35" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_019e4114-566f-73f6-b564-ed2387b329fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019e4114-566f-7336-ad50-b048dc5559cc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7579-8fbb-b35e26ff88ca" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019e4114-566f-7336-ad50-b048dc5559cc" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7579-8fbb-b35e26ff88ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7fe3-b034-e3200d7253fe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019e4114-566f-7336-ad50-b048dc5559cc" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7fe3-b034-e3200d7253fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7206-8539-2c026673ff7b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_019e4114-566f-7c82-8507-e87b56dc1344" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7206-8539-2c026673ff7b" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_019e4114-566f-7c82-8507-e87b56dc1344" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_019e4114-566f-7f0e-99ba-f7c7a14b2fb5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7206-8539-2c026673ff7b" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_019e4114-566f-7f0e-99ba-f7c7a14b2fb5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-566f-74aa-b7f5-fb5e67e4d4f6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7206-8539-2c026673ff7b" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-566f-74aa-b7f5-fb5e67e4d4f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019e4114-566f-73ef-93f3-667bda59caee" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_019e4114-566f-7603-b4f2-e9ea1c1cecf5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019e4114-566f-73ef-93f3-667bda59caee" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_019e4114-566f-7603-b4f2-e9ea1c1cecf5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019e4114-566f-7554-b98e-ad304e6a81fa" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019e4114-566f-73ef-93f3-667bda59caee" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019e4114-566f-7554-b98e-ad304e6a81fa" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails_1" xlink:type="simple" xlink:href="mpb-20260630.xsd#InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails_1"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019e4114-566f-7506-b780-779f8e51c121" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain_019e4114-566f-732b-8f7c-ce24c1c0863a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019e4114-566f-7506-b780-779f8e51c121" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain_019e4114-566f-732b-8f7c-ce24c1c0863a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019e4114-566f-7cee-a59c-6e9d86c970f1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019e4114-566f-7506-b780-779f8e51c121" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019e4114-566f-7cee-a59c-6e9d86c970f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019e4114-566f-748e-931b-d7cff98929d5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019e4114-566f-7506-b780-779f8e51c121" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019e4114-566f-748e-931b-d7cff98929d5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofFairValueandUnrealizedLossonDebtSecurityInvestmentsinaContinuousUnrealizedLossPositionDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#InvestmentSecuritiesScheduleofFairValueandUnrealizedLossonDebtSecurityInvestmentsinaContinuousUnrealizedLossPositionDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofFairValueandUnrealizedLossonDebtSecurityInvestmentsinaContinuousUnrealizedLossPositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019e4114-566f-704e-9af8-8e4b0533fe1e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-79c1-a0bf-f5f8f74ba97a" xlink:href="mpb-20260630.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019e4114-566f-704e-9af8-8e4b0533fe1e" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-79c1-a0bf-f5f8f74ba97a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-75ee-a321-9e922a641c51" xlink:href="mpb-20260630.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019e4114-566f-704e-9af8-8e4b0533fe1e" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-75ee-a321-9e922a641c51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019e4114-566f-78b0-b6ae-418b9fb88a1a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019e4114-566f-776b-b447-0d7c88505c13" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019e4114-566f-78b0-b6ae-418b9fb88a1a" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019e4114-566f-776b-b447-0d7c88505c13" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019e4114-566f-7060-9a85-c3cb4b094df8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019e4114-566f-78b0-b6ae-418b9fb88a1a" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019e4114-566f-7060-9a85-c3cb4b094df8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_019e4114-566f-7439-a3aa-19a888feea97" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_019e4114-566f-7fd5-a5b4-0cc2d6955fbf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_019e4114-566f-7439-a3aa-19a888feea97" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_019e4114-566f-7fd5-a5b4-0cc2d6955fbf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019e4114-566f-7585-881f-9faac44ff07a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_019e4114-566f-7439-a3aa-19a888feea97" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019e4114-566f-7585-881f-9faac44ff07a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7e3c-a779-10502af976ab" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7a35-8039-f8cf82e448e3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7e3c-a779-10502af976ab" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7a35-8039-f8cf82e448e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019e4114-566f-76de-b2d9-5bbb15bb0e03" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7e3c-a779-10502af976ab" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019e4114-566f-76de-b2d9-5bbb15bb0e03" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-785b-b72d-0f30d0863f05" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_019e4114-566f-7a6c-9c9a-104cc1cfa07e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-785b-b72d-0f30d0863f05" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_019e4114-566f-7a6c-9c9a-104cc1cfa07e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-7b6f-9ac8-ed8d9118a3b1" xlink:href="mpb-20260630.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-785b-b72d-0f30d0863f05" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-7b6f-9ac8-ed8d9118a3b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019e4114-566f-7181-af72-4aa5a40144c7" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7782-afe9-24199cc24fd3" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019e4114-566f-7181-af72-4aa5a40144c7" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7782-afe9-24199cc24fd3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7104-86fe-cf9dd0e5917d" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019e4114-566f-7181-af72-4aa5a40144c7" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7104-86fe-cf9dd0e5917d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019e4114-566f-7655-8183-5fb73ddeea9c" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-79e3-934e-7a19329c9c38" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019e4114-566f-7655-8183-5fb73ddeea9c" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-79e3-934e-7a19329c9c38" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-7e39-87ff-2636a5f874d6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019e4114-566f-7655-8183-5fb73ddeea9c" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-7e39-87ff-2636a5f874d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019e4114-566f-75f8-911d-7abe73d2856f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7f54-95e9-501d17e50081" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019e4114-566f-75f8-911d-7abe73d2856f" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019e4114-566f-7f54-95e9-501d17e50081" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7880-b13a-035bbfd17ccb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019e4114-566f-75f8-911d-7abe73d2856f" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7880-b13a-035bbfd17ccb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019e4114-566f-759d-a242-8e644f8e9138" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-7243-8248-c4c361a48eb2" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019e4114-566f-759d-a242-8e644f8e9138" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019e4114-566f-7243-8248-c4c361a48eb2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-70c2-8586-a25514041f7b" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019e4114-566f-759d-a242-8e644f8e9138" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-70c2-8586-a25514041f7b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7110-8009-69f87c852b61" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7543-8bcf-878be5e877e6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7110-8009-69f87c852b61" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7543-8bcf-878be5e877e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019e4114-566f-7058-97d8-d5181e9c3c4c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019e4114-566f-7110-8009-69f87c852b61" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019e4114-566f-7058-97d8-d5181e9c3c4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7182-b088-42730be87aed" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-7692-b34d-8bcb5cc0651b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7182-b088-42730be87aed" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-7692-b34d-8bcb5cc0651b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-783e-b837-1e66dbd063d4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7182-b088-42730be87aed" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-783e-b837-1e66dbd063d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019e4114-566f-7e7c-94ae-c6577c9cca0d" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-7bdb-99f6-3cbed7b98bfc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019e4114-566f-7e7c-94ae-c6577c9cca0d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-7bdb-99f6-3cbed7b98bfc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-7dc1-94e2-a31298bb7251" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019e4114-566f-7e7c-94ae-c6577c9cca0d" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-7dc1-94e2-a31298bb7251" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7613-afa1-f5bf7b554ae3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-75c4-93f9-a484d6e8a875" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7613-afa1-f5bf7b554ae3" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019e4114-566f-75c4-93f9-a484d6e8a875" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-7a12-a949-090919b12a1c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7613-afa1-f5bf7b554ae3" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019e4114-566f-7a12-a949-090919b12a1c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-7bef-a0ad-4d575aed56cc" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-795a-8207-2a1be160ecec" xlink:href="mpb-20260630.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-7bef-a0ad-4d575aed56cc" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-795a-8207-2a1be160ecec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019e4114-566f-7197-8ae7-b73247cb766c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019e4114-566f-7bef-a0ad-4d575aed56cc" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019e4114-566f-7197-8ae7-b73247cb766c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7558-a190-831ea05eb0d6" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019e4114-566f-7870-95bf-d3a9b4ac9d4b" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7558-a190-831ea05eb0d6" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019e4114-566f-7870-95bf-d3a9b4ac9d4b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019e4114-566f-74b7-bfb3-3b315d048983" xlink:href="mpb-20260630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019e4114-566f-7558-a190-831ea05eb0d6" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019e4114-566f-74b7-bfb3-3b315d048983" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofInvestmentsClassifiedbyContractualMaturityDateDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#InvestmentSecuritiesScheduleofInvestmentsClassifiedbyContractualMaturityDateDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofInvestmentsClassifiedbyContractualMaturityDateDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7b49-a19a-879681a259bc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019e4114-566f-7139-b517-f3d470534917" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7b49-a19a-879681a259bc" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019e4114-566f-7139-b517-f3d470534917" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_019e4114-566f-7db2-bb2b-3d738d9b71d1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-7b49-a19a-879681a259bc" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_019e4114-566f-7db2-bb2b-3d738d9b71d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019e4114-566f-7e5d-909d-17ef00f820e3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_019e4114-566f-7609-a905-ac4ea1dd0c45" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019e4114-566f-7e5d-909d-17ef00f820e3" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_019e4114-566f-7609-a905-ac4ea1dd0c45" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019e4114-566f-7229-acd8-201c92c41c1e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019e4114-566f-7e5d-909d-17ef00f820e3" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019e4114-566f-7229-acd8-201c92c41c1e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019e4114-566f-77d2-804b-2be38d66c62f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019e4114-566f-7e5d-909d-17ef00f820e3" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019e4114-566f-77d2-804b-2be38d66c62f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_019e4114-566f-7f5c-a4cb-612339ebad55" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019e4114-566f-7e5d-909d-17ef00f820e3" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_019e4114-566f-7f5c-a4cb-612339ebad55" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019e4114-566f-7ffe-b5f2-88d41f5b4da2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_019e4114-566f-75d0-b11c-14ce0b821a27" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019e4114-566f-7ffe-b5f2-88d41f5b4da2" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_019e4114-566f-75d0-b11c-14ce0b821a27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_019e4114-566f-7688-acf4-6f6a0baea915" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019e4114-566f-7ffe-b5f2-88d41f5b4da2" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_019e4114-566f-7688-acf4-6f6a0baea915" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_019e4114-566f-7249-b784-63c2aa81f62f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019e4114-566f-7ffe-b5f2-88d41f5b4da2" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_019e4114-566f-7249-b784-63c2aa81f62f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_019e4114-566f-7c46-96aa-fe005bf7c04f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019e4114-566f-7ffe-b5f2-88d41f5b4da2" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_019e4114-566f-7c46-96aa-fe005bf7c04f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019e4114-566f-7ad0-bf1d-4134cd1460f1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019e4114-566f-7519-9664-1a942cd6383e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019e4114-566f-7ad0-bf1d-4134cd1460f1" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019e4114-566f-7519-9664-1a942cd6383e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_019e4114-566f-7a09-8969-cbdc7432b8b2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019e4114-566f-7ad0-bf1d-4134cd1460f1" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_019e4114-566f-7a09-8969-cbdc7432b8b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-566f-7087-afe3-fd90f14ce770" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_019e4114-566f-7083-be5e-02e5bcc1587a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-566f-7087-afe3-fd90f14ce770" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_019e4114-566f-7083-be5e-02e5bcc1587a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019e4114-566f-7595-9de8-c6a780478c72" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019e4114-566f-7087-afe3-fd90f14ce770" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019e4114-566f-7595-9de8-c6a780478c72" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019e4114-566f-726f-952c-cfbb9ca09a41" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10_019e4114-566f-77f5-81d9-d58c9d714793" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019e4114-566f-726f-952c-cfbb9ca09a41" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10_019e4114-566f-77f5-81d9-d58c9d714793" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_019e4114-566f-70f1-96f8-c0f84cfab011" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019e4114-566f-726f-952c-cfbb9ca09a41" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_019e4114-566f-70f1-96f8-c0f84cfab011" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_019e4114-566f-7962-927b-7674ea49c2d8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019e4114-566f-726f-952c-cfbb9ca09a41" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_019e4114-566f-7962-927b-7674ea49c2d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_019e4114-566f-7e23-81c3-b08dbfa83c2b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019e4114-566f-726f-952c-cfbb9ca09a41" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_019e4114-566f-7e23-81c3-b08dbfa83c2b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019e4114-566f-7ee2-9bf0-c0842683716a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue_019e4114-566f-7769-a172-3ebe1925693c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019e4114-566f-7ee2-9bf0-c0842683716a" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue_019e4114-566f-7769-a172-3ebe1925693c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019e4114-566f-7d79-9d13-2ff25ebdc926" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019e4114-566f-7ee2-9bf0-c0842683716a" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019e4114-566f-7d79-9d13-2ff25ebdc926" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019e4114-566f-7813-a77b-c870f780b761" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019e4114-566f-7ee2-9bf0-c0842683716a" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019e4114-566f-7813-a77b-c870f780b761" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_019e4114-566f-7e0b-902a-5e637e9e9c1e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019e4114-566f-7ee2-9bf0-c0842683716a" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_019e4114-566f-7e0b-902a-5e637e9e9c1e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-78bc-831a-aaca23888d2c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019e4114-566f-7448-9e10-92ab07c4c71d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-78bc-831a-aaca23888d2c" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019e4114-566f-7448-9e10-92ab07c4c71d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityWithoutSingleMaturityDate_019e4114-566f-7cd5-9051-81b4885dc252" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityWithoutSingleMaturityDate"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019e4114-566f-78bc-831a-aaca23888d2c" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityWithoutSingleMaturityDate_019e4114-566f-7cd5-9051-81b4885dc252" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-7702-8b0c-49c6ccc48eb9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-75ce-b44b-d9912dd80f49" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-7702-8b0c-49c6ccc48eb9" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-75ce-b44b-d9912dd80f49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-740a-87d0-14ff3260a140" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-7702-8b0c-49c6ccc48eb9" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-740a-87d0-14ff3260a140" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearWriteoff_019e4114-566f-715b-ac0e-6c5a316e781a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearWriteoff"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearWriteoff_019e4114-566f-715b-ac0e-6c5a316e781a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-7262-89a2-0f335ba2a552" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearWriteoff"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-7262-89a2-0f335ba2a552" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolvingWriteoff_019e4114-566f-7ff8-8296-ae11f6f48b6c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestRevolvingWriteoff"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolvingWriteoff_019e4114-566f-7ff8-8296-ae11f6f48b6c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearWriteoff_019e4114-566f-7f8e-9cd6-e4420bfb66af" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearWriteoff"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearWriteoff_019e4114-566f-7f8e-9cd6-e4420bfb66af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-72c4-894f-4d9dd05fd2bf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearWriteoff"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-72c4-894f-4d9dd05fd2bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-7ffe-8991-025aa591da8a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearWriteoff"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-7ffe-8991-025aa591da8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-7771-955f-f91620150ec3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearWriteoff"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019e4114-566f-7703-8c7c-c4d527d6a1c7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearWriteoff_019e4114-566f-7771-955f-f91620150ec3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearRecovery_019e4114-566f-7f7e-89c9-47d8822a2ed3" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearRecovery"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearRecovery_019e4114-566f-7f7e-89c9-47d8822a2ed3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-726d-9f23-1f64b32dedac" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearRecovery"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-726d-9f23-1f64b32dedac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-70a7-934b-5eab4b113e23" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearRecovery"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-70a7-934b-5eab4b113e23" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-7b7c-9d78-9292e3e72def" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearRecovery"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-7b7c-9d78-9292e3e72def" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-7757-82f6-bade1d1aa693" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearRecovery"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearRecovery_019e4114-566f-7757-82f6-bade1d1aa693" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearRecovery_019e4114-566f-7349-91ec-21f9da4e7f3b" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearRecovery"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearRecovery_019e4114-566f-7349-91ec-21f9da4e7f3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingRecovery_019e4114-566f-73f8-b4b6-82bfc015ab3c" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestRevolvingRecovery"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019e4114-566f-7509-814e-480248702657" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingRecovery_019e4114-566f-73f8-b4b6-82bfc015ab3c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails_1" xlink:type="simple" xlink:href="mpb-20260630.xsd#LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails_1"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-7ff7-88d9-246728f04b52" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearNetWriteoffRecovery"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-7ff7-88d9-246728f04b52" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-77fa-bbd0-04556403a5b5" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearNetWriteoffRecovery"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-77fa-bbd0-04556403a5b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-7dba-8564-ca8435cf5650" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearNetWriteoffRecovery"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-7dba-8564-ca8435cf5650" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-721d-b885-02356d5294a6" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearNetWriteoffRecovery"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-721d-b885-02356d5294a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-75a2-be36-a3c98d344119" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearNetWriteoffRecovery"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-75a2-be36-a3c98d344119" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-74f4-9057-9385b3229415" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearNetWriteoffRecovery"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019e4114-566f-74f4-9057-9385b3229415" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingNetWriteoffRecovery_019e4114-566f-705b-8aa7-bd60becfddce" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableExcludingAccruedInterestRevolvingNetWriteoffRecovery"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoffAfterRecovery_019e4114-566f-70cc-9d67-c807808efeb4" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingNetWriteoffRecovery_019e4114-566f-705b-8aa7-bd60becfddce" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/DepositsScheduleofDepositLiabilitiesTypeDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#DepositsScheduleofDepositLiabilitiesTypeDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/DepositsScheduleofDepositLiabilitiesTypeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDeposits_019e4114-566f-7db8-aef2-0ed4fc59cb1e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PercentageOfInterestBearingDomesticDepositsToDeposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsTimeDeposits_019e4114-566f-7563-b940-12a7940e4c6a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsTimeDeposits"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDeposits_019e4114-566f-7db8-aef2-0ed4fc59cb1e" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsTimeDeposits_019e4114-566f-7563-b940-12a7940e4c6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019e4114-566f-7e7a-a175-edaf42f0f9cc" xlink:href="mpb-20260630.xsd#mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDeposits_019e4114-566f-7db8-aef2-0ed4fc59cb1e" xlink:to="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019e4114-566f-7e7a-a175-edaf42f0f9cc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019e4114-566f-76fe-8918-94d6b90b1847" xlink:href="mpb-20260630.xsd#mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsSavings_019e4114-566f-78ab-97dd-f6351a08983f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsSavings"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019e4114-566f-76fe-8918-94d6b90b1847" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsSavings_019e4114-566f-78ab-97dd-f6351a08983f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsMoneyMarket_019e4114-566f-7074-831b-33c6c9f61129" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsMoneyMarket"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019e4114-566f-76fe-8918-94d6b90b1847" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsMoneyMarket_019e4114-566f-7074-831b-33c6c9f61129" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsDemand_019e4114-566f-7f00-92f0-796b47208831" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsDemand"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019e4114-566f-76fe-8918-94d6b90b1847" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsDemand_019e4114-566f-7f00-92f0-796b47208831" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PercentageOfNoninterestBearingDomesticDepositsToDepositsDemand_019e4114-566f-7413-8b9c-458aeb73493d" xlink:href="mpb-20260630.xsd#mpb_PercentageOfNoninterestBearingDomesticDepositsToDepositsDemand"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019e4114-566f-76fe-8918-94d6b90b1847" xlink:to="loc_mpb_PercentageOfNoninterestBearingDomesticDepositsToDepositsDemand_019e4114-566f-7413-8b9c-458aeb73493d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Deposits_019e4114-566f-759e-aafc-ee96d78d1510" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Deposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDeposits_019e4114-566f-7479-aba2-ce29424932da" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDeposits"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Deposits_019e4114-566f-759e-aafc-ee96d78d1510" xlink:to="loc_us-gaap_TimeDeposits_019e4114-566f-7479-aba2-ce29424932da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_DepositsDemandAndSavingsDeposits_019e4114-566f-771e-a3ec-48dffe98376a" xlink:href="mpb-20260630.xsd#mpb_DepositsDemandAndSavingsDeposits"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Deposits_019e4114-566f-759e-aafc-ee96d78d1510" xlink:to="loc_mpb_DepositsDemandAndSavingsDeposits_019e4114-566f-771e-a3ec-48dffe98376a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_DepositsDemandAndSavingsDeposits_019e4114-566f-7a4b-9327-c17c024f157d" xlink:href="mpb-20260630.xsd#mpb_DepositsDemandAndSavingsDeposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepositsMoneyMarketDeposits_019e4114-566f-78a5-b84a-6e7e54460701" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepositsMoneyMarketDeposits"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_DepositsDemandAndSavingsDeposits_019e4114-566f-7a4b-9327-c17c024f157d" xlink:to="loc_us-gaap_DepositsMoneyMarketDeposits_019e4114-566f-78a5-b84a-6e7e54460701" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestBearingDomesticDepositDemand_019e4114-566f-7579-a9f9-7f2421f300b8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestBearingDomesticDepositDemand"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_DepositsDemandAndSavingsDeposits_019e4114-566f-7a4b-9327-c17c024f157d" xlink:to="loc_us-gaap_InterestBearingDomesticDepositDemand_019e4114-566f-7579-a9f9-7f2421f300b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestBearingDepositLiabilities_019e4114-566f-740c-b4d7-0275cbdddaa6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestBearingDepositLiabilities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_DepositsDemandAndSavingsDeposits_019e4114-566f-7a4b-9327-c17c024f157d" xlink:to="loc_us-gaap_NoninterestBearingDepositLiabilities_019e4114-566f-740c-b4d7-0275cbdddaa6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepositsSavingsDeposits_019e4114-566f-75b4-b2cc-273f52a29b74" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepositsSavingsDeposits"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_DepositsDemandAndSavingsDeposits_019e4114-566f-7a4b-9327-c17c024f157d" xlink:to="loc_us-gaap_DepositsSavingsDeposits_019e4114-566f-75b4-b2cc-273f52a29b74" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/DepositsScheduleofTimeDepositsByMaturityDateDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#DepositsScheduleofTimeDepositsByMaturityDateDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/DepositsScheduleofTimeDepositsByMaturityDateDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDeposits_019e4114-566f-7673-a62f-3951e689224b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDeposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesYearThree_019e4114-566f-7055-a942-ab70733d9805" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDepositMaturitiesYearThree"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_TimeDeposits_019e4114-566f-7673-a62f-3951e689224b" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearThree_019e4114-566f-7055-a942-ab70733d9805" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesYearTwo_019e4114-566f-7172-afe5-aed62490e1fc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDepositMaturitiesYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_TimeDeposits_019e4114-566f-7673-a62f-3951e689224b" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearTwo_019e4114-566f-7172-afe5-aed62490e1fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesYearFour_019e4114-566f-7e0b-9924-853ec24e3a6a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDepositMaturitiesYearFour"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_TimeDeposits_019e4114-566f-7673-a62f-3951e689224b" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearFour_019e4114-566f-7e0b-9924-853ec24e3a6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesYearOne_019e4114-566f-746e-85ee-7687c76067d3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDepositMaturitiesYearOne"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_TimeDeposits_019e4114-566f-7673-a62f-3951e689224b" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearOne_019e4114-566f-746e-85ee-7687c76067d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_TimeDepositMaturitiesAfterYearFour_019e4114-566f-7421-b6e4-78daea55fd73" xlink:href="mpb-20260630.xsd#mpb_TimeDepositMaturitiesAfterYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_TimeDeposits_019e4114-566f-7673-a62f-3951e689224b" xlink:to="loc_mpb_TimeDepositMaturitiesAfterYearFour_019e4114-566f-7421-b6e4-78daea55fd73" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesRemainderOfFiscalYear_019e4114-566f-734b-8ae2-6e396967ccb0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TimeDepositMaturitiesRemainderOfFiscalYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_TimeDeposits_019e4114-566f-7673-a62f-3951e689224b" xlink:to="loc_us-gaap_TimeDepositMaturitiesRemainderOfFiscalYear_019e4114-566f-734b-8ae2-6e396967ccb0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/DebtScheduleofLongtermDebtOutstandingbyDueDateDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#DebtScheduleofLongtermDebtOutstandingbyDueDateDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/DebtScheduleofLongtermDebtOutstandingbyDueDateDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalHomeLoanBankAdvancesLongTerm_019e4114-573d-702a-baa6-7a0c511a9477" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FederalHomeLoanBankAdvancesLongTerm"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FederalHomeLoanBankAdvancesLongTermAfterFairValueAdjustment_019e4114-573d-7eb2-9aeb-b92d5fd582be" xlink:href="mpb-20260630.xsd#mpb_FederalHomeLoanBankAdvancesLongTermAfterFairValueAdjustment"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FederalHomeLoanBankAdvancesLongTerm_019e4114-573d-702a-baa6-7a0c511a9477" xlink:to="loc_mpb_FederalHomeLoanBankAdvancesLongTermAfterFairValueAdjustment_019e4114-573d-7eb2-9aeb-b92d5fd582be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FederalHomeLoanBankAdvancesLeaseObligationsIncludedInLongTermDebt_019e4114-573d-7bc3-9d52-e14641a508ac" xlink:href="mpb-20260630.xsd#mpb_FederalHomeLoanBankAdvancesLeaseObligationsIncludedInLongTermDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FederalHomeLoanBankAdvancesLongTerm_019e4114-573d-702a-baa6-7a0c511a9477" xlink:to="loc_mpb_FederalHomeLoanBankAdvancesLeaseObligationsIncludedInLongTermDebt_019e4114-573d-7bc3-9d52-e14641a508ac" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/EarningsPerShareScheduleofComputationofBasicandDilutedEarningsPerCommonShareDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#EarningsPerShareScheduleofComputationofBasicandDilutedEarningsPerCommonShareDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/EarningsPerShareScheduleofComputationofBasicandDilutedEarningsPerCommonShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019e4114-573d-73c6-bb74-e8790687d9b8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019e4114-573d-7aff-9b3e-8eae120c089e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019e4114-573d-73c6-bb74-e8790687d9b8" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019e4114-573d-7aff-9b3e-8eae120c089e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_019e4114-573d-7d40-a641-774a47a83f25" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019e4114-573d-73c6-bb74-e8790687d9b8" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_019e4114-573d-7d40-a641-774a47a83f25" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/SegmentReportingScheduleofSegmentReportingInformationDetails" xlink:type="simple" xlink:href="mpb-20260630.xsd#SegmentReportingScheduleofSegmentReportingInformationDetails"/>
  <link:calculationLink xlink:role="http://www.midpennbank.com/role/SegmentReportingScheduleofSegmentReportingInformationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e4114-573d-7cef-8448-33cec8793d62" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019e4114-573d-7b79-bd5a-6f112bf19cc8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e4114-573d-7cef-8448-33cec8793d62" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019e4114-573d-7b79-bd5a-6f112bf19cc8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableCreditLossExpenseReversalAdjusted_019e4114-573d-7a63-8ae8-af93d7b641fe" xlink:href="mpb-20260630.xsd#mpb_FinancingReceivableCreditLossExpenseReversalAdjusted"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e4114-573d-7cef-8448-33cec8793d62" xlink:to="loc_mpb_FinancingReceivableCreditLossExpenseReversalAdjusted_019e4114-573d-7a63-8ae8-af93d7b641fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_019e4114-573d-76b6-9362-ca1f136c1987" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e4114-573d-7cef-8448-33cec8793d62" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_019e4114-573d-76b6-9362-ca1f136c1987" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_019e4114-573d-7471-9c70-a2c15c8a63db" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestIncome"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e4114-573d-7cef-8448-33cec8793d62" xlink:to="loc_us-gaap_NoninterestIncome_019e4114-573d-7471-9c70-a2c15c8a63db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_019e4114-573d-769a-83c7-ed58a3d1779a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoninterestExpense"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e4114-573d-7cef-8448-33cec8793d62" xlink:to="loc_us-gaap_NoninterestExpense_019e4114-573d-769a-83c7-ed58a3d1779a" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
