<?xml version="1.0" encoding="us-ascii"?>
<!-- DFS ActiveDisclosure(SM) XBRL Linkbase Document - http://www.dfsco.com/financial-services/ -->
<!-- Creation Date      : 2018-08-06T21:10:16.2244444+00:00 -->
<!-- Version            : 2.12.6766.32775 -->
<!-- Package ID         : f25dd45407444f88953381847d7b2908 -->
<!-- Copyright (c) 2018 Donnelley Financial, LLC. All Rights Reserved. -->
<linkbase xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <roleRef xlink:type="simple" xlink:href="mpb-20180630.xsd#TemplateLink" roleURI="http://www.midpennbank.com/20180630/role/TemplateLink" />
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedBalanceSheets" xlink:href="mpb-20180630.xsd#Role_StatementConsolidatedBalanceSheets" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedBalanceSheets">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FederalFundsSold" xlink:type="locator" xlink:label="us-gaap_FederalFundsSold" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherShortTermInvestments" xlink:type="locator" xlink:label="us-gaap_OtherShortTermInvestments" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndDueFromBanks" xlink:type="locator" xlink:label="us-gaap_CashAndDueFromBanks" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LoansAndLeasesReceivableAllowance" xlink:type="locator" xlink:label="us-gaap_LoansAndLeasesReceivableAllowance" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LoansAndLeasesReceivableNetOfDeferredIncome" xlink:type="locator" xlink:label="us-gaap_LoansAndLeasesReceivableNetOfDeferredIncome" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssets" xlink:type="locator" xlink:label="us-gaap_OtherAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:type="locator" xlink:label="us-gaap_IntangibleAssetsNetExcludingGoodwill" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Goodwill" xlink:type="locator" xlink:label="us-gaap_Goodwill" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsNet" xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsNet" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestReceivable" xlink:type="locator" xlink:label="us-gaap_InterestReceivable" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RealEstateAcquiredThroughForeclosure" xlink:type="locator" xlink:label="us-gaap_RealEstateAcquiredThroughForeclosure" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FederalHomeLoanBankStock" xlink:type="locator" xlink:label="us-gaap_FederalHomeLoanBankStock" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BankOwnedLifeInsurance" xlink:type="locator" xlink:label="us-gaap_BankOwnedLifeInsurance" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentNet" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LoansAndLeasesReceivableNetReportedAmount" xlink:type="locator" xlink:label="us-gaap_LoansAndLeasesReceivableNetReportedAmount" />
    <loc xlink:href="mpb-20180630.xsd#mpb_LoansHeldForSale" xlink:type="locator" xlink:label="mpb_LoansHeldForSale" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecurities" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashCashEquivalentsAndFederalFundsSold" xlink:type="locator" xlink:label="us-gaap_CashCashEquivalentsAndFederalFundsSold" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets" xlink:type="locator" xlink:label="us-gaap_Assets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TimeDeposits" xlink:type="locator" xlink:label="us-gaap_TimeDeposits" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DepositsSavingsDeposits" xlink:type="locator" xlink:label="us-gaap_DepositsSavingsDeposits" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DepositsMoneyMarketDeposits" xlink:type="locator" xlink:label="us-gaap_DepositsMoneyMarketDeposits" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DemandDepositAccounts" xlink:type="locator" xlink:label="us-gaap_DemandDepositAccounts" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoninterestBearingDepositLiabilitiesDomestic" xlink:type="locator" xlink:label="us-gaap_NoninterestBearingDepositLiabilitiesDomestic" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherLiabilities" xlink:type="locator" xlink:label="us-gaap_OtherLiabilities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestPayableCurrentAndNoncurrent" xlink:type="locator" xlink:label="us-gaap_InterestPayableCurrentAndNoncurrent" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubordinatedDebt" xlink:type="locator" xlink:label="us-gaap_SubordinatedDebt" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FederalHomeLoanBankAdvancesLongTerm" xlink:type="locator" xlink:label="us-gaap_FederalHomeLoanBankAdvancesLongTerm" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShortTermBorrowings" xlink:type="locator" xlink:label="us-gaap_ShortTermBorrowings" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Deposits" xlink:type="locator" xlink:label="us-gaap_Deposits" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:type="locator" xlink:label="us-gaap_RetainedEarningsAccumulatedDeficit" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapitalCommonStock" xlink:type="locator" xlink:label="us-gaap_AdditionalPaidInCapitalCommonStock" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockValue" xlink:type="locator" xlink:label="us-gaap_CommonStockValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquity" xlink:type="locator" xlink:label="us-gaap_StockholdersEquity" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Liabilities" xlink:type="locator" xlink:label="us-gaap_Liabilities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:type="locator" xlink:label="us-gaap_LiabilitiesAndStockholdersEquity" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesAndStockholdersEquity" xlink:to="us-gaap_Liabilities" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesAndStockholdersEquity" xlink:to="us-gaap_StockholdersEquity" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_CommonStockValue" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_AdditionalPaidInCapitalCommonStock" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_RetainedEarningsAccumulatedDeficit" order="10050.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_Deposits" order="10070.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_ShortTermBorrowings" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_FederalHomeLoanBankAdvancesLongTerm" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_SubordinatedDebt" order="10100.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_InterestPayableCurrentAndNoncurrent" order="10110.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_OtherLiabilities" order="10120.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Deposits" xlink:to="us-gaap_NoninterestBearingDepositLiabilitiesDomestic" order="10130.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Deposits" xlink:to="us-gaap_DemandDepositAccounts" order="10140.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Deposits" xlink:to="us-gaap_DepositsMoneyMarketDeposits" order="10150.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Deposits" xlink:to="us-gaap_DepositsSavingsDeposits" order="10160.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Deposits" xlink:to="us-gaap_TimeDeposits" order="10170.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_CashCashEquivalentsAndFederalFundsSold" order="10180.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtSecurities" order="10190.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_AvailableForSaleSecurities" order="10200.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_HeldToMaturitySecurities" order="10210.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="mpb_LoansHeldForSale" order="10220.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_LoansAndLeasesReceivableNetReportedAmount" order="10230.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="10240.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_BankOwnedLifeInsurance" order="10250.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_FederalHomeLoanBankStock" order="10260.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_RealEstateAcquiredThroughForeclosure" order="10270.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_InterestReceivable" order="10280.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_DeferredTaxAssetsNet" order="10290.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_Goodwill" order="10300.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_IntangibleAssetsNetExcludingGoodwill" order="10310.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_OtherAssets" order="10320.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LoansAndLeasesReceivableNetReportedAmount" xlink:to="us-gaap_LoansAndLeasesReceivableNetOfDeferredIncome" order="10330.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LoansAndLeasesReceivableNetReportedAmount" xlink:to="us-gaap_LoansAndLeasesReceivableAllowance" order="10340.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashCashEquivalentsAndFederalFundsSold" xlink:to="us-gaap_CashAndDueFromBanks" order="10350.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashCashEquivalentsAndFederalFundsSold" xlink:to="us-gaap_OtherShortTermInvestments" order="10360.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashCashEquivalentsAndFederalFundsSold" xlink:to="us-gaap_FederalFundsSold" order="10370.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfIncome" xlink:href="mpb-20180630.xsd#Role_StatementConsolidatedStatementsOfIncome" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfIncome">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherInterestAndDividendIncome" xlink:type="locator" xlink:label="us-gaap_OtherInterestAndDividendIncome" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeSecuritiesStateAndMunicipal" xlink:type="locator" xlink:label="us-gaap_InterestIncomeSecuritiesStateAndMunicipal" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment" xlink:type="locator" xlink:label="us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeFederalFundsSold" xlink:type="locator" xlink:label="us-gaap_InterestIncomeFederalFundsSold" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper" xlink:type="locator" xlink:label="us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestAndFeeIncomeLoansAndLeases" xlink:type="locator" xlink:label="us-gaap_InterestAndFeeIncomeLoansAndLeases" />
    <loc xlink:href="mpb-20180630.xsd#mpb_InterestOnLongTermAndSubordinatedDebt" xlink:type="locator" xlink:label="mpb_InterestOnLongTermAndSubordinatedDebt" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestExpenseShortTermBorrowings" xlink:type="locator" xlink:label="us-gaap_InterestExpenseShortTermBorrowings" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestExpenseDomesticDeposits" xlink:type="locator" xlink:label="us-gaap_InterestExpenseDomesticDeposits" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestExpense" xlink:type="locator" xlink:label="us-gaap_InterestExpense" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestAndDividendIncomeOperating" xlink:type="locator" xlink:label="us-gaap_InterestAndDividendIncomeOperating" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProvisionForLoanAndLeaseLosses" xlink:type="locator" xlink:label="us-gaap_ProvisionForLoanAndLeaseLosses" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeExpenseNet" xlink:type="locator" xlink:label="us-gaap_InterestIncomeExpenseNet" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoninterestIncomeOtherOperatingIncome" xlink:type="locator" xlink:label="us-gaap_NoninterestIncomeOtherOperatingIncome" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSalesOfLoansNet" xlink:type="locator" xlink:label="us-gaap_GainLossOnSalesOfLoansNet" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BankOwnedLifeInsuranceIncome" xlink:type="locator" xlink:label="us-gaap_BankOwnedLifeInsuranceIncome" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtAndEquitySecuritiesGainLoss" xlink:type="locator" xlink:label="us-gaap_DebtAndEquitySecuritiesGainLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherNoninterestExpense" xlink:type="locator" xlink:label="us-gaap_OtherNoninterestExpense" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationAcquisitionRelatedCosts" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationAcquisitionRelatedCosts" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AmortizationOfIntangibleAssets" xlink:type="locator" xlink:label="us-gaap_AmortizationOfIntangibleAssets" />
    <loc xlink:href="mpb-20180630.xsd#mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets" xlink:type="locator" xlink:label="mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Communication" xlink:type="locator" xlink:label="us-gaap_Communication" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InformationTechnologyAndDataProcessing" xlink:type="locator" xlink:label="us-gaap_InformationTechnologyAndDataProcessing" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MarketingAndAdvertisingExpense" xlink:type="locator" xlink:label="us-gaap_MarketingAndAdvertisingExpense" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProfessionalFees" xlink:type="locator" xlink:label="us-gaap_ProfessionalFees" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FederalDepositInsuranceCorporationPremiumExpense" xlink:type="locator" xlink:label="us-gaap_FederalDepositInsuranceCorporationPremiumExpense" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxesOther" xlink:type="locator" xlink:label="us-gaap_TaxesOther" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquipmentExpense" xlink:type="locator" xlink:label="us-gaap_EquipmentExpense" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OccupancyNet" xlink:type="locator" xlink:label="us-gaap_OccupancyNet" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LaborAndRelatedExpense" xlink:type="locator" xlink:label="us-gaap_LaborAndRelatedExpense" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoninterestExpense" xlink:type="locator" xlink:label="us-gaap_NoninterestExpense" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoninterestIncome" xlink:type="locator" xlink:label="us-gaap_NoninterestIncome" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss" xlink:type="locator" xlink:label="us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:type="locator" xlink:label="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetIncomeLoss" xlink:to="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetIncomeLoss" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="10020.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:to="us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:to="us-gaap_NoninterestIncome" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:to="us-gaap_NoninterestExpense" order="10050.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_LaborAndRelatedExpense" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_OccupancyNet" order="10070.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_EquipmentExpense" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_TaxesOther" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_FederalDepositInsuranceCorporationPremiumExpense" order="10100.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_ProfessionalFees" order="10110.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_MarketingAndAdvertisingExpense" order="10120.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_InformationTechnologyAndDataProcessing" order="10130.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_Communication" order="10140.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets" order="10150.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_AmortizationOfIntangibleAssets" order="10160.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_BusinessCombinationAcquisitionRelatedCosts" order="10170.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestExpense" xlink:to="us-gaap_OtherNoninterestExpense" order="10180.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestIncome" xlink:to="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" order="10190.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestIncome" xlink:to="us-gaap_DebtAndEquitySecuritiesGainLoss" order="10210.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestIncome" xlink:to="us-gaap_BankOwnedLifeInsuranceIncome" order="10220.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestIncome" xlink:to="us-gaap_GainLossOnSalesOfLoansNet" order="10260.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoninterestIncome" xlink:to="us-gaap_NoninterestIncomeOtherOperatingIncome" order="10270.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss" xlink:to="us-gaap_InterestIncomeExpenseNet" order="10280.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss" xlink:to="us-gaap_ProvisionForLoanAndLeaseLosses" order="10290.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestIncomeExpenseNet" xlink:to="us-gaap_InterestAndDividendIncomeOperating" order="10300.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestIncomeExpenseNet" xlink:to="us-gaap_InterestExpense" order="10310.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestExpense" xlink:to="us-gaap_InterestExpenseDomesticDeposits" order="10320.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestExpense" xlink:to="us-gaap_InterestExpenseShortTermBorrowings" order="10330.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestExpense" xlink:to="mpb_InterestOnLongTermAndSubordinatedDebt" order="10340.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestAndDividendIncomeOperating" xlink:to="us-gaap_InterestAndFeeIncomeLoansAndLeases" order="10350.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestAndDividendIncomeOperating" xlink:to="us-gaap_InterestIncomeAndFeesBankersAcceptancesCertificatesOfDepositAndCommercialPaper" order="10360.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestAndDividendIncomeOperating" xlink:to="us-gaap_InterestIncomeFederalFundsSold" order="10370.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestAndDividendIncomeOperating" xlink:to="us-gaap_InterestIncomeSecuritiesUSTreasuryAndOtherUSGovernment" order="10380.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestAndDividendIncomeOperating" xlink:to="us-gaap_InterestIncomeSecuritiesStateAndMunicipal" order="10390.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InterestAndDividendIncomeOperating" xlink:to="us-gaap_OtherInterestAndDividendIncome" order="10400.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:href="mpb-20180630.xsd#Role_StatementConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfComprehensiveIncomeLoss">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossNetOfTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:type="locator" xlink:label="us-gaap_ComprehensiveIncomeNetOfTax" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_ComprehensiveIncomeNetOfTax" xlink:to="us-gaap_NetIncomeLoss" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_ComprehensiveIncomeNetOfTax" xlink:to="us-gaap_OtherComprehensiveIncomeLossNetOfTax" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OtherComprehensiveIncomeLossNetOfTax" xlink:to="us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OtherComprehensiveIncomeLossNetOfTax" xlink:to="us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax" order="10040.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OtherComprehensiveIncomeLossNetOfTax" xlink:to="us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax" order="10050.00" priority="2" use="optional" weight="-1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfCashFlows" xlink:href="mpb-20180630.xsd#Role_StatementConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfCashFlows">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities" xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssets" xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInOtherOperatingAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables" xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxExpenseBenefit" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensation" />
    <loc xlink:href="mpb-20180630.xsd#mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets" xlink:type="locator" xlink:label="mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment" xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSalesOfLoansNet" xlink:type="locator" xlink:label="us-gaap_GainLossOnSalesOfLoansNet" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfLoansHeldForSale" xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfLoansHeldForSale" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsForOriginationAndPurchasesOfLoansHeldForSale" xlink:type="locator" xlink:label="us-gaap_PaymentsForOriginationAndPurchasesOfLoansHeldForSale" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfMortgageLoans" xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfMortgageLoans" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfMortgageLoansHeldForSale" xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfMortgageLoansHeldForSale" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale" xlink:type="locator" xlink:label="us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BankOwnedLifeInsuranceIncome" xlink:type="locator" xlink:label="us-gaap_BankOwnedLifeInsuranceIncome" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtAndEquitySecuritiesGainLoss" xlink:type="locator" xlink:label="us-gaap_DebtAndEquitySecuritiesGainLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments" xlink:type="locator" xlink:label="us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights" xlink:type="locator" xlink:label="mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Depreciation" xlink:type="locator" xlink:label="us-gaap_Depreciation" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProvisionForLoanAndLeaseLosses" xlink:type="locator" xlink:label="us-gaap_ProvisionForLoanAndLeaseLosses" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfForeclosedAssets" xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfForeclosedAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInFinanceReceivables" xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInFinanceReceivables" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsForProceedsFromFederalHomeLoanBankStock" xlink:type="locator" xlink:label="us-gaap_PaymentsForProceedsFromFederalHomeLoanBankStock" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAcquiredFromAcquisition" xlink:type="locator" xlink:label="us-gaap_CashAcquiredFromAcquisition" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireHeldToMaturitySecurities" xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireHeldToMaturitySecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities" xlink:type="locator" xlink:label="us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecurities" xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireAvailableForSaleSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities" xlink:type="locator" xlink:label="us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfAvailableForSaleSecurities" xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfAvailableForSaleSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings" xlink:type="locator" xlink:label="us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromStockPlans" xlink:type="locator" xlink:label="us-gaap_ProceedsFromStockPlans" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsOfDividendsCommonStock" xlink:type="locator" xlink:label="us-gaap_PaymentsOfDividendsCommonStock" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromRepaymentsOfShortTermDebt" xlink:type="locator" xlink:label="us-gaap_ProceedsFromRepaymentsOfShortTermDebt" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInDeposits" xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInDeposits" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInFinancingActivities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInInvestingActivities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInOperatingActivities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncashOrPartNoncashAcquisitionOtherAssetsAcquired1" xlink:type="locator" xlink:label="us-gaap_NoncashOrPartNoncashAcquisitionOtherAssetsAcquired1" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncashOrPartNoncashAcquisitionIntangibleAssetsAcquired1" xlink:type="locator" xlink:label="us-gaap_NoncashOrPartNoncashAcquisitionIntangibleAssetsAcquired1" />
    <loc xlink:href="mpb-20180630.xsd#mpb_NoncashOrPartNoncashAcquisitionAccruedInterestReceivableAcquired" xlink:type="locator" xlink:label="mpb_NoncashOrPartNoncashAcquisitionAccruedInterestReceivableAcquired" />
    <loc xlink:href="mpb-20180630.xsd#mpb_NoncashOrPartNoncashAcquisitionDeferredIncomeTaxesAcquired" xlink:type="locator" xlink:label="mpb_NoncashOrPartNoncashAcquisitionDeferredIncomeTaxesAcquired" />
    <loc xlink:href="mpb-20180630.xsd#mpb_NoncashOrPartNoncashAcquisitionForeclosedAssetsAcquired" xlink:type="locator" xlink:label="mpb_NoncashOrPartNoncashAcquisitionForeclosedAssetsAcquired" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncashOrPartNoncashAcquisitionFixedAssetsAcquired1" xlink:type="locator" xlink:label="us-gaap_NoncashOrPartNoncashAcquisitionFixedAssetsAcquired1" />
    <loc xlink:href="mpb-20180630.xsd#mpb_NoncashOrPartNoncashAcquisitionRestrictedStockAcquired" xlink:type="locator" xlink:label="mpb_NoncashOrPartNoncashAcquisitionRestrictedStockAcquired" />
    <loc xlink:href="mpb-20180630.xsd#mpb_NoncashOrPartNoncashAcquisitionFinancingReceivableAcquired" xlink:type="locator" xlink:label="mpb_NoncashOrPartNoncashAcquisitionFinancingReceivableAcquired" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncashOrPartNoncashAcquisitionInvestmentsAcquired1" xlink:type="locator" xlink:label="us-gaap_NoncashOrPartNoncashAcquisitionInvestmentsAcquired1" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:type="locator" xlink:label="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncashOrPartNoncashAcquisitionOtherLiabilitiesAssumed1" xlink:type="locator" xlink:label="us-gaap_NoncashOrPartNoncashAcquisitionOtherLiabilitiesAssumed1" />
    <loc xlink:href="mpb-20180630.xsd#mpb_NoncashOrPartNoncashAcquisitionAccruedInterestPayableAssumed" xlink:type="locator" xlink:label="mpb_NoncashOrPartNoncashAcquisitionAccruedInterestPayableAssumed" />
    <loc xlink:href="mpb-20180630.xsd#mpb_NoncashOrPartNoncashDepositsAssumed" xlink:type="locator" xlink:label="mpb_NoncashOrPartNoncashDepositsAssumed" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncashOrPartNoncashAcquisitionValueOfLiabilitiesAssumed1" xlink:type="locator" xlink:label="us-gaap_NoncashOrPartNoncashAcquisitionValueOfLiabilitiesAssumed1" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfLiabilitiesAssumed1" xlink:to="mpb_NoncashOrPartNoncashDepositsAssumed" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfLiabilitiesAssumed1" xlink:to="mpb_NoncashOrPartNoncashAcquisitionAccruedInterestPayableAssumed" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfLiabilitiesAssumed1" xlink:to="us-gaap_NoncashOrPartNoncashAcquisitionOtherLiabilitiesAssumed1" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="us-gaap_NoncashOrPartNoncashAcquisitionInvestmentsAcquired1" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="mpb_NoncashOrPartNoncashAcquisitionFinancingReceivableAcquired" order="10050.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="mpb_NoncashOrPartNoncashAcquisitionRestrictedStockAcquired" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="us-gaap_NoncashOrPartNoncashAcquisitionFixedAssetsAcquired1" order="10070.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="mpb_NoncashOrPartNoncashAcquisitionForeclosedAssetsAcquired" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="mpb_NoncashOrPartNoncashAcquisitionDeferredIncomeTaxesAcquired" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="mpb_NoncashOrPartNoncashAcquisitionAccruedInterestReceivableAcquired" order="10100.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="us-gaap_NoncashOrPartNoncashAcquisitionIntangibleAssetsAcquired1" order="10110.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NoncashOrPartNoncashAcquisitionValueOfAssetsAcquired1" xlink:to="us-gaap_NoncashOrPartNoncashAcquisitionOtherAssetsAcquired1" order="10120.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:to="us-gaap_NetCashProvidedByUsedInOperatingActivities" order="10130.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:to="us-gaap_NetCashProvidedByUsedInInvestingActivities" order="10140.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:to="us-gaap_NetCashProvidedByUsedInFinancingActivities" order="10150.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_IncreaseDecreaseInDeposits" order="10160.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_ProceedsFromRepaymentsOfShortTermDebt" order="10170.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_PaymentsOfDividendsCommonStock" order="10180.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_ProceedsFromStockPlans" order="10190.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_RepaymentsOfFederalHomeLoanBankBorrowings" order="10210.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_ProceedsFromSaleOfAvailableForSaleSecurities" order="10220.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities" order="10230.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_PaymentsToAcquireAvailableForSaleSecurities" order="10240.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfHeldToMaturitySecurities" order="10250.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_PaymentsToAcquireHeldToMaturitySecurities" order="10260.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_CashAcquiredFromAcquisition" order="10270.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_PaymentsForProceedsFromFederalHomeLoanBankStock" order="10280.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_IncreaseDecreaseInFinanceReceivables" order="10290.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" order="10300.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" order="10310.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_ProceedsFromSaleOfForeclosedAssets" order="10320.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_NetIncomeLoss" order="10330.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_ProvisionForLoanAndLeaseLosses" order="10340.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_Depreciation" order="10350.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="mpb_AmortizationOfIntangibleAssetsIncludingOtherServicingRights" order="10360.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments" order="10370.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_DebtAndEquitySecuritiesGainLoss" order="10380.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_BankOwnedLifeInsuranceIncome" order="10390.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_PaymentsForOriginationOfMortgageLoansHeldForSale" order="10400.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_ProceedsFromSaleOfMortgageLoansHeldForSale" order="10410.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_GainLossOnSaleOfMortgageLoans" order="10420.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_PaymentsForOriginationAndPurchasesOfLoansHeldForSale" order="10430.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_ProceedsFromSaleOfLoansHeldForSale" order="10440.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_GainLossOnSalesOfLoansNet" order="10450.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" order="10460.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="mpb_GainLossOnSaleOrWriteDownOfForeclosedAssets" order="10470.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_ShareBasedCompensation" order="10480.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_DeferredIncomeTaxExpenseBenefit" order="10490.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInAccountsAndOtherReceivables" order="10500.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInOtherOperatingAssets" order="10510.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities" order="10520.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" order="10530.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerAllocationOfPurchasePriceDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureMergerAllocationOfPurchasePriceDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerAllocationOfPurchasePriceDetails">
    <loc xlink:href="mpb-20180630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherAssetsRestrictedStockBoliPremisesAndEquipmentDeferredTaxesAccruedInterestReceivable" xlink:type="locator" xlink:label="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherAssetsRestrictedStockBoliPremisesAndEquipmentDeferredTaxesAccruedInterestReceivable" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets" />
    <loc xlink:href="mpb-20180630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedForeclosedAssets" xlink:type="locator" xlink:label="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedForeclosedAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedEquipment" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedEquipment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Goodwill" xlink:type="locator" xlink:label="us-gaap_Goodwill" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets" />
    <loc xlink:href="mpb-20180630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedRestrictedStock" xlink:type="locator" xlink:label="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedRestrictedStock" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" />
    <loc xlink:href="mpb-20180630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOtherAndAccruedInterestPayable" xlink:type="locator" xlink:label="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOtherAndAccruedInterestPayable" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialLiabilities" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialLiabilities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesGross" xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireBusinessesGross" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferred1" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationConsiderationTransferred1" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationConsiderationTransferred1" xlink:to="us-gaap_PaymentsToAcquireBusinessesGross" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationConsiderationTransferred1" xlink:to="us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialLiabilities" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities" xlink:to="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOtherAndAccruedInterestPayable" order="10050.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities" order="10070.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedRestrictedStock" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_Goodwill" order="10100.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" order="10110.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedEquipment" order="10120.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedForeclosedAssets" order="10130.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets" order="10140.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" order="10150.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:to="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherAssetsRestrictedStockBoliPremisesAndEquipmentDeferredTaxesAccruedInterestReceivable" order="10160.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerPreliminaryEstimatedFairValueOfAssetsAcquiredDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureMergerPreliminaryEstimatedFairValueOfAssetsAcquiredDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerPreliminaryEstimatedFairValueOfAssetsAcquiredDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialLiabilities" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialLiabilities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssetsCurrent" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssetsCurrent" />
    <loc xlink:href="mpb-20180630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedForeclosedAssets" xlink:type="locator" xlink:label="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedForeclosedAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets" />
    <loc xlink:href="mpb-20180630.xsd#mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedRestrictedStock" xlink:type="locator" xlink:label="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedRestrictedStock" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsMarketableSecurities" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedRestrictedStock" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialAssets" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" order="10050.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="mpb_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedForeclosedAssets" order="10070.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssetsCurrent" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets" order="10100.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedFinancialLiabilities" order="10110.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" order="10120.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther" order="10130.00" priority="2" use="optional" weight="-1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerFairValueOfLoansAcquiredDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureMergerFairValueOfLoansAcquiredDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerFairValueOfLoansAcquiredDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CertainLoansAcquiredInTransferNonaccretableDifference" xlink:type="locator" xlink:label="us-gaap_CertainLoansAcquiredInTransferNonaccretableDifference" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodContractuallyRequiredPaymentsReceivableAtAcquisition" xlink:type="locator" xlink:label="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodContractuallyRequiredPaymentsReceivableAtAcquisition" />
    <loc xlink:href="mpb-20180630.xsd#mpb_CertainLoansAcquiredInTransferAccretableNonaccretableDiscounts" xlink:type="locator" xlink:label="mpb_CertainLoansAcquiredInTransferAccretableNonaccretableDiscounts" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodCashFlowsExpectedToBeCollectedAtAcquisition" xlink:type="locator" xlink:label="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodCashFlowsExpectedToBeCollectedAtAcquisition" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodAtAcquisitionAtFairValue" xlink:type="locator" xlink:label="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodAtAcquisitionAtFairValue" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodAtAcquisitionAtFairValue" xlink:to="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodCashFlowsExpectedToBeCollectedAtAcquisition" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodAtAcquisitionAtFairValue" xlink:to="mpb_CertainLoansAcquiredInTransferAccretableNonaccretableDiscounts" order="10020.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodCashFlowsExpectedToBeCollectedAtAcquisition" xlink:to="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodContractuallyRequiredPaymentsReceivableAtAcquisition" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAcquiredDuringPeriodCashFlowsExpectedToBeCollectedAtAcquisition" xlink:to="us-gaap_CertainLoansAcquiredInTransferNonaccretableDifference" order="10040.00" priority="2" use="optional" weight="-1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesUnrealizedGainLossOnInvestmentsDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureInvestmentSecuritiesUnrealizedGainLossOnInvestmentsDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesUnrealizedGainLossOnInvestmentsDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecurities" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAndHeldToMaturitySecurities" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesAndHeldToMaturitySecurities" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturityGrossUnrealizedLosses" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturityGrossUnrealizedLosses" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturityGrossUnrealizedGain" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturityGrossUnrealizedGain" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturityAmortizedCost" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturityAmortizedCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesEquitySecurities" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesEquitySecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleEquitySecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleEquitySecuritiesAccumulatedGrossUnrealizedLossBeforeTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleEquitySecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleEquitySecuritiesAccumulatedGrossUnrealizedGainBeforeTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleEquitySecuritiesAmortizedCostBasis" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleEquitySecuritiesAmortizedCostBasis" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleEquitySecuritiesAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleEquitySecuritiesAccumulatedGrossUnrealizedGainBeforeTax" order="10010.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleEquitySecuritiesAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleEquitySecuritiesAccumulatedGrossUnrealizedLossBeforeTax" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleEquitySecuritiesAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleSecuritiesEquitySecurities" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturityAmortizedCost" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturityGrossUnrealizedGain" order="10040.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturityAmortizedCost" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturityGrossUnrealizedLosses" order="10050.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturityAmortizedCost" xlink:to="us-gaap_AvailableForSaleSecuritiesAndHeldToMaturitySecurities" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecurities" xlink:to="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain" order="10070.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecurities" xlink:to="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecurities" xlink:to="us-gaap_HeldToMaturitySecuritiesFairValue" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" order="10100.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" order="10110.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtSecurities" order="10120.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfGrossRealizedGainsLossesOnSalesOfAvailableForSaleSecuritiesDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureInvestmentSecuritiesScheduleOfGrossRealizedGainsLossesOnSalesOfAvailableForSaleSecuritiesDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfGrossRealizedGainsLossesOnSalesOfAvailableForSaleSecuritiesDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedLosses" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesGrossRealizedLosses" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGains" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesGrossRealizedGains" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:to="us-gaap_AvailableForSaleSecuritiesGrossRealizedGains" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:to="us-gaap_AvailableForSaleSecuritiesGrossRealizedLosses" order="10020.00" priority="2" use="optional" weight="-1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfFairValueAndUnrealizedLossOnInvestmentsInContinuousUnrealizedLossPositionDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureInvestmentSecuritiesScheduleOfFairValueAndUnrealizedLossOnInvestmentsInContinuousUnrealizedLossPositionDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfFairValueAndUnrealizedLossOnInvestmentsInContinuousUnrealizedLossPositionDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" xlink:type="locator" xlink:label="us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" xlink:type="locator" xlink:label="us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" />
    <loc xlink:href="mpb-20180630.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" xlink:type="locator" xlink:label="mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" />
    <loc xlink:href="mpb-20180630.xsd#mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" xlink:type="locator" xlink:label="mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss" />
    <loc xlink:href="mpb-20180630.xsd#mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:type="locator" xlink:label="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsAccumulatedLoss" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerAccumulatedLoss" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" order="10050.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" xlink:to="mpb_AvailableForSaleSecuritiesAndHeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:to="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" order="10070.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:to="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" order="10100.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" xlink:to="mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" order="10110.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions" xlink:to="mpb_HeldToMaturitySecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" order="10120.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:to="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" order="10130.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:to="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" order="10140.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" xlink:to="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" order="10150.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" xlink:to="us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" order="10160.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" xlink:to="us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" order="10170.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" xlink:to="us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" order="10180.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesInvestmentsClassifiedByContractualMaturityDateDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureInvestmentSecuritiesInvestmentsClassifiedByContractualMaturityDateDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesInvestmentsClassifiedByContractualMaturityDateDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesAmortizedCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtSecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsNetCarryingAmount" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsNetCarryingAmount" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsNetCarryingAmount" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsNetCarryingAmount" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsNetCarryingAmount" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsNetCarryingAmount" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearNetCarryingAmount" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearNetCarryingAmount" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateNetCarryingAmount" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateNetCarryingAmount" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecurities" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecurities" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesFairValue" xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesFairValue" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue" order="10030.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" order="10050.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValue" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue" order="10060.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecurities" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" order="10070.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecurities" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateNetCarryingAmount" order="10080.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearNetCarryingAmount" order="10090.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsNetCarryingAmount" order="10100.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsNetCarryingAmount" order="10110.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsNetCarryingAmount" order="10120.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate" order="10130.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue" order="10140.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" order="10150.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" order="10160.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" order="10170.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDate" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" order="10180.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" order="10190.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost" order="10200.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" order="10210.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" order="10220.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" order="10230.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasis" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" order="10240.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesLoanPortfolioSummarizedByThePastDueStatusDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureLoansAndAllowanceForLoanAndLeaseLossesLoanPortfolioSummarizedByThePastDueStatusDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesLoanPortfolioSummarizedByThePastDueStatusDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FinancingReceivableRecordedInvestmentCurrent" xlink:type="locator" xlink:label="us-gaap_FinancingReceivableRecordedInvestmentCurrent" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FinancingReceivableRecordedInvestmentPastDue" xlink:type="locator" xlink:label="us-gaap_FinancingReceivableRecordedInvestmentPastDue" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LoansAndLeasesReceivableGrossCarryingAmount" xlink:type="locator" xlink:label="us-gaap_LoansAndLeasesReceivableGrossCarryingAmount" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LoansAndLeasesReceivableGrossCarryingAmount" xlink:to="us-gaap_FinancingReceivableRecordedInvestmentPastDue" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LoansAndLeasesReceivableGrossCarryingAmount" xlink:to="us-gaap_FinancingReceivableRecordedInvestmentCurrent" order="10020.00" priority="2" use="optional" weight="1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlansNetPeriodicBenefitCostsDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureDefinedBenefitPlansNetPeriodicBenefitCostsDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlansNetPeriodicBenefitCostsDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1" xlink:type="locator" xlink:label="us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1" />
    <loc xlink:href="mpb-20180630.xsd#mpb_DefinedBenefitPlanAmortizationAccretionOfPriorServiceCostCredit" xlink:type="locator" xlink:label="mpb_DefinedBenefitPlanAmortizationAccretionOfPriorServiceCostCredit" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets" xlink:type="locator" xlink:label="us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DefinedBenefitPlanInterestCost" xlink:type="locator" xlink:label="us-gaap_DefinedBenefitPlanInterestCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DefinedBenefitPlanServiceCost" xlink:type="locator" xlink:label="us-gaap_DefinedBenefitPlanServiceCost" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" xlink:type="locator" xlink:label="us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" xlink:to="us-gaap_DefinedBenefitPlanServiceCost" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" xlink:to="us-gaap_DefinedBenefitPlanInterestCost" order="10020.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" xlink:to="us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets" order="10030.00" priority="2" use="optional" weight="-1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" xlink:to="mpb_DefinedBenefitPlanAmortizationAccretionOfPriorServiceCostCredit" order="10040.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" xlink:to="us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1" order="10050.00" priority="2" use="optional" weight="-1.00" />
  </calculationLink>
  <roleRef roleURI="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossComponentsOfAccumulatedOtherComprehensiveLossNetOfTaxesDetails" xlink:href="mpb-20180630.xsd#Role_DisclosureAccumulatedOtherComprehensiveLossComponentsOfAccumulatedOtherComprehensiveLossNetOfTaxesDetails" xlink:type="simple" />
  <calculationLink xlink:type="extended" xlink:role="http://www.midpennbank.com/20180630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossComponentsOfAccumulatedOtherComprehensiveLossNetOfTaxesDetails">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax" order="10010.00" priority="2" use="optional" weight="1.00" />
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax" order="10020.00" priority="2" use="optional" weight="-1.00" />
  </calculationLink>
</linkbase>
