<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:roleRef roleURI="http://www.xerispharma.com/role/CondensedBalanceSheets" xlink:href="xers-20180930.xsd#CondensedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/CondensedBalanceSheetsBalanceSheetsParenthetical" xlink:href="xers-20180930.xsd#CondensedBalanceSheetsBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/CondensedStatementsOfOperationsAndComprehensiveLoss" xlink:href="xers-20180930.xsd#CondensedStatementsOfOperationsAndComprehensiveLoss" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/DeiDocument" xlink:href="xers-20180930.xsd#DeiDocument" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note10FairValueMeasurement" xlink:href="xers-20180930.xsd#Note10FairValueMeasurement" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note10FairValueMeasurementFairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationDetails" xlink:href="xers-20180930.xsd#Note10FairValueMeasurementFairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note10FairValueMeasurementFairValueMeasurementTables" xlink:href="xers-20180930.xsd#Note10FairValueMeasurementFairValueMeasurementTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note10FairValueMeasurementTables" xlink:href="xers-20180930.xsd#Note10FairValueMeasurementTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note11ShortTermInvestmentsDetails" xlink:href="xers-20180930.xsd#Note11ShortTermInvestmentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note11ShortTermInvestmentsNotes" xlink:href="xers-20180930.xsd#Note11ShortTermInvestmentsNotes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note11ShortTermInvestmentsTables" xlink:href="xers-20180930.xsd#Note11ShortTermInvestmentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note1OrganizationAndNatureOfBusiness" xlink:href="xers-20180930.xsd#Note1OrganizationAndNatureOfBusiness" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note1OrganizationAndNatureOfBusinessNarrativeDetails" xlink:href="xers-20180930.xsd#Note1OrganizationAndNatureOfBusinessNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPolicies" xlink:href="xers-20180930.xsd#Note2SummaryOfSignificantAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPoliciesNarrativeDetails" xlink:href="xers-20180930.xsd#Note2SummaryOfSignificantAccountingPoliciesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPoliciesScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareDetails" xlink:href="xers-20180930.xsd#Note2SummaryOfSignificantAccountingPoliciesScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPoliciesTables" xlink:href="xers-20180930.xsd#Note2SummaryOfSignificantAccountingPoliciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note3ReverseStockSplitAndInitialPublicOffering" xlink:href="xers-20180930.xsd#Note3ReverseStockSplitAndInitialPublicOffering" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note3ReverseStockSplitAndInitialPublicOfferingNarrativeDetails" xlink:href="xers-20180930.xsd#Note3ReverseStockSplitAndInitialPublicOfferingNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note4AccruedExpensesAccruedExpensesDetails" xlink:href="xers-20180930.xsd#Note4AccruedExpensesAccruedExpensesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note4AccruedExpensesNotes" xlink:href="xers-20180930.xsd#Note4AccruedExpensesNotes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note4AccruedExpensesTables" xlink:href="xers-20180930.xsd#Note4AccruedExpensesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note5LongTermDebt" xlink:href="xers-20180930.xsd#Note5LongTermDebt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note5LongTermDebtDebtFuturePrincipalPaymentsDetails" xlink:href="xers-20180930.xsd#Note5LongTermDebtDebtFuturePrincipalPaymentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note5LongTermDebtNarrativeDetails" xlink:href="xers-20180930.xsd#Note5LongTermDebtNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note5LongTermDebtTables" xlink:href="xers-20180930.xsd#Note5LongTermDebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note6ConvertiblePreferredStock" xlink:href="xers-20180930.xsd#Note6ConvertiblePreferredStock" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note6ConvertiblePreferredStockNarrativeDetails" xlink:href="xers-20180930.xsd#Note6ConvertiblePreferredStockNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note7WarrantsNarrativeDetails" xlink:href="xers-20180930.xsd#Note7WarrantsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note7WarrantsNotes" xlink:href="xers-20180930.xsd#Note7WarrantsNotes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note7WarrantsScheduleOfStockholdersEquityNoteWarrantsOrRightsDetails" xlink:href="xers-20180930.xsd#Note7WarrantsScheduleOfStockholdersEquityNoteWarrantsOrRightsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note7WarrantsTables" xlink:href="xers-20180930.xsd#Note7WarrantsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note8CommitmentsAndContingencies" xlink:href="xers-20180930.xsd#Note8CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note8CommitmentsAndContingenciesNarrativeDetails" xlink:href="xers-20180930.xsd#Note8CommitmentsAndContingenciesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note9StockCompensationPlanEmployeeStockAwardActivityDetails" xlink:href="xers-20180930.xsd#Note9StockCompensationPlanEmployeeStockAwardActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note9StockCompensationPlanNarrativeDetails" xlink:href="xers-20180930.xsd#Note9StockCompensationPlanNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note9StockCompensationPlanNotes" xlink:href="xers-20180930.xsd#Note9StockCompensationPlanNotes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note9StockCompensationPlanShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsMethodUsedDetails" xlink:href="xers-20180930.xsd#Note9StockCompensationPlanShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsMethodUsedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note9StockCompensationPlanStockBasedCompensationExpenseDetails" xlink:href="xers-20180930.xsd#Note9StockCompensationPlanStockBasedCompensationExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note9StockCompensationPlanStockBasedCompensationExpenseTables" xlink:href="xers-20180930.xsd#Note9StockCompensationPlanStockBasedCompensationExpenseTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/Note9StockCompensationPlanTables" xlink:href="xers-20180930.xsd#Note9StockCompensationPlanTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.xerispharma.com/role/StatementOfCashFlows" xlink:href="xers-20180930.xsd#StatementOfCashFlows" xlink:type="simple" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/CondensedBalanceSheets" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:to="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesCurrent" xlink:label="loc_us-gaap_LiabilitiesCurrent_2dcbbde2-9146-a0ba-7f6c-c71b481e0841" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_LiabilitiesCurrent_2dcbbde2-9146-a0ba-7f6c-c71b481e0841" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsPayableCurrent" xlink:label="loc_us-gaap_AccountsPayableCurrent_c2c48170-d0ff-2c37-effc-ff5f53e30dcb" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_2dcbbde2-9146-a0ba-7f6c-c71b481e0841" xlink:to="loc_us-gaap_AccountsPayableCurrent_c2c48170-d0ff-2c37-effc-ff5f53e30dcb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccruedLiabilitiesCurrent" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_8422f2c5-408e-d123-b935-f3115e023941" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_2dcbbde2-9146-a0ba-7f6c-c71b481e0841" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_8422f2c5-408e-d123-b935-f3115e023941" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WarrantsAndRightsOutstanding" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_e955c293-6e20-6623-80a7-235affaf2074" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_2dcbbde2-9146-a0ba-7f6c-c71b481e0841" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_e955c293-6e20-6623-80a7-235affaf2074" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredCompensationArrangementWithIndividualCashAwardGrantedAmount" xlink:label="loc_us-gaap_DeferredCompensationArrangementWithIndividualCashAwardGrantedAmount_ca148cfe-57eb-ed2d-3914-7d8e71820bdb" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_2dcbbde2-9146-a0ba-7f6c-c71b481e0841" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualCashAwardGrantedAmount_ca148cfe-57eb-ed2d-3914-7d8e71820bdb" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_80dca0ba-44dc-8565-fb9b-c2edfc8c357d" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_LongTermDebt_80dca0ba-44dc-8565-fb9b-c2edfc8c357d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent" xlink:label="loc_us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent_8becab96-51ce-30cd-4277-5c5503eb5d68" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_066608da-f041-4af6-3da0-95354b640e11" xlink:to="loc_us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent_8becab96-51ce-30cd-4277-5c5503eb5d68" xlink:type="arc" />
    <link:loc xlink:href="xers-20180930.xsd#xers_ConvertiblePreferredStockValueIssued" xlink:label="loc_xers_ConvertiblePreferredStockValueIssued_8B96477398DE6B1EAB621EF1C9ECF7D0" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:to="loc_xers_ConvertiblePreferredStockValueIssued_8B96477398DE6B1EAB621EF1C9ECF7D0" xlink:type="arc" />
    <link:loc xlink:href="xers-20180930.xsd#xers_SeriesAConvertiblePreferredStock0.0001parvalue" xlink:label="loc_xers_SeriesAConvertiblePreferredStock0.0001parvalue_7787DF1A9378F90A95D64365F30B7C22" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xers_ConvertiblePreferredStockValueIssued_8B96477398DE6B1EAB621EF1C9ECF7D0" xlink:to="loc_xers_SeriesAConvertiblePreferredStock0.0001parvalue_7787DF1A9378F90A95D64365F30B7C22" xlink:type="arc" />
    <link:loc xlink:href="xers-20180930.xsd#xers_SeriesBConvertiblePreferredStock0.0001parvalue" xlink:label="loc_xers_SeriesBConvertiblePreferredStock0.0001parvalue_BF539A9ED3B128B9445E436799B6AFED" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xers_ConvertiblePreferredStockValueIssued_8B96477398DE6B1EAB621EF1C9ECF7D0" xlink:to="loc_xers_SeriesBConvertiblePreferredStock0.0001parvalue_BF539A9ED3B128B9445E436799B6AFED" xlink:type="arc" />
    <link:loc xlink:href="xers-20180930.xsd#xers_SeriesCConvertiblePreferredStock0.0001parvalue" xlink:label="loc_xers_SeriesCConvertiblePreferredStock0.0001parvalue_36335498F6D0E6BF849D4368369C0BFA" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xers_ConvertiblePreferredStockValueIssued_8B96477398DE6B1EAB621EF1C9ECF7D0" xlink:to="loc_xers_SeriesCConvertiblePreferredStock0.0001parvalue_36335498F6D0E6BF849D4368369C0BFA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_63817d40-f759-fa9c-45a5-8bbbb36ed5c9" xlink:to="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PreferredStockValue" xlink:label="loc_us-gaap_PreferredStockValue_ea289a9d-deba-2cde-21e4-3d0ae7a1f011" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_PreferredStockValue_ea289a9d-deba-2cde-21e4-3d0ae7a1f011" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockValue" xlink:label="loc_us-gaap_CommonStockValue_aefe3f0c-abe4-5b83-9a64-da77d8e253dd" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_CommonStockValue_aefe3f0c-abe4-5b83-9a64-da77d8e253dd" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_6dca832a-861c-478d-b1a0-396533beb40d" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_AdditionalPaidInCapital_6dca832a-861c-478d-b1a0-396533beb40d" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a59bc5ae-63a0-c9bc-32f7-e2bd9f32bd26" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a59bc5ae-63a0-c9bc-32f7-e2bd9f32bd26" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_798442bf-12e1-d944-3fa1-8b797b67482e" xlink:type="locator" />
    <link:calculationArc order="5" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_6765f135-8c69-bebc-a116-d59a52a5b2f2" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_798442bf-12e1-d944-3fa1-8b797b67482e" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsCurrent" xlink:label="loc_us-gaap_AssetsCurrent_d79dcc1c-93de-0ecd-2bd5-7c1f224c9b98" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_AssetsCurrent_d79dcc1c-93de-0ecd-2bd5-7c1f224c9b98" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_32f41ea9-05c6-e713-464b-586a571d1c1f" xlink:type="locator" />
    <link:calculationArc order="1" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d79dcc1c-93de-0ecd-2bd5-7c1f224c9b98" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_32f41ea9-05c6-e713-464b-586a571d1c1f" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShortTermInvestments" xlink:label="loc_us-gaap_ShortTermInvestments_4f46bf2c-e8aa-a88a-d064-0418c3eb39b0" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d79dcc1c-93de-0ecd-2bd5-7c1f224c9b98" xlink:to="loc_us-gaap_ShortTermInvestments_4f46bf2c-e8aa-a88a-d064-0418c3eb39b0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsReceivableNetCurrent" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_928a1618-af56-709a-989c-a303706b8ca2" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d79dcc1c-93de-0ecd-2bd5-7c1f224c9b98" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_928a1618-af56-709a-989c-a303706b8ca2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidExpenseCurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrent_b69fa2fe-d7f6-024f-39fb-29cad0c95853" xlink:type="locator" />
    <link:calculationArc order="4" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_d79dcc1c-93de-0ecd-2bd5-7c1f224c9b98" xlink:to="loc_us-gaap_PrepaidExpenseCurrent_b69fa2fe-d7f6-024f-39fb-29cad0c95853" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_f37ad080-c77a-efc5-c936-389b16abc420" xlink:type="locator" />
    <link:calculationArc order="2" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_f37ad080-c77a-efc5-c936-389b16abc420" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsNoncurrent" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_ddb0d184-2205-2a10-5b0e-faf2ccd717ae" xlink:type="locator" />
    <link:calculationArc order="3" weight="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_96dd7052-744e-d270-4e77-67944ec39152" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_ddb0d184-2205-2a10-5b0e-faf2ccd717ae" xlink:type="arc" />
  </link:calculationLink>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/CondensedBalanceSheetsBalanceSheetsParenthetical" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/CondensedStatementsOfOperationsAndComprehensiveLoss" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/DeiDocument" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note10FairValueMeasurement" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note10FairValueMeasurementFairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note10FairValueMeasurementFairValueMeasurementTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note10FairValueMeasurementTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note11ShortTermInvestmentsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note11ShortTermInvestmentsNotes" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note11ShortTermInvestmentsTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note1OrganizationAndNatureOfBusiness" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note1OrganizationAndNatureOfBusinessNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPolicies" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPoliciesNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPoliciesScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note2SummaryOfSignificantAccountingPoliciesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note3ReverseStockSplitAndInitialPublicOffering" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note3ReverseStockSplitAndInitialPublicOfferingNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note4AccruedExpensesAccruedExpensesDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note4AccruedExpensesNotes" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note4AccruedExpensesTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note5LongTermDebt" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note5LongTermDebtDebtFuturePrincipalPaymentsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note5LongTermDebtNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note5LongTermDebtTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note6ConvertiblePreferredStock" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note6ConvertiblePreferredStockNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note7WarrantsNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note7WarrantsNotes" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note7WarrantsScheduleOfStockholdersEquityNoteWarrantsOrRightsDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note7WarrantsTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note8CommitmentsAndContingencies" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note8CommitmentsAndContingenciesNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note9StockCompensationPlanEmployeeStockAwardActivityDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note9StockCompensationPlanNarrativeDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note9StockCompensationPlanNotes" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note9StockCompensationPlanShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsMethodUsedDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note9StockCompensationPlanStockBasedCompensationExpenseDetails" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note9StockCompensationPlanStockBasedCompensationExpenseTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/Note9StockCompensationPlanTables" xlink:type="extended" />
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/StatementOfCashFlows" xlink:type="extended" />
</link:linkbase>
