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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019febdd-88b0-775d-ad03-bd81055b2c31,g:0ce37256-b521-4158-856b-9f22622c50f1-->
<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-20260930.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_019febdd-8f21-7eb7-b8fd-14e032f942a3" 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_019febdd-8f21-7d31-80ee-a4d1560e8859" 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_019febdd-8f21-7eb7-b8fd-14e032f942a3" xlink:to="loc_us-gaap_TimeDeposits_019febdd-8f21-7d31-80ee-a4d1560e8859" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestBearingDepositLiabilities_019febdd-8f21-7ca3-bb87-b9f6cac4b859" 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_019febdd-8f21-7eb7-b8fd-14e032f942a3" xlink:to="loc_us-gaap_InterestBearingDepositLiabilities_019febdd-8f21-7ca3-bb87-b9f6cac4b859" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestBearingDepositLiabilitiesDomestic_019febdd-8f21-7fb1-a19f-6f74e75bbdc1" 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_019febdd-8f21-7eb7-b8fd-14e032f942a3" xlink:to="loc_us-gaap_NoninterestBearingDepositLiabilitiesDomestic_019febdd-8f21-7fb1-a19f-6f74e75bbdc1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019febdd-8f21-7be6-87b4-ea0efe114bc4" 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_019febdd-8f21-76ba-ad1d-91b3c8de89a0" 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_019febdd-8f21-7be6-87b4-ea0efe114bc4" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8f21-76ba-ad1d-91b3c8de89a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_019febdd-8f21-7837-a302-6915fc285a83" 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_019febdd-8f21-7be6-87b4-ea0efe114bc4" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_019febdd-8f21-7837-a302-6915fc285a83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019febdd-8f21-7f83-b465-63c776e8fb74" 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_019febdd-8f21-77af-9108-e110cea3342b" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_Goodwill_019febdd-8f21-77af-9108-e110cea3342b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019febdd-8f21-7175-b56e-7540bd3594ab" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019febdd-8f21-7175-b56e-7540bd3594ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019febdd-8f21-711f-88a4-b39ff4f456c3" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019febdd-8f21-711f-88a4-b39ff4f456c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansReceivableHeldForSaleNetNotPartOfDisposalGroup_019febdd-8f21-76d6-acc7-8768755a155e" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_LoansReceivableHeldForSaleNetNotPartOfDisposalGroup_019febdd-8f21-76d6-acc7-8768755a155e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_019febdd-8f21-7b93-9049-ba80d4f59fa8" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_019febdd-8f21-7b93-9049-ba80d4f59fa8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019febdd-8f21-79ed-817d-722c3a52c166" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019febdd-8f21-79ed-817d-722c3a52c166" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_019febdd-8f21-7277-9993-29116a9dfa3f" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_019febdd-8f21-7277-9993-29116a9dfa3f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019febdd-8f21-727e-b5c0-b355cc653df4" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019febdd-8f21-727e-b5c0-b355cc653df4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiCurrentAndNoncurrent_019febdd-8f21-7498-a6a9-ed11a301e5da" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_EquitySecuritiesFvNiCurrentAndNoncurrent_019febdd-8f21-7498-a6a9-ed11a301e5da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealEstateAcquiredThroughForeclosure_019febdd-8f21-71b4-a5ef-d667bf2ce300" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_RealEstateAcquiredThroughForeclosure_019febdd-8f21-71b4-a5ef-d667bf2ce300" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BankOwnedLifeInsurance_019febdd-8f21-7ab5-95c4-77c844662f78" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_BankOwnedLifeInsurance_019febdd-8f21-7ab5-95c4-77c844662f78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestReceivable_019febdd-8f21-7299-986b-4062b5c4c59e" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_InterestReceivable_019febdd-8f21-7299-986b-4062b5c4c59e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019febdd-8f21-7e8c-9a92-74bd9917e16a" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_019febdd-8f21-7e8c-9a92-74bd9917e16a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_019febdd-8f21-7dbb-b168-014179b975bc" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_OtherAssets_019febdd-8f21-7dbb-b168-014179b975bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019febdd-8f21-73ce-a388-2d5efa6cd919" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019febdd-8f21-73ce-a388-2d5efa6cd919" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalHomeLoanBankStock_019febdd-8f21-7e71-b086-4fe93bf9e2d4" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_FederalHomeLoanBankStock_019febdd-8f21-7e71-b086-4fe93bf9e2d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8f21-7df9-bbf1-d2f4c457a339" 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_019febdd-8f21-7f83-b465-63c776e8fb74" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8f21-7df9-bbf1-d2f4c457a339" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsAndFederalFundsSold_019febdd-8f21-751d-bf74-5841d04c0cdd" 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_019febdd-8f21-7d4c-91b3-88f1f4df3772" 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_019febdd-8f21-751d-bf74-5841d04c0cdd" xlink:to="loc_us-gaap_CashAndDueFromBanks_019febdd-8f21-7d4c-91b3-88f1f4df3772" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestBearingDepositsInBanks_019febdd-8f21-7bdf-b5d8-d9b9f3264702" 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_019febdd-8f21-751d-bf74-5841d04c0cdd" xlink:to="loc_us-gaap_InterestBearingDepositsInBanks_019febdd-8f21-7bdf-b5d8-d9b9f3264702" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalFundsSold_019febdd-8f21-776d-8d54-d350ebc4f413" 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_019febdd-8f21-751d-bf74-5841d04c0cdd" xlink:to="loc_us-gaap_FederalFundsSold_019febdd-8f21-776d-8d54-d350ebc4f413" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019febdd-8f21-7a44-b5e4-091fba08e9e5" 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_019febdd-8f21-7846-86a5-907fbc404438" 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_019febdd-8f21-7a44-b5e4-091fba08e9e5" xlink:to="loc_us-gaap_OperatingLeaseLiability_019febdd-8f21-7846-86a5-907fbc404438" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalHomeLoanBankAdvancesLongTerm_019febdd-8f21-7f2d-9948-58007f0e956d" 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_019febdd-8f21-7a44-b5e4-091fba08e9e5" xlink:to="loc_us-gaap_FederalHomeLoanBankAdvancesLongTerm_019febdd-8f21-7f2d-9948-58007f0e956d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Deposits_019febdd-8f21-7c26-984b-09e71b7edea3" 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_019febdd-8f21-7a44-b5e4-091fba08e9e5" xlink:to="loc_us-gaap_Deposits_019febdd-8f21-7c26-984b-09e71b7edea3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_019febdd-8f21-78cb-9277-466ba38d58fc" 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_019febdd-8f21-7a44-b5e4-091fba08e9e5" xlink:to="loc_us-gaap_ShortTermBorrowings_019febdd-8f21-78cb-9277-466ba38d58fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_019febdd-8f21-7868-9b50-1e1c237771f5" 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_019febdd-8f21-7a44-b5e4-091fba08e9e5" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_019febdd-8f21-7868-9b50-1e1c237771f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_019febdd-8f21-78af-9c52-15e85681ce9e" 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_019febdd-8f21-7a44-b5e4-091fba08e9e5" xlink:to="loc_us-gaap_OtherLiabilities_019febdd-8f21-78af-9c52-15e85681ce9e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019febdd-8f21-73fc-bb42-5408634d1006" 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_019febdd-8f21-7b1f-8b82-c56673d2abb9" 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_019febdd-8f21-73fc-bb42-5408634d1006" xlink:to="loc_us-gaap_Liabilities_019febdd-8f21-7b1f-8b82-c56673d2abb9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019febdd-8f21-7345-894f-1458fe73fce6" 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_019febdd-8f21-73fc-bb42-5408634d1006" xlink:to="loc_us-gaap_StockholdersEquity_019febdd-8f21-7345-894f-1458fe73fce6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019febdd-8f21-7d28-8ddf-b07ec5e2d41d" 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_019febdd-8f21-789d-b08c-01260a2e62be" 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_019febdd-8f21-7d28-8ddf-b07ec5e2d41d" xlink:to="loc_us-gaap_CommonStockValue_019febdd-8f21-789d-b08c-01260a2e62be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_019febdd-8f21-714a-a751-5e5fdffd81a1" 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_019febdd-8f21-7d28-8ddf-b07ec5e2d41d" xlink:to="loc_us-gaap_AdditionalPaidInCapital_019febdd-8f21-714a-a751-5e5fdffd81a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019febdd-8f21-702e-8553-caab3dcc4f4d" 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_019febdd-8f21-7d28-8ddf-b07ec5e2d41d" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019febdd-8f21-702e-8553-caab3dcc4f4d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019febdd-8f21-7ce9-859c-4fad5255f2e7" 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_019febdd-8f21-7d28-8ddf-b07ec5e2d41d" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019febdd-8f21-7ce9-859c-4fad5255f2e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_019febdd-8f21-7e0f-8b45-300893cba8f1" 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_019febdd-8f21-7d28-8ddf-b07ec5e2d41d" xlink:to="loc_us-gaap_TreasuryStockValue_019febdd-8f21-7e0f-8b45-300893cba8f1" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFINCOMEUNAUDITED" xlink:type="simple" xlink:href="mpb-20260930.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_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019febdd-8f21-7491-b5e1-c681d4f2437e" 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_019febdd-8f21-7705-91f9-1d6f32ae840b" 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_019febdd-8f21-7491-b5e1-c681d4f2437e" xlink:to="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_019febdd-8f21-7705-91f9-1d6f32ae840b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_019febdd-8f21-764a-b41e-982fb61c2a30" 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_019febdd-8f21-7491-b5e1-c681d4f2437e" xlink:to="loc_us-gaap_NoninterestIncome_019febdd-8f21-764a-b41e-982fb61c2a30" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_019febdd-8f21-7b39-a191-e91d5ea92e5d" 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_019febdd-8f21-7491-b5e1-c681d4f2437e" xlink:to="loc_us-gaap_NoninterestExpense_019febdd-8f21-7b39-a191-e91d5ea92e5d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_019febdd-8f21-7673-a0b3-0f838b8873f6" 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_019febdd-8f21-75de-a28e-1d37028cdf28" 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_019febdd-8f21-7673-a0b3-0f838b8873f6" xlink:to="loc_us-gaap_InterestAndDividendIncomeOperating_019febdd-8f21-75de-a28e-1d37028cdf28" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseOperating_019febdd-8f21-7860-a45e-90df33d059f9" 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_019febdd-8f21-7673-a0b3-0f838b8873f6" xlink:to="loc_us-gaap_InterestExpenseOperating_019febdd-8f21-7860-a45e-90df33d059f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019febdd-8f21-7d6f-aebc-989904777420" 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_019febdd-8f21-73c7-84a9-beb77f8c31bc" 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_019febdd-8f21-7d6f-aebc-989904777420" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019febdd-8f21-73c7-84a9-beb77f8c31bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019febdd-8f21-7c41-9033-8b32c779d1a1" 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_019febdd-8f21-7d6f-aebc-989904777420" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019febdd-8f21-7c41-9033-8b32c779d1a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019febdd-8f21-7946-af62-2da7f4a7ac86" 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_019febdd-8f21-705d-a4ef-d72bdd52de88" 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_019febdd-8f21-7946-af62-2da7f4a7ac86" xlink:to="loc_us-gaap_ProvisionForLoanLossesExpensed_019febdd-8f21-705d-a4ef-d72bdd52de88" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForOtherCreditLosses_019febdd-8f21-7a49-9e12-18950a7e1498" 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_019febdd-8f21-7946-af62-2da7f4a7ac86" xlink:to="loc_us-gaap_ProvisionForOtherCreditLosses_019febdd-8f21-7a49-9e12-18950a7e1498" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_019febdd-8f21-76dc-8143-6a955faa0ef3" 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_019febdd-8f21-7c30-ba4e-9989925c7446" 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_019febdd-8f21-76dc-8143-6a955faa0ef3" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_019febdd-8f21-7c30-ba4e-9989925c7446" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019febdd-8f21-790c-ba66-45105b8410fc" 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_019febdd-8f21-76dc-8143-6a955faa0ef3" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019febdd-8f21-790c-ba66-45105b8410fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_019febdd-8f21-7ac7-a5aa-ce602bd8c4ea" 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_019febdd-8f21-72c3-be05-8634f45c45aa" 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_019febdd-8f21-7ac7-a5aa-ce602bd8c4ea" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019febdd-8f21-72c3-be05-8634f45c45aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSalesOfLoansNet_019febdd-8f21-7549-aab2-40086d43f89a" 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_019febdd-8f21-7ac7-a5aa-ce602bd8c4ea" xlink:to="loc_us-gaap_GainLossOnSalesOfLoansNet_019febdd-8f21-7549-aab2-40086d43f89a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BankOwnedLifeInsuranceIncome_019febdd-8f21-72c0-8729-f348a5604200" 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_019febdd-8f21-7ac7-a5aa-ce602bd8c4ea" xlink:to="loc_us-gaap_BankOwnedLifeInsuranceIncome_019febdd-8f21-72c0-8729-f348a5604200" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_019febdd-8f21-7a46-8206-33665423d6d3" 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_019febdd-8f21-7ac7-a5aa-ce602bd8c4ea" xlink:to="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_019febdd-8f21-7a46-8206-33665423d6d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_019febdd-8f21-7fb8-a3b0-cbd53f849150" 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_019febdd-8f21-7a36-9238-d8c38e97c7ef" 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_019febdd-8f21-7fb8-a3b0-cbd53f849150" xlink:to="loc_us-gaap_InterestIncomeFederalFundsSold_019febdd-8f21-7a36-9238-d8c38e97c7ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeSecuritiesStateAndMunicipal_019febdd-8f21-7d4d-8c11-260cc3d38ff8" 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_019febdd-8f21-7fb8-a3b0-cbd53f849150" xlink:to="loc_us-gaap_InterestIncomeSecuritiesStateAndMunicipal_019febdd-8f21-7d4d-8c11-260cc3d38ff8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_019febdd-8f21-732c-8326-85faccd3514a" 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_019febdd-8f21-7fb8-a3b0-cbd53f849150" xlink:to="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_019febdd-8f21-732c-8326-85faccd3514a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper_019febdd-8f21-7df0-a973-6528fb79edbd" 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_019febdd-8f21-7fb8-a3b0-cbd53f849150" xlink:to="loc_us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper_019febdd-8f21-7df0-a973-6528fb79edbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment_019febdd-8f21-7b41-9ed7-ea39f9fb985f" 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_019febdd-8f21-7fb8-a3b0-cbd53f849150" xlink:to="loc_us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment_019febdd-8f21-7b41-9ed7-ea39f9fb985f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseOperating_019febdd-8f21-7d52-b42d-dd1ec24a57b1" 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_019febdd-8f21-7a58-a29f-13d1f51c8608" 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_019febdd-8f21-7d52-b42d-dd1ec24a57b1" xlink:to="loc_us-gaap_InterestExpenseDomesticDeposits_019febdd-8f21-7a58-a29f-13d1f51c8608" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseShortTermBorrowings_019febdd-8f21-72a4-9576-b1a397fabaea" 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_019febdd-8f21-7d52-b42d-dd1ec24a57b1" xlink:to="loc_us-gaap_InterestExpenseShortTermBorrowings_019febdd-8f21-72a4-9576-b1a397fabaea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_InterestOnLongTermAndSubordinatedDebt_019febdd-8f21-7198-9a26-36efefa4ed3a" xlink:href="mpb-20260930.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_019febdd-8f21-7d52-b42d-dd1ec24a57b1" xlink:to="loc_mpb_InterestOnLongTermAndSubordinatedDebt_019febdd-8f21-7198-9a26-36efefa4ed3a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_019febdd-8f21-78be-8c79-ae749e47c6e9" 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_019febdd-8f21-7cf2-ad29-5bbb3c746af9" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019febdd-8f21-7cf2-ad29-5bbb3c746af9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FederalDepositInsuranceCorporationAssessmentExpenseBenefit_019febdd-8f21-76e9-85df-619d837e03ea" xlink:href="mpb-20260930.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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_mpb_FederalDepositInsuranceCorporationAssessmentExpenseBenefit_019febdd-8f21-76e9-85df-619d837e03ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019febdd-8f21-7e40-94ff-1d37b8b63121" xlink:href="mpb-20260930.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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019febdd-8f21-7e40-94ff-1d37b8b63121" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_019febdd-8f21-7516-b27e-65692a05819d" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_LaborAndRelatedExpense_019febdd-8f21-7516-b27e-65692a05819d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoninterestExpense_019febdd-8f21-740e-8352-c2b5776b2467" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_OtherNoninterestExpense_019febdd-8f21-740e-8352-c2b5776b2467" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_CardProcessingFees_019febdd-8f21-749a-8ac5-fb3b08a365c3" xlink:href="mpb-20260930.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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_mpb_CardProcessingFees_019febdd-8f21-749a-8ac5-fb3b08a365c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfessionalFees_019febdd-8f21-71f6-8139-7dc53462d5a5" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_ProfessionalFees_019febdd-8f21-71f6-8139-7dc53462d5a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OccupancyNet_019febdd-8f21-7a17-857d-141c71285de0" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_OccupancyNet_019febdd-8f21-7a17-857d-141c71285de0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InformationTechnologyAndDataProcessing_019febdd-8f21-73d2-81e6-3c40cd12d381" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_InformationTechnologyAndDataProcessing_019febdd-8f21-73d2-81e6-3c40cd12d381" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_SharesTaxExpense_019febdd-8f21-7125-bd07-b7bfa2809582" xlink:href="mpb-20260930.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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_mpb_SharesTaxExpense_019febdd-8f21-7125-bd07-b7bfa2809582" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquipmentExpense_019febdd-8f21-756d-8b3d-741480e8547a" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_EquipmentExpense_019febdd-8f21-756d-8b3d-741480e8547a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_019febdd-8f21-7607-bbf5-b961796fa7fb" 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_019febdd-8f21-78be-8c79-ae749e47c6e9" xlink:to="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_019febdd-8f21-7607-bbf5-b961796fa7fb" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEUNAUDITED" xlink:type="simple" xlink:href="mpb-20260930.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_ComprehensiveIncomeNetOfTax_019febdd-8f21-731e-af0a-429aa3892f93" 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_019febdd-8f21-770e-b78a-01e513ed19cc" 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_019febdd-8f21-731e-af0a-429aa3892f93" xlink:to="loc_us-gaap_NetIncomeLoss_019febdd-8f21-770e-b78a-01e513ed19cc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019febdd-8f21-7b80-95b4-45bac90526e2" 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_019febdd-8f21-731e-af0a-429aa3892f93" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019febdd-8f21-7b80-95b4-45bac90526e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_019febdd-8f21-7914-a4a5-72bf440ea72f" 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_019febdd-8f21-7673-bd07-d7bca44cca55" 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_019febdd-8f21-7914-a4a5-72bf440ea72f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_019febdd-8f21-7673-bd07-d7bca44cca55" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_019febdd-8f21-70ed-9b27-d95068dacd2b" 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_019febdd-8f21-7914-a4a5-72bf440ea72f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_019febdd-8f21-70ed-9b27-d95068dacd2b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_019febdd-8f21-739f-a40f-0f44b8890102" 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_019febdd-8f21-7914-a4a5-72bf440ea72f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_019febdd-8f21-739f-a40f-0f44b8890102" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForSettlementNetGainLossNetOfTax_019febdd-8f21-7b77-bb20-c91d164359db" xlink:href="mpb-20260930.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_019febdd-8f21-7914-a4a5-72bf440ea72f" xlink:to="loc_mpb_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForSettlementNetGainLossNetOfTax_019febdd-8f21-7b77-bb20-c91d164359db" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWSUNAUDITED" xlink:type="simple" xlink:href="mpb-20260930.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_NetCashProvidedByUsedInInvestingActivities_019febdd-8f21-765f-843e-58db524125f9" 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_019febdd-8f21-7ffe-aba6-172161dcdcb5" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_019febdd-8f21-7ffe-aba6-172161dcdcb5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_019febdd-8f21-714f-bb2b-7ae73f8b771a" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_019febdd-8f21-714f-bb2b-7ae73f8b771a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities_019febdd-8f21-77bb-8917-0bb765616ac2" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities_019febdd-8f21-77bb-8917-0bb765616ac2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfFederalHomeLoanBankStock_019febdd-8f21-7236-bae8-6c00beb995f9" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_ProceedsFromSaleOfFederalHomeLoanBankStock_019febdd-8f21-7236-bae8-6c00beb995f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireFederalHomeLoanBankStock_019febdd-8f21-73c3-96c5-3966ebd457f2" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_PaymentsToAcquireFederalHomeLoanBankStock_019febdd-8f21-73c3-96c5-3966ebd457f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAcquiredFromAcquisition_019febdd-8f21-7f43-a059-16d32538ef5f" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_CashAcquiredFromAcquisition_019febdd-8f21-7f43-a059-16d32538ef5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromLoansReceivable_019febdd-8f21-73ad-ae6d-ec36cf2e55f0" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_PaymentsForProceedsFromLoansReceivable_019febdd-8f21-73ad-ae6d-ec36cf2e55f0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019febdd-8f21-71aa-a720-ba1fb73b1024" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_019febdd-8f21-71aa-a720-ba1fb73b1024" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_019febdd-8f21-7648-8d01-9ae877259570" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_019febdd-8f21-7648-8d01-9ae877259570" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_019febdd-8f21-7b53-b9a6-d2ba583430a5" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_019febdd-8f21-7b53-b9a6-d2ba583430a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLifeInsurancePolicies_019febdd-8f21-7a83-8a62-5aa42b6f2ea0" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_ProceedsFromLifeInsurancePolicies_019febdd-8f21-7a83-8a62-5aa42b6f2ea0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PaymentsForProceedsFromInvestmentInTaxCreditsAndOtherPartnerships_019febdd-8f21-7426-8b21-54361fb25b63" xlink:href="mpb-20260930.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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_mpb_PaymentsForProceedsFromInvestmentInTaxCreditsAndOtherPartnerships_019febdd-8f21-7426-8b21-54361fb25b63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireHeldToMaturitySecurities_019febdd-8f21-7325-8f27-521c981c09fc" 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_019febdd-8f21-765f-843e-58db524125f9" xlink:to="loc_us-gaap_PaymentsToAcquireHeldToMaturitySecurities_019febdd-8f21-7325-8f27-521c981c09fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" 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_PaymentsForOriginationOfMortgageLoansHeldForSale_019febdd-8f21-7a44-ad15-d6092b704c1e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale_019febdd-8f21-7a44-ad15-d6092b704c1e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PaymentsToFundingLoansOriginatedForSale_019febdd-8f21-7545-ae1c-fe6cc8a0176c" xlink:href="mpb-20260930.xsd#mpb_PaymentsToFundingLoansOriginatedForSale"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_PaymentsToFundingLoansOriginatedForSale_019febdd-8f21-7545-ae1c-fe6cc8a0176c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfMortgageLoans_019febdd-8f21-73c0-bd82-ad3e42a0cc66" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfMortgageLoans"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_GainLossOnSaleOfMortgageLoans_019febdd-8f21-73c0-bd82-ad3e42a0cc66" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_EarningsOnCashSurrenderValueOfLifeInsuranceIncludingDeathBenefitProceeds_019febdd-8f21-79a9-ba87-7d5efe4c5f8f" xlink:href="mpb-20260930.xsd#mpb_EarningsOnCashSurrenderValueOfLifeInsuranceIncludingDeathBenefitProceeds"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_EarningsOnCashSurrenderValueOfLifeInsuranceIncludingDeathBenefitProceeds_019febdd-8f21-79a9-ba87-7d5efe4c5f8f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_019febdd-8f21-7499-aaae-53752604d5af" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_019febdd-8f21-7499-aaae-53752604d5af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_DiscountOnSubordinatedDebt_019febdd-8f21-7aff-ac73-3ab5316e51f0" xlink:href="mpb-20260930.xsd#mpb_DiscountOnSubordinatedDebt"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_DiscountOnSubordinatedDebt_019febdd-8f21-7aff-ac73-3ab5316e51f0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_019febdd-8f21-7108-9a01-f024dc24b6ad" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssets"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_019febdd-8f21-7108-9a01-f024dc24b6ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables_019febdd-8f21-7551-95a4-f70f1e51d010" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables_019febdd-8f21-7551-95a4-f70f1e51d010" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_GainLossOnSalesOfLoans_019febdd-8f21-7308-8e2a-785837716b55" xlink:href="mpb-20260930.xsd#mpb_GainLossOnSalesOfLoans"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_GainLossOnSalesOfLoans_019febdd-8f21-7308-8e2a-785837716b55" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_019febdd-8f21-71aa-8dd5-da5f8c1718dd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_019febdd-8f21-71aa-8dd5-da5f8c1718dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_019febdd-8f21-7aa3-9e66-b41c05f3c848" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_ProfitLoss_019febdd-8f21-7aa3-9e66-b41c05f3c848" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019febdd-8f21-7fec-8533-e60794e3e5de" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_019febdd-8f21-7fec-8533-e60794e3e5de" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Depreciation_019febdd-8f21-705c-ace5-a74be823ecf5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Depreciation"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_Depreciation_019febdd-8f21-705c-ace5-a74be823ecf5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights_019febdd-8f21-7136-b31d-f70ef4cc8c81" xlink:href="mpb-20260930.xsd#mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights_019febdd-8f21-7136-b31d-f70ef4cc8c81" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019febdd-8f21-7be8-975b-ee4d7145ddd1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019febdd-8f21-7be8-975b-ee4d7145ddd1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_019febdd-8f21-7f55-b77e-f694bc77803f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseRightOfUseAssetAmortization"/>
    <link:calculationArc order="16" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_019febdd-8f21-7f55-b77e-f694bc77803f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndCollectionOfLoansHeldforsale_019febdd-8f21-7311-95c3-4231fe469983" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleAndCollectionOfLoansHeldforsale"/>
    <link:calculationArc order="17" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_ProceedsFromSaleAndCollectionOfLoansHeldforsale_019febdd-8f21-7311-95c3-4231fe469983" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_ProceedsFromSaleOfLoansOriginatedForSale_019febdd-8f21-704c-843b-8baba8421a83" xlink:href="mpb-20260930.xsd#mpb_ProceedsFromSaleOfLoansOriginatedForSale"/>
    <link:calculationArc order="18" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_ProceedsFromSaleOfLoansOriginatedForSale_019febdd-8f21-704c-843b-8baba8421a83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019febdd-8f21-7399-ae83-cd2814418d9d" xlink:href="mpb-20260930.xsd#mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets"/>
    <link:calculationArc order="19" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets_019febdd-8f21-7399-ae83-cd2814418d9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionExpense_019febdd-8f21-7fd8-adaf-2adda71573e0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccretionExpense"/>
    <link:calculationArc order="20" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_AccretionExpense_019febdd-8f21-7fd8-adaf-2adda71573e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockExpense_019febdd-8f21-73d6-85b3-222dd1342fb0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedStockExpense"/>
    <link:calculationArc order="21" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_RestrictedStockExpense_019febdd-8f21-73d6-85b3-222dd1342fb0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockOptionPlanExpense_019febdd-8f21-77f0-b4c4-67d215c1ef9a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockOptionPlanExpense"/>
    <link:calculationArc order="22" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_StockOptionPlanExpense_019febdd-8f21-77f0-b4c4-67d215c1ef9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019febdd-8f21-7076-bef9-e524c16e4db7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="23" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019febdd-8f21-7076-bef9-e524c16e4db7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities_019febdd-8f21-70a0-a09f-834ab5aceed5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities"/>
    <link:calculationArc order="24" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities_019febdd-8f21-70a0-a09f-834ab5aceed5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_IncreaseDecreaseInOperatingLeaseLiabilities_019febdd-8f21-734a-8645-2b3f72d80d3f" xlink:href="mpb-20260930.xsd#mpb_IncreaseDecreaseInOperatingLeaseLiabilities"/>
    <link:calculationArc order="25" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_mpb_IncreaseDecreaseInOperatingLeaseLiabilities_019febdd-8f21-734a-8645-2b3f72d80d3f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019febdd-8f21-735b-b764-824bc32d9b42" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <link:calculationArc order="26" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-7b8c-9b12-5266e9822d09" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019febdd-8f21-735b-b764-824bc32d9b42" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019febdd-8f21-748d-81f1-96ba9aaa49b9" 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_019febdd-8f21-77be-9fda-101eefb0570f" 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_019febdd-8f21-748d-81f1-96ba9aaa49b9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019febdd-8f21-77be-9fda-101eefb0570f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019febdd-8f21-7b7e-a52d-d2a818347f22" 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_019febdd-8f21-748d-81f1-96ba9aaa49b9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019febdd-8f21-7b7e-a52d-d2a818347f22" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019febdd-8f21-79e8-b866-01a96b5efc91" 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_019febdd-8f21-748d-81f1-96ba9aaa49b9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019febdd-8f21-79e8-b866-01a96b5efc91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019febdd-8f21-7e03-adbf-99ae9112bd8b" 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_019febdd-8f21-7cb0-b997-d72390270f9d" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_019febdd-8f21-7cb0-b997-d72390270f9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_019febdd-8f21-75fe-9135-d86de6677b3a" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_ProceedsFromStockPlans_019febdd-8f21-75fe-9135-d86de6677b3a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings_019febdd-8f21-78a7-8e0d-84d74f597687" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings_019febdd-8f21-78a7-8e0d-84d74f597687" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfShortTermDebt_019febdd-8f21-7d01-bb45-f994447431d8" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_RepaymentsOfShortTermDebt_019febdd-8f21-7d01-bb45-f994447431d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeasePrincipalPayments_019febdd-8f21-7bb6-95ed-ff3affcf7a9a" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_FinanceLeasePrincipalPayments_019febdd-8f21-7bb6-95ed-ff3affcf7a9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInDeposits_019febdd-8f21-7017-91e6-2cdf1466e791" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_IncreaseDecreaseInDeposits_019febdd-8f21-7017-91e6-2cdf1466e791" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_019febdd-8f21-7a0a-bd28-8e65a6a71400" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_019febdd-8f21-7a0a-bd28-8e65a6a71400" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfSubordinatedDebt_019febdd-8f21-7559-ba4c-4bbc8b3d0bd3" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_RepaymentsOfSubordinatedDebt_019febdd-8f21-7559-ba4c-4bbc8b3d0bd3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromShortTermDebt_019febdd-8f21-70dc-a4e5-dce3baa669be" 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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_us-gaap_ProceedsFromShortTermDebt_019febdd-8f21-70dc-a4e5-dce3baa669be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PaymentInLieuOfFractionalShares_01a1a76e-a831-76f1-a1c0-faf6764e62c6" xlink:href="mpb-20260930.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_019febdd-8f21-7e03-adbf-99ae9112bd8b" xlink:to="loc_mpb_PaymentInLieuOfFractionalShares_01a1a76e-a831-76f1-a1c0-faf6764e62c6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/BusinessCombinationsScheduleofEstimatedFairValueofAssetsAcquiredDetails" xlink:type="simple" xlink:href="mpb-20260930.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_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019febdd-8fd3-7829-af73-503fa7863aa0" 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_019febdd-8fd3-749a-920c-3260ddb3e5a1" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_019febdd-8fd3-749a-920c-3260ddb3e5a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFederalFundsSold_019febdd-8fd3-7b00-8f86-c24a88ed099e" xlink:href="mpb-20260930.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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFederalFundsSold_019febdd-8fd3-7b00-8f86-c24a88ed099e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities_019febdd-8fd3-7a76-b33f-06ce7683cc61" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities_019febdd-8fd3-7a76-b33f-06ce7683cc61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedAssetAcquiredLoansHeldForSale_019febdd-8fd3-755b-83de-48298aa072c3" xlink:href="mpb-20260930.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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_mpb_BusinessCombinationRecognizedAssetAcquiredLoansHeldForSale_019febdd-8fd3-755b-83de-48298aa072c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets_019febdd-8fd3-736c-8334-88bb60385b91" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets_019febdd-8fd3-736c-8334-88bb60385b91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_019febdd-8fd3-754c-9eab-6b1469556b8c" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_019febdd-8fd3-754c-9eab-6b1469556b8c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_019febdd-8fd3-7c6e-8ec7-0bc181549b28" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_019febdd-8fd3-7c6e-8ec7-0bc181549b28" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOperatingLeaseRightOfUseAsset_019febdd-8fd3-7c4e-8287-f841d185c602" xlink:href="mpb-20260930.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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOperatingLeaseRightOfUseAsset_019febdd-8fd3-7c4e-8287-f841d185c602" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashSurrenderValueOfLifeInsurance_019febdd-8fd3-7cb4-b69c-1f506d0cb594" xlink:href="mpb-20260930.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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashSurrenderValueOfLifeInsurance_019febdd-8fd3-7cb4-b69c-1f506d0cb594" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_019febdd-8fd3-7814-9940-c20576ffbd2d" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_019febdd-8fd3-7814-9940-c20576ffbd2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables_019febdd-8fd3-7e8c-86fb-e165356e4fbc" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables_019febdd-8fd3-7e8c-86fb-e165356e4fbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_019febdd-8fd3-74b2-a2c1-cb04c46d38b0" 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_019febdd-8fd3-7829-af73-503fa7863aa0" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_019febdd-8fd3-74b2-a2c1-cb04c46d38b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019febdd-8fd3-7eb4-909a-9c1d3c94bd09" 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_019febdd-8fd3-71fe-bfdc-693497c43862" xlink:href="mpb-20260930.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_019febdd-8fd3-7eb4-909a-9c1d3c94bd09" xlink:to="loc_mpb_BusinessCombinationCashPaidInLieuOfFractionalShares_019febdd-8fd3-71fe-bfdc-693497c43862" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesGross_019febdd-8fd3-7be8-979a-acc0f35ba947" 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_019febdd-8fd3-7eb4-909a-9c1d3c94bd09" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesGross_019febdd-8fd3-7be8-979a-acc0f35ba947" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationPurchasePriceAssignedToStockOptionsSettledForCash_019febdd-8fd3-7295-8bc3-a560c7640d78" xlink:href="mpb-20260930.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_019febdd-8fd3-7eb4-909a-9c1d3c94bd09" xlink:to="loc_mpb_BusinessCombinationPurchasePriceAssignedToStockOptionsSettledForCash_019febdd-8fd3-7295-8bc3-a560c7640d78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable_019febdd-8fd3-78ec-896c-4806c9004983" 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_019febdd-8fd3-7eb4-909a-9c1d3c94bd09" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable_019febdd-8fd3-78ec-896c-4806c9004983" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019febdd-8fd3-7880-8e03-9bf5b1f99e00" 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_019febdd-8fd3-7307-be13-c89e016ab661" 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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_019febdd-8fd3-7307-be13-c89e016ab661" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedMoneyMarketDepositLiabilities_019febdd-8fd3-7a65-9380-0bc82c5fc875" xlink:href="mpb-20260930.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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedMoneyMarketDepositLiabilities_019febdd-8fd3-7a65-9380-0bc82c5fc875" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNonInterestBearingDemandDepositLiabilities_019febdd-8fd3-714e-9cc0-57661dea39f2" xlink:href="mpb-20260930.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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNonInterestBearingDemandDepositLiabilities_019febdd-8fd3-714e-9cc0-57661dea39f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_019febdd-8fd3-7435-9a69-d36f9e08747d" 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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_019febdd-8fd3-7435-9a69-d36f9e08747d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedTimeDepositLiabilities_019febdd-8fd3-70b6-a707-68e7ce0f97d6" xlink:href="mpb-20260930.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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedTimeDepositLiabilities_019febdd-8fd3-70b6-a707-68e7ce0f97d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInterestBearingDemandDepositLiabilities_019febdd-8fd3-70f3-a4c3-e9921490d741" xlink:href="mpb-20260930.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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInterestBearingDemandDepositLiabilities_019febdd-8fd3-70f3-a4c3-e9921490d741" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedSavingsDepositLiabilities_019febdd-8fd3-70cb-8d29-5bd8fffeee49" xlink:href="mpb-20260930.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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedSavingsDepositLiabilities_019febdd-8fd3-70cb-8d29-5bd8fffeee49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCapitalLeaseObligation_019febdd-8fd3-7f00-82bb-ffb1a53fdb70" 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_019febdd-8fd3-7880-8e03-9bf5b1f99e00" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCapitalLeaseObligation_019febdd-8fd3-7f00-82bb-ffb1a53fdb70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_019febdd-8fd3-7f4c-a005-2b0639d062df" 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_019febdd-8fd3-7092-9b69-1b81b70fb99c" 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_019febdd-8fd3-7f4c-a005-2b0639d062df" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_019febdd-8fd3-7092-9b69-1b81b70fb99c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019febdd-8fd3-7b9f-af86-3f8a6fdd30c1" 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_019febdd-8fd3-7f4c-a005-2b0639d062df" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_019febdd-8fd3-7b9f-af86-3f8a6fdd30c1" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails" xlink:type="simple" xlink:href="mpb-20260930.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_DebtSecuritiesAvailableForSaleAndHeldToMaturityAmortizedCostBeforeAllowanceForCreditLoss_019febdd-8fd3-76b3-948c-7d0a3a725ed9" 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_019febdd-8fd3-74d1-bda8-0c6501c421ec" 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_019febdd-8fd3-76b3-948c-7d0a3a725ed9" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain_019febdd-8fd3-74d1-bda8-0c6501c421ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019febdd-8fd3-7cce-84ff-361b4a71b04c" 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_019febdd-8fd3-76b3-948c-7d0a3a725ed9" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019febdd-8fd3-7cce-84ff-361b4a71b04c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019febdd-8fd3-70d1-9bbb-cca14b0dfad2" 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_019febdd-8fd3-76b3-948c-7d0a3a725ed9" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019febdd-8fd3-70d1-9bbb-cca14b0dfad2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedGain_019febdd-8fd3-741b-a77f-6f5027766f3f" 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_019febdd-8fd3-765e-a86d-be9a554476f9" 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_019febdd-8fd3-741b-a77f-6f5027766f3f" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_019febdd-8fd3-765e-a86d-be9a554476f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_019febdd-8fd3-70e5-b2cf-2f15a5f3fc5c" 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_019febdd-8fd3-741b-a77f-6f5027766f3f" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_019febdd-8fd3-70e5-b2cf-2f15a5f3fc5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8fd3-7074-9916-5edbb93b1949" 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_019febdd-8fd3-7f5b-bbc6-383f0fe72474" 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_019febdd-8fd3-7074-9916-5edbb93b1949" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_019febdd-8fd3-7f5b-bbc6-383f0fe72474" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_019febdd-8fd3-7f19-a1a4-96df6abacfbb" 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_019febdd-8fd3-7074-9916-5edbb93b1949" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_019febdd-8fd3-7f19-a1a4-96df6abacfbb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019febdd-8fd3-705e-b406-2cdfceff7fe2" 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_019febdd-8fd3-7074-9916-5edbb93b1949" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019febdd-8fd3-705e-b406-2cdfceff7fe2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityCumulativeUnrecognizedLoss_019febdd-8fd3-7483-92b3-ab2b00763f51" 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_019febdd-8fd3-7594-83dc-a71b6cb89e35" 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_019febdd-8fd3-7483-92b3-ab2b00763f51" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_019febdd-8fd3-7594-83dc-a71b6cb89e35" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019febdd-8fd3-71e9-9b46-b7b84a454c98" 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_019febdd-8fd3-7483-92b3-ab2b00763f51" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019febdd-8fd3-71e9-9b46-b7b84a454c98" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAndHeldToMaturityFairValue_019febdd-8fd3-7bcd-a21e-ea77d3641dc4" 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_019febdd-8fd3-730d-8c2d-f601c65f553c" 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_019febdd-8fd3-7bcd-a21e-ea77d3641dc4" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019febdd-8fd3-730d-8c2d-f601c65f553c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019febdd-8fd3-750f-8b7a-6bee08c3fad1" 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_019febdd-8fd3-7bcd-a21e-ea77d3641dc4" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019febdd-8fd3-750f-8b7a-6bee08c3fad1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8fd3-74a3-a8f0-b0643f57fe27" 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_019febdd-8fd3-77b9-b2dd-dbad3175c08d" 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_019febdd-8fd3-74a3-a8f0-b0643f57fe27" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_019febdd-8fd3-77b9-b2dd-dbad3175c08d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019febdd-8fd3-7425-8614-839ddcaf1c80" 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_019febdd-8fd3-74a3-a8f0-b0643f57fe27" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_019febdd-8fd3-7425-8614-839ddcaf1c80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019febdd-8fd3-7357-a497-d7f031be8436" 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_019febdd-8fd3-74a3-a8f0-b0643f57fe27" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019febdd-8fd3-7357-a497-d7f031be8436" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofUnrealizedGainLossonInvestmentsDetails_1" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-8fd3-7d7b-94ea-92a7b2a7ea0d" 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_019febdd-8fd3-7a61-801b-948174562342" 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_019febdd-8fd3-7d7b-94ea-92a7b2a7ea0d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8fd3-7a61-801b-948174562342" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8fd3-7784-b783-4e182010ef87" 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_019febdd-8fd3-7d7b-94ea-92a7b2a7ea0d" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8fd3-7784-b783-4e182010ef87" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofFairValueandUnrealizedLossonDebtSecurityInvestmentsinaContinuousUnrealizedLossPositionDetails" xlink:type="simple" xlink:href="mpb-20260930.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_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019febdd-8fd3-7485-98ea-d9efd2b8c6ba" 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_019febdd-8fd3-7a54-99e2-b0a6ce410744" 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_019febdd-8fd3-7485-98ea-d9efd2b8c6ba" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019febdd-8fd3-7a54-99e2-b0a6ce410744" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-7fdb-b7d3-48974c5e7612" 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_019febdd-8fd3-7485-98ea-d9efd2b8c6ba" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-7fdb-b7d3-48974c5e7612" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_019febdd-8fd3-7515-a486-e9be1fb711ae" 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_019febdd-8fd3-72d3-99fa-fe50cc20efa4" 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_019febdd-8fd3-7515-a486-e9be1fb711ae" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019febdd-8fd3-72d3-99fa-fe50cc20efa4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-7a03-8a4a-1ae875a8a4e2" 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_019febdd-8fd3-7515-a486-e9be1fb711ae" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-7a03-8a4a-1ae875a8a4e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019febdd-8fd3-7be1-b067-1b6d22418dc9" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019febdd-8fd3-702c-bdcb-72dc3870e86f" 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_019febdd-8fd3-7be1-b067-1b6d22418dc9" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019febdd-8fd3-702c-bdcb-72dc3870e86f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019febdd-8fd3-7045-bf9d-4764d59ded49" 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_019febdd-8fd3-7be1-b067-1b6d22418dc9" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019febdd-8fd3-7045-bf9d-4764d59ded49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-79a9-9fa5-d6532e937045" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-788a-8c0f-85f13fffa602" xlink:href="mpb-20260930.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-79a9-9fa5-d6532e937045" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-788a-8c0f-85f13fffa602" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019febdd-8fd3-7786-b694-ce662fe4bd83" 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_019febdd-8fd3-79a9-9fa5-d6532e937045" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019febdd-8fd3-7786-b694-ce662fe4bd83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019febdd-8fd3-7637-a4d7-de5102562f60" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019febdd-8fd3-75d8-8a49-5681b39f49ba" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019febdd-8fd3-7637-a4d7-de5102562f60" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019febdd-8fd3-75d8-8a49-5681b39f49ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-7657-941b-e73a7fc388a2" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019febdd-8fd3-7637-a4d7-de5102562f60" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-7657-941b-e73a7fc388a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019febdd-8fd3-7efe-9234-bed3f50b763c" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019febdd-8fd3-7acc-906a-36b2b5b4c994" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019febdd-8fd3-7efe-9234-bed3f50b763c" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019febdd-8fd3-7acc-906a-36b2b5b4c994" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019febdd-8fd3-7a73-a0b9-95a87a4de276" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_019febdd-8fd3-7efe-9234-bed3f50b763c" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019febdd-8fd3-7a73-a0b9-95a87a4de276" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019febdd-8fd3-7e1e-bf6b-fb4678ab4fd6" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_019febdd-8fd3-7319-bb9c-10dd9245df4f" 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_019febdd-8fd3-7e1e-bf6b-fb4678ab4fd6" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_019febdd-8fd3-7319-bb9c-10dd9245df4f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019febdd-8fd3-7a8e-a6bb-5a945d1f9cf3" xlink:href="mpb-20260930.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019febdd-8fd3-7e1e-bf6b-fb4678ab4fd6" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019febdd-8fd3-7a8e-a6bb-5a945d1f9cf3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions_019febdd-8fd3-7285-9ed9-aaf80c9dfe0e" 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_019febdd-8fd3-71b9-86a0-f5212f13245d" xlink:href="mpb-20260930.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_019febdd-8fd3-7285-9ed9-aaf80c9dfe0e" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_019febdd-8fd3-71b9-86a0-f5212f13245d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-761c-9371-a5ceecaa62e7" xlink:href="mpb-20260930.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_019febdd-8fd3-7285-9ed9-aaf80c9dfe0e" xlink:to="loc_mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_019febdd-8fd3-761c-9371-a5ceecaa62e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss_019febdd-8fd3-75f2-b686-3b1ad2c1a7b1" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019febdd-8fd3-7bdd-9768-fc180b974e22" 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_019febdd-8fd3-75f2-b686-3b1ad2c1a7b1" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019febdd-8fd3-7bdd-9768-fc180b974e22" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019febdd-8fd3-78ef-bce0-f5117212256a" 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_019febdd-8fd3-75f2-b686-3b1ad2c1a7b1" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_019febdd-8fd3-78ef-bce0-f5117212256a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019febdd-8fd3-704d-8009-6be67968c299" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019febdd-8fd3-7eeb-b18b-4983e3ddd49f" 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_019febdd-8fd3-704d-8009-6be67968c299" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019febdd-8fd3-7eeb-b18b-4983e3ddd49f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019febdd-8fd3-7e35-8247-4ce3a7e6edff" 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_019febdd-8fd3-704d-8009-6be67968c299" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019febdd-8fd3-7e35-8247-4ce3a7e6edff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019febdd-8fd3-768e-b1fd-cca8f4df2ca6" 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_019febdd-8fd3-7b32-8616-8f29ce085964" 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_019febdd-8fd3-768e-b1fd-cca8f4df2ca6" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019febdd-8fd3-7b32-8616-8f29ce085964" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019febdd-8fd3-773c-bc22-34f8e41ff06b" 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_019febdd-8fd3-768e-b1fd-cca8f4df2ca6" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019febdd-8fd3-773c-bc22-34f8e41ff06b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_019febdd-8fd3-7093-95c4-2e7b80b650b7" 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_019febdd-8fd3-7738-937d-9b47fd7f75aa" 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_019febdd-8fd3-7093-95c4-2e7b80b650b7" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_019febdd-8fd3-7738-937d-9b47fd7f75aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019febdd-8fd3-71df-a2f9-13cfc9c1e648" 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_019febdd-8fd3-7093-95c4-2e7b80b650b7" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_019febdd-8fd3-71df-a2f9-13cfc9c1e648" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019febdd-8fd3-7204-bc1c-1370dafb9234" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019febdd-8fd3-7e0b-891c-dfc36e1387bd" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019febdd-8fd3-7204-bc1c-1370dafb9234" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_019febdd-8fd3-7e0b-891c-dfc36e1387bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019febdd-8fd3-779a-a846-b484b70d0656" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue_019febdd-8fd3-7204-bc1c-1370dafb9234" xlink:to="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_019febdd-8fd3-779a-a846-b484b70d0656" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_019febdd-8fd3-7e9b-9b8e-1af624c25d7d" 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_019febdd-8fd3-777c-83a7-ecae838964fd" 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_019febdd-8fd3-7e9b-9b8e-1af624c25d7d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_019febdd-8fd3-777c-83a7-ecae838964fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019febdd-8fd3-7114-a032-c96b314379a0" 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_019febdd-8fd3-7e9b-9b8e-1af624c25d7d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_019febdd-8fd3-7114-a032-c96b314379a0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss_019febdd-8fd3-7c4e-9059-bd849d4223b0" xlink:href="mpb-20260930.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-7a68-853e-418547e0997c" 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_019febdd-8fd3-7c4e-9059-bd849d4223b0" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-7a68-853e-418547e0997c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-77fb-8dd7-8f3f1821cac6" 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_019febdd-8fd3-7c4e-9059-bd849d4223b0" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_019febdd-8fd3-77fb-8dd7-8f3f1821cac6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/InvestmentSecuritiesScheduleofInvestmentsClassifiedbyContractualMaturityDateDetails" xlink:type="simple" xlink:href="mpb-20260930.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_DebtSecuritiesHeldToMaturityExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8fd3-78df-bc39-31a3dcd2eab2" 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_019febdd-8fd3-7b8f-a54e-5b88ed2e8060" 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_019febdd-8fd3-78df-bc39-31a3dcd2eab2" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019febdd-8fd3-7b8f-a54e-5b88ed2e8060" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityWithoutSingleMaturityDate_019febdd-8fd3-7fc8-8bcb-2e01292078ad" 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_019febdd-8fd3-78df-bc39-31a3dcd2eab2" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityWithoutSingleMaturityDate_019febdd-8fd3-7fc8-8bcb-2e01292078ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesFairValue_019febdd-8fd3-752f-8276-df76c8b35d8d" 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_019febdd-8fd3-7087-aa96-9afb8352e898" 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_019febdd-8fd3-752f-8276-df76c8b35d8d" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019febdd-8fd3-7087-aa96-9afb8352e898" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_019febdd-8fd3-7d92-ba2c-dfbc54ae4f3b" 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_019febdd-8fd3-752f-8276-df76c8b35d8d" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_019febdd-8fd3-7d92-ba2c-dfbc54ae4f3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019febdd-8fd3-73fa-b1e5-16bec49143ad" 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_019febdd-8fd3-72fc-b371-9d8c4ea940e8" 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_019febdd-8fd3-73fa-b1e5-16bec49143ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_019febdd-8fd3-72fc-b371-9d8c4ea940e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019febdd-8fd3-7075-a380-779102baf78b" 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_019febdd-8fd3-73fa-b1e5-16bec49143ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019febdd-8fd3-7075-a380-779102baf78b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019febdd-8fd3-77e2-bab7-a669fa14401b" 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_019febdd-8fd3-73fa-b1e5-16bec49143ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019febdd-8fd3-77e2-bab7-a669fa14401b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_019febdd-8fd3-702e-a04e-9441f14b3653" 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_019febdd-8fd3-73fa-b1e5-16bec49143ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_019febdd-8fd3-702e-a04e-9441f14b3653" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019febdd-8fd3-7729-b179-1fce1e2cdf1c" 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_019febdd-8fd3-7fce-8a84-a285945510f3" 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_019febdd-8fd3-7729-b179-1fce1e2cdf1c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_019febdd-8fd3-7fce-8a84-a285945510f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_019febdd-8fd3-793d-b18b-51a562de81dc" 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_019febdd-8fd3-7729-b179-1fce1e2cdf1c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_019febdd-8fd3-793d-b18b-51a562de81dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_019febdd-8fd3-7869-aa29-cb8b06283a06" 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_019febdd-8fd3-7729-b179-1fce1e2cdf1c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_019febdd-8fd3-7869-aa29-cb8b06283a06" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_019febdd-8fd3-7b3d-ba2f-bc70a707ddb5" 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_019febdd-8fd3-7729-b179-1fce1e2cdf1c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_019febdd-8fd3-7b3d-ba2f-bc70a707ddb5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_019febdd-8fd3-757b-895c-1a556b089658" 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_019febdd-8fd3-70a4-9338-6d45d90fb2f1" 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_019febdd-8fd3-757b-895c-1a556b089658" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10_019febdd-8fd3-70a4-9338-6d45d90fb2f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_019febdd-8fd3-7d26-861f-435e6412293c" 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_019febdd-8fd3-757b-895c-1a556b089658" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_019febdd-8fd3-7d26-861f-435e6412293c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_019febdd-8fd3-76cc-b402-5a30324249c3" 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_019febdd-8fd3-757b-895c-1a556b089658" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_019febdd-8fd3-76cc-b402-5a30324249c3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_019febdd-8fd3-7052-abec-c881b51d9622" 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_019febdd-8fd3-757b-895c-1a556b089658" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_019febdd-8fd3-7052-abec-c881b51d9622" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_019febdd-8fd3-74b5-baa1-963b5a0b4bae" 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_019febdd-8fd3-74f7-991f-3592b29a43e0" 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_019febdd-8fd3-74b5-baa1-963b5a0b4bae" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis_019febdd-8fd3-74f7-991f-3592b29a43e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_019febdd-8fd3-759e-b752-882eef277264" 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_019febdd-8fd3-74b5-baa1-963b5a0b4bae" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_019febdd-8fd3-759e-b752-882eef277264" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_019febdd-8fd3-73b1-8055-754718280ecb" 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_019febdd-8fd3-7774-8f14-e92af0b68be4" 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_019febdd-8fd3-73b1-8055-754718280ecb" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_019febdd-8fd3-7774-8f14-e92af0b68be4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019febdd-8fd3-7c72-a9b8-46e42d73decf" 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_019febdd-8fd3-73b1-8055-754718280ecb" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate_019febdd-8fd3-7c72-a9b8-46e42d73decf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue_019febdd-8fd3-7305-a798-de123d2bca10" 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_019febdd-8fd3-793a-8640-bd3c49ff446c" 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_019febdd-8fd3-7305-a798-de123d2bca10" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue_019febdd-8fd3-793a-8640-bd3c49ff446c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019febdd-8fd3-735e-9cb4-23ee97acc16a" 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_019febdd-8fd3-7305-a798-de123d2bca10" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_019febdd-8fd3-735e-9cb4-23ee97acc16a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019febdd-8fd3-7f38-8413-690e725fa193" 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_019febdd-8fd3-7305-a798-de123d2bca10" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_019febdd-8fd3-7f38-8413-690e725fa193" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_019febdd-8fd3-7447-8aa7-0a4b6ec970d6" 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_019febdd-8fd3-7305-a798-de123d2bca10" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_019febdd-8fd3-7447-8aa7-0a4b6ec970d6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-8fd4-737f-a2d7-d42613a03a26" 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_019febdd-8fd4-7034-b525-3db9c5edc000" 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_019febdd-8fd4-737f-a2d7-d42613a03a26" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019febdd-8fd4-7034-b525-3db9c5edc000" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019febdd-8fd4-7b91-a411-d3a00510eef2" 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_019febdd-8fd4-737f-a2d7-d42613a03a26" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019febdd-8fd4-7b91-a411-d3a00510eef2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_019febdd-8fd4-76af-9d95-871dc130ec8a" 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_019febdd-8fd4-7d04-8b5e-6f0727df8919" 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_019febdd-8fd4-76af-9d95-871dc130ec8a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearWriteoff_019febdd-8fd4-7d04-8b5e-6f0727df8919" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-77e3-b94b-e2248aada6f5" 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_019febdd-8fd4-76af-9d95-871dc130ec8a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-77e3-b94b-e2248aada6f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolvingWriteoff_019febdd-8fd4-737f-ab44-e10a8600995b" 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_019febdd-8fd4-76af-9d95-871dc130ec8a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolvingWriteoff_019febdd-8fd4-737f-ab44-e10a8600995b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-7ab2-9805-9dbcf3ee246e" 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_019febdd-8fd4-76af-9d95-871dc130ec8a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-7ab2-9805-9dbcf3ee246e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-7ee8-9f88-27fcfe6816a6" 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_019febdd-8fd4-76af-9d95-871dc130ec8a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-7ee8-9f88-27fcfe6816a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-74dc-87e3-5782c884416a" 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_019febdd-8fd4-76af-9d95-871dc130ec8a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-74dc-87e3-5782c884416a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-7f41-b817-8f342bbf4a1b" 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_019febdd-8fd4-76af-9d95-871dc130ec8a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearWriteoff_019febdd-8fd4-7f41-b817-8f342bbf4a1b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossRecovery_019febdd-8fd4-77ff-967e-63529d41e9b9" 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_019febdd-8fd4-71a8-a4d7-080dc82b07f2" xlink:href="mpb-20260930.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_019febdd-8fd4-77ff-967e-63529d41e9b9" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearRecovery_019febdd-8fd4-71a8-a4d7-080dc82b07f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-705d-b4cc-7243c326c2bc" xlink:href="mpb-20260930.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_019febdd-8fd4-77ff-967e-63529d41e9b9" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-705d-b4cc-7243c326c2bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-720e-9bd9-5b5487efe253" xlink:href="mpb-20260930.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_019febdd-8fd4-77ff-967e-63529d41e9b9" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-720e-9bd9-5b5487efe253" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-749b-94bb-2d66ed95b46c" xlink:href="mpb-20260930.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_019febdd-8fd4-77ff-967e-63529d41e9b9" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-749b-94bb-2d66ed95b46c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-729e-addb-d1c1c64c154c" xlink:href="mpb-20260930.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_019febdd-8fd4-77ff-967e-63529d41e9b9" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearRecovery_019febdd-8fd4-729e-addb-d1c1c64c154c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearRecovery_019febdd-8fd4-762a-a81b-2927484896cb" xlink:href="mpb-20260930.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_019febdd-8fd4-77ff-967e-63529d41e9b9" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearRecovery_019febdd-8fd4-762a-a81b-2927484896cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingRecovery_019febdd-8fd4-7c03-afa9-5c82aad77a15" xlink:href="mpb-20260930.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_019febdd-8fd4-77ff-967e-63529d41e9b9" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingRecovery_019febdd-8fd4-7c03-afa9-5c82aad77a15" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/LoansandAllowanceforCreditLossesLoansScheduleofCreditQualityIndicatorsDetails_1" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" 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_019febdd-8fd4-7d31-a8f6-9e16eac943fe" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7d31-a8f6-9e16eac943fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7420-8497-0c52b8348e13" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7420-8497-0c52b8348e13" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-754c-8428-379ed2239c17" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-754c-8428-379ed2239c17" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7c92-879c-b71d8c51391a" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7c92-879c-b71d8c51391a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7e75-a269-7431b2e33570" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7e75-a269-7431b2e33570" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7c85-8be0-b670b569cc56" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYearNetWriteoffRecovery_019febdd-8fd4-7c85-8be0-b670b569cc56" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingNetWriteoffRecovery_019febdd-8fd4-76e2-bdd1-7019fc1e5afb" xlink:href="mpb-20260930.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_019febdd-8fd4-7fe3-9299-e2a9be264551" xlink:to="loc_mpb_FinancingReceivableExcludingAccruedInterestRevolvingNetWriteoffRecovery_019febdd-8fd4-76e2-bdd1-7019fc1e5afb" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/DepositsScheduleofDepositLiabilitiesTypeDetails" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-8fd4-7670-9674-8912f03131b7" 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_019febdd-8fd4-71ee-a946-f49f5e909650" 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_019febdd-8fd4-7670-9674-8912f03131b7" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsTimeDeposits_019febdd-8fd4-71ee-a946-f49f5e909650" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019febdd-8fd4-71d3-ba0f-9b2dbdf59b35" xlink:href="mpb-20260930.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_019febdd-8fd4-7670-9674-8912f03131b7" xlink:to="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019febdd-8fd4-71d3-ba0f-9b2dbdf59b35" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_DepositsDemandAndSavingsDeposits_019febdd-8fd4-76ba-a8f7-e99602b24a6b" xlink:href="mpb-20260930.xsd#mpb_DepositsDemandAndSavingsDeposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepositsMoneyMarketDeposits_019febdd-8fd4-71d7-8fd0-b3d9370a2496" 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_019febdd-8fd4-76ba-a8f7-e99602b24a6b" xlink:to="loc_us-gaap_DepositsMoneyMarketDeposits_019febdd-8fd4-71d7-8fd0-b3d9370a2496" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestBearingDomesticDepositDemand_019febdd-8fd4-7ac5-bdc3-c1dd5d951281" 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_019febdd-8fd4-76ba-a8f7-e99602b24a6b" xlink:to="loc_us-gaap_InterestBearingDomesticDepositDemand_019febdd-8fd4-7ac5-bdc3-c1dd5d951281" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestBearingDepositLiabilities_019febdd-8fd4-7a13-bced-3f001dda34b5" 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_019febdd-8fd4-76ba-a8f7-e99602b24a6b" xlink:to="loc_us-gaap_NoninterestBearingDepositLiabilities_019febdd-8fd4-7a13-bced-3f001dda34b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepositsSavingsDeposits_019febdd-8fd4-7b25-910e-b8cf740b1565" 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_019febdd-8fd4-76ba-a8f7-e99602b24a6b" xlink:to="loc_us-gaap_DepositsSavingsDeposits_019febdd-8fd4-7b25-910e-b8cf740b1565" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Deposits_019febdd-8fd4-7294-9091-d53d0c337efa" 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_019febdd-8fd4-7da4-8de2-615ccd828fe8" 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_019febdd-8fd4-7294-9091-d53d0c337efa" xlink:to="loc_us-gaap_TimeDeposits_019febdd-8fd4-7da4-8de2-615ccd828fe8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_DepositsDemandAndSavingsDeposits_019febdd-8fd4-7003-b95a-350b37ee3cc8" xlink:href="mpb-20260930.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_019febdd-8fd4-7294-9091-d53d0c337efa" xlink:to="loc_mpb_DepositsDemandAndSavingsDeposits_019febdd-8fd4-7003-b95a-350b37ee3cc8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019febdd-8fd4-7b74-8e50-3ac826d18e1f" xlink:href="mpb-20260930.xsd#mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsSavings_019febdd-8fd4-700f-87df-fa3396bb9643" 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_019febdd-8fd4-7b74-8e50-3ac826d18e1f" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsSavings_019febdd-8fd4-700f-87df-fa3396bb9643" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsMoneyMarket_019febdd-8fd4-79a3-9024-24ef76129550" 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_019febdd-8fd4-7b74-8e50-3ac826d18e1f" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsMoneyMarket_019febdd-8fd4-79a3-9024-24ef76129550" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsDemand_019febdd-8fd4-7c86-99c0-a81e2880711c" 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_019febdd-8fd4-7b74-8e50-3ac826d18e1f" xlink:to="loc_us-gaap_PercentageOfInterestBearingDomesticDepositsToDepositsDemand_019febdd-8fd4-7c86-99c0-a81e2880711c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_PercentageOfNoninterestBearingDomesticDepositsToDepositsDemand_019febdd-8fd4-7d58-8500-9bfe8158b706" xlink:href="mpb-20260930.xsd#mpb_PercentageOfNoninterestBearingDomesticDepositsToDepositsDemand"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_mpb_PercentageOfInterestAndNoninterestBearingDomesticDepositsToDeposits_019febdd-8fd4-7b74-8e50-3ac826d18e1f" xlink:to="loc_mpb_PercentageOfNoninterestBearingDomesticDepositsToDepositsDemand_019febdd-8fd4-7d58-8500-9bfe8158b706" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/DepositsScheduleofTimeDepositsByMaturityDateDetails" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-8fd4-7255-9791-0eb91945471a" 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_019febdd-8fd4-73f7-b9a2-25de68104a76" 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_019febdd-8fd4-7255-9791-0eb91945471a" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearThree_019febdd-8fd4-73f7-b9a2-25de68104a76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesYearTwo_019febdd-8fd4-7c63-9db9-c8121e72919a" 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_019febdd-8fd4-7255-9791-0eb91945471a" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearTwo_019febdd-8fd4-7c63-9db9-c8121e72919a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesYearFour_019febdd-8fd4-7c2f-93ea-edb98166806c" 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_019febdd-8fd4-7255-9791-0eb91945471a" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearFour_019febdd-8fd4-7c2f-93ea-edb98166806c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesYearOne_019febdd-8fd4-7a32-8c83-b9fc7abf2979" 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_019febdd-8fd4-7255-9791-0eb91945471a" xlink:to="loc_us-gaap_TimeDepositMaturitiesYearOne_019febdd-8fd4-7a32-8c83-b9fc7abf2979" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_TimeDepositMaturitiesAfterYearFour_019febdd-8fd4-742e-9490-28f4dfb3efe2" xlink:href="mpb-20260930.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_019febdd-8fd4-7255-9791-0eb91945471a" xlink:to="loc_mpb_TimeDepositMaturitiesAfterYearFour_019febdd-8fd4-742e-9490-28f4dfb3efe2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeDepositMaturitiesRemainderOfFiscalYear_019febdd-8fd4-753c-8815-961a983e93e7" 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_019febdd-8fd4-7255-9791-0eb91945471a" xlink:to="loc_us-gaap_TimeDepositMaturitiesRemainderOfFiscalYear_019febdd-8fd4-753c-8815-961a983e93e7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/DebtScheduleofLongtermDebtOutstandingbyDueDateDetails" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-907c-7114-8edd-c5b1443b5487" 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_019febdd-907c-7f06-8848-362077545d7a" xlink:href="mpb-20260930.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_019febdd-907c-7114-8edd-c5b1443b5487" xlink:to="loc_mpb_FederalHomeLoanBankAdvancesLongTermAfterFairValueAdjustment_019febdd-907c-7f06-8848-362077545d7a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FederalHomeLoanBankAdvancesLeaseObligationsIncludedInLongTermDebt_019febdd-907c-7982-b4f2-3b9401761809" xlink:href="mpb-20260930.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_019febdd-907c-7114-8edd-c5b1443b5487" xlink:to="loc_mpb_FederalHomeLoanBankAdvancesLeaseObligationsIncludedInLongTermDebt_019febdd-907c-7982-b4f2-3b9401761809" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/EarningsPerShareScheduleofComputationofBasicandDilutedEarningsPerCommonShareDetails" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-907d-768a-a4a4-17baba9f6146" 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_019febdd-907d-73b5-9340-05369aab69da" 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_019febdd-907d-768a-a4a4-17baba9f6146" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019febdd-907d-73b5-9340-05369aab69da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_019febdd-907d-7d15-b2f2-17b701be1b59" 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_019febdd-907d-768a-a4a4-17baba9f6146" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_019febdd-907d-7d15-b2f2-17b701be1b59" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.midpennbank.com/role/SegmentReportingScheduleofSegmentReportingInformationDetails" xlink:type="simple" xlink:href="mpb-20260930.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_019febdd-907d-739f-8965-cd900472ca65" 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_019febdd-907d-7876-bd97-0edf63efe09c" 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_019febdd-907d-739f-8965-cd900472ca65" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019febdd-907d-7876-bd97-0edf63efe09c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_mpb_FinancingReceivableCreditLossExpenseReversalAdjusted_019febdd-907d-7a9a-8c55-5b0b912dced5" xlink:href="mpb-20260930.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_019febdd-907d-739f-8965-cd900472ca65" xlink:to="loc_mpb_FinancingReceivableCreditLossExpenseReversalAdjusted_019febdd-907d-7a9a-8c55-5b0b912dced5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_019febdd-907d-78d3-bdeb-4b5d54e8b3dd" 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_019febdd-907d-739f-8965-cd900472ca65" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_019febdd-907d-78d3-bdeb-4b5d54e8b3dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_019febdd-907d-70cb-982c-95feac30c2af" 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_019febdd-907d-739f-8965-cd900472ca65" xlink:to="loc_us-gaap_NoninterestIncome_019febdd-907d-70cb-982c-95feac30c2af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_019febdd-907d-79ba-ad77-ac7c322f240a" 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_019febdd-907d-739f-8965-cd900472ca65" xlink:to="loc_us-gaap_NoninterestExpense_019febdd-907d-79ba-ad77-ac7c322f240a" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
