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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019f7fa4-5ed6-7fa7-9b6f-f981cc8b1069,g:bad2eabd-74e4-410b-be92-1f597f149aa8-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="https://xbrl.org/2023/arcrole/summation-item" xlink:type="simple" xlink:href="https://www.xbrl.org/2023/calculation-1.1.xsd#summation-item"/>
  <link:roleRef roleURI="http://www.xerispharma.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="xers-20260630.xsd#ConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019f7fa4-602f-75e9-896f-7ba9e9060275" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_019f7fa4-602f-72fa-814e-78c76229edcf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019f7fa4-602f-75e9-896f-7ba9e9060275" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_019f7fa4-602f-72fa-814e-78c76229edcf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019f7fa4-602f-7d28-9eae-20a5cb06c7fe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019f7fa4-602f-75e9-896f-7ba9e9060275" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019f7fa4-602f-7d28-9eae-20a5cb06c7fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_019f7fa4-602f-7ddc-8724-16c8a05f70eb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019f7fa4-602f-75e9-896f-7ba9e9060275" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_019f7fa4-602f-7ddc-8724-16c8a05f70eb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7228-a3a2-597bf4ee4e0a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019f7fa4-602f-75e9-896f-7ba9e9060275" xlink:to="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7228-a3a2-597bf4ee4e0a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019f7fa4-602f-7b76-af45-4213f30f2771" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019f7fa4-602f-724d-99a3-f9088e8c8008" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019f7fa4-602f-7b76-af45-4213f30f2771" xlink:to="loc_us-gaap_Liabilities_019f7fa4-602f-724d-99a3-f9088e8c8008" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019f7fa4-602f-7935-9c62-95cc31ced090" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019f7fa4-602f-7b76-af45-4213f30f2771" xlink:to="loc_us-gaap_StockholdersEquity_019f7fa4-602f-7935-9c62-95cc31ced090" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019f7fa4-602f-79ef-9f78-910bfe86a2a6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019f7fa4-602f-756a-9da6-90cdd2f5eb27" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019f7fa4-602f-79ef-9f78-910bfe86a2a6" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019f7fa4-602f-756a-9da6-90cdd2f5eb27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_019f7fa4-602f-70ad-8bb4-c864cec7dfeb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019f7fa4-602f-79ef-9f78-910bfe86a2a6" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_019f7fa4-602f-70ad-8bb4-c864cec7dfeb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_019f7fa4-602f-7cbe-a7f1-d25dd4daad68" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019f7fa4-602f-79ef-9f78-910bfe86a2a6" xlink:to="loc_us-gaap_InventoryNet_019f7fa4-602f-7cbe-a7f1-d25dd4daad68" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrent_019f7fa4-602f-7abc-8c36-7ca3c46da630" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019f7fa4-602f-79ef-9f78-910bfe86a2a6" xlink:to="loc_us-gaap_PrepaidExpenseCurrent_019f7fa4-602f-7abc-8c36-7ca3c46da630" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019f7fa4-602f-76ea-ac03-11b9db456272" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019f7fa4-602f-7490-990a-5dde9f4927bb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f7fa4-602f-76ea-ac03-11b9db456272" xlink:to="loc_us-gaap_AssetsCurrent_019f7fa4-602f-7490-990a-5dde9f4927bb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019f7fa4-602f-7be9-a1dd-a81998a80804" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f7fa4-602f-76ea-ac03-11b9db456272" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019f7fa4-602f-7be9-a1dd-a81998a80804" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019f7fa4-602f-75e2-b8ef-06425b7b66bc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f7fa4-602f-76ea-ac03-11b9db456272" xlink:to="loc_us-gaap_Goodwill_019f7fa4-602f-75e2-b8ef-06425b7b66bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019f7fa4-602f-7c0a-8a47-2948307e23c4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f7fa4-602f-76ea-ac03-11b9db456272" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019f7fa4-602f-7c0a-8a47-2948307e23c4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_019f7fa4-602f-75ea-8a0c-11b556cd60d8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f7fa4-602f-76ea-ac03-11b9db456272" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_019f7fa4-602f-75ea-8a0c-11b556cd60d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019f7fa4-602f-71a8-a722-c1b9882ebe69" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f7fa4-602f-76ea-ac03-11b9db456272" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019f7fa4-602f-71a8-a722-c1b9882ebe69" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_019f7fa4-602f-7536-9457-e02a3481833a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:to="loc_us-gaap_AccountsPayableCurrent_019f7fa4-602f-7536-9457-e02a3481833a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_019f7fa4-602f-7f29-b12a-6b01c262acbd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:to="loc_us-gaap_LongTermDebtCurrent_019f7fa4-602f-7f29-b12a-6b01c262acbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019f7fa4-602f-7ea6-ab45-13f51c301a12" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019f7fa4-602f-7ea6-ab45-13f51c301a12" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-602f-7644-bff5-53c91d9b6861" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-602f-7644-bff5-53c91d9b6861" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_AccrualForRebatesAndTradeDiscounts_019f7fa4-602f-78db-9a73-c9065b18632e" xlink:href="xers-20260630.xsd#xers_AccrualForRebatesAndTradeDiscounts"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:to="loc_xers_AccrualForRebatesAndTradeDiscounts_019f7fa4-602f-78db-9a73-c9065b18632e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_Accruedreturnsreserve_019f7fa4-602f-7d6b-87a6-eae1812b8bb2" xlink:href="xers-20260630.xsd#xers_Accruedreturnsreserve"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:to="loc_xers_Accruedreturnsreserve_019f7fa4-602f-7d6b-87a6-eae1812b8bb2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_019fa926-7797-72b1-9295-0cc34f142328" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilitiesCurrent"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019f7fa4-602f-7750-972d-69d06ac1e87e" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_019fa926-7797-72b1-9295-0cc34f142328" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019f7fa4-602f-72ba-a4b0-ea929fdab22b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_019f7fa4-602f-77a1-b73c-ec0cc12fbacc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019f7fa4-602f-72ba-a4b0-ea929fdab22b" xlink:to="loc_us-gaap_PreferredStockValue_019f7fa4-602f-77a1-b73c-ec0cc12fbacc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_019f7fa4-602f-786e-aa1d-7295ee3a9524" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019f7fa4-602f-72ba-a4b0-ea929fdab22b" xlink:to="loc_us-gaap_CommonStockValue_019f7fa4-602f-786e-aa1d-7295ee3a9524" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_019f7fa4-602f-7736-9eb2-da1d137cee91" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019f7fa4-602f-72ba-a4b0-ea929fdab22b" xlink:to="loc_us-gaap_AdditionalPaidInCapital_019f7fa4-602f-7736-9eb2-da1d137cee91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019f7fa4-602f-748d-a75c-b2c6687b4807" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019f7fa4-602f-72ba-a4b0-ea929fdab22b" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019f7fa4-602f-748d-a75c-b2c6687b4807" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019f7fa4-602f-7f25-9d59-06ad8b05b25f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019f7fa4-602f-72ba-a4b0-ea929fdab22b" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019f7fa4-602f-7f25-9d59-06ad8b05b25f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/ConsolidatedStatementsofOperationsandComprehensiveLoss" xlink:type="simple" xlink:href="xers-20260630.xsd#ConsolidatedStatementsofOperationsandComprehensiveLoss"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/ConsolidatedStatementsofOperationsandComprehensiveLoss" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_019f7fa4-602f-7dd4-a9f7-6972fd0de936" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationGainLossArisingDuringPeriodNetOfTax_019f7fa4-602f-7ec4-9a85-26da9e58925b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationGainLossArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019f7fa4-602f-7dd4-a9f7-6972fd0de936" xlink:to="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationGainLossArisingDuringPeriodNetOfTax_019f7fa4-602f-7ec4-9a85-26da9e58925b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019f7fa4-602f-7130-8693-19f8613a0c3e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019f7fa4-602f-7dd4-a9f7-6972fd0de936" xlink:to="loc_us-gaap_NetIncomeLoss_019f7fa4-602f-7130-8693-19f8613a0c3e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019f7fa4-602f-7c4b-b86c-b52681cfded2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeOther_019f7fa4-602f-772d-a545-ecb75db2eea7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestIncomeOther"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019f7fa4-602f-7c4b-b86c-b52681cfded2" xlink:to="loc_us-gaap_InterestIncomeOther_019f7fa4-602f-772d-a545-ecb75db2eea7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019f7fa4-602f-7ce4-8eaf-9f2a610ad119" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019f7fa4-602f-7c4b-b86c-b52681cfded2" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019f7fa4-602f-7ce4-8eaf-9f2a610ad119" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseNonoperating_019f9095-a9ce-7407-9e71-536e076c1120" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestExpenseNonoperating"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019f7fa4-602f-7c4b-b86c-b52681cfded2" xlink:to="loc_us-gaap_InterestExpenseNonoperating_019f9095-a9ce-7407-9e71-536e076c1120" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossAttributableToParent_019f7fa4-602f-7759-aa25-fff65e2bdbe5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019f7fa4-602f-70a1-882b-e0e6120b327b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_019f7fa4-602f-7759-aa25-fff65e2bdbe5" xlink:to="loc_us-gaap_OperatingIncomeLoss_019f7fa4-602f-70a1-882b-e0e6120b327b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019f7fa4-602f-70c1-b73f-f08d855f0074" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_019f7fa4-602f-7759-aa25-fff65e2bdbe5" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019f7fa4-602f-70c1-b73f-f08d855f0074" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingCostsAndExpenses_019f7fa4-602f-73c2-ba76-700757d76a40" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingCostsAndExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019f7fa4-602f-7f64-8ac5-f2b11984b081" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019f7fa4-602f-73c2-ba76-700757d76a40" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_019f7fa4-602f-7f64-8ac5-f2b11984b081" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019f7fa4-602f-756e-925a-73a183ec9e1d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019f7fa4-602f-73c2-ba76-700757d76a40" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019f7fa4-602f-756e-925a-73a183ec9e1d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization_019f7fa4-602f-7da6-90f2-39be454aad5c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019f7fa4-602f-73c2-ba76-700757d76a40" xlink:to="loc_us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization_019f7fa4-602f-7da6-90f2-39be454aad5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_019f7fa4-602f-725c-b44b-7395a7119f3e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019f7fa4-602f-73c2-ba76-700757d76a40" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019f7fa4-602f-725c-b44b-7395a7119f3e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019f7fa4-602f-70de-91a6-d974273aa40b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossAttributableToParent_019f7fa4-602f-797f-baa0-d33cfbbe5e41" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019f7fa4-602f-70de-91a6-d974273aa40b" xlink:to="loc_us-gaap_IncomeLossAttributableToParent_019f7fa4-602f-797f-baa0-d33cfbbe5e41" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019f7fa4-602f-7146-a370-5676c6119093" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019f7fa4-602f-70de-91a6-d974273aa40b" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019f7fa4-602f-7146-a370-5676c6119093" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019f7fa4-602f-7e63-a806-ee19b3382c7e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingCostsAndExpenses_019f7fa4-602f-7e30-9fd8-1b73ba1c3565" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingCostsAndExpenses"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019f7fa4-602f-7e63-a806-ee19b3382c7e" xlink:to="loc_us-gaap_OperatingCostsAndExpenses_019f7fa4-602f-7e30-9fd8-1b73ba1c3565" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019f7fa4-602f-7720-b7e2-232ffc812689" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019f7fa4-602f-7e63-a806-ee19b3382c7e" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019f7fa4-602f-7720-b7e2-232ffc812689" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/ConsolidatedStatementofCashFlows" xlink:type="simple" xlink:href="xers-20260630.xsd#ConsolidatedStatementofCashFlows"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/ConsolidatedStatementofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019f7fa4-602f-7bec-bb3f-300edcb18b53" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7233-9a11-5808fbf22bb0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019f7fa4-602f-7bec-bb3f-300edcb18b53" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7233-9a11-5808fbf22bb0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019f7fa4-602f-73e8-81f4-e8eda7f383ab" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019f7fa4-602f-7bec-bb3f-300edcb18b53" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019f7fa4-602f-73e8-81f4-e8eda7f383ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019f7fa4-602f-7a87-945f-aacd3d141d3b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019f7fa4-602f-7bec-bb3f-300edcb18b53" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019f7fa4-602f-7a87-945f-aacd3d141d3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019f7fa4-602f-7b3e-84f0-a532af378784" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_ProceedsPaymentsFromCapitalExpenditures_019f7fa4-602f-7805-a756-4753a03319ef" xlink:href="xers-20260630.xsd#xers_ProceedsPaymentsFromCapitalExpenditures"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019f7fa4-602f-7b3e-84f0-a532af378784" xlink:to="loc_xers_ProceedsPaymentsFromCapitalExpenditures_019f7fa4-602f-7805-a756-4753a03319ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019f7fa4-602f-7494-b78c-7dd49e86dae7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_NetIncomeLoss_019f7fa4-602f-7494-b78c-7dd49e86dae7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019f7fa4-602f-7fa4-8474-5b782f9d2cbd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019f7fa4-602f-7fa4-8474-5b782f9d2cbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_019f7fa4-602f-7a4f-9f47-d043de1ed251" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019f7fa4-602f-7a4f-9f47-d043de1ed251" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCosts_019f7fa4-602f-7c56-8342-d1a0e5432845" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AmortizationOfFinancingCosts"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_AmortizationOfFinancingCosts_019f7fa4-602f-7c56-8342-d1a0e5432845" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019f7fa4-602f-73bc-bd9f-d13a6582b674" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019f7fa4-602f-73bc-bd9f-d13a6582b674" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_019f7fa4-602f-7b74-85ce-757ddeacf272" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_ShareBasedCompensation_019f7fa4-602f-7b74-85ce-757ddeacf272" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019f7fa4-602f-7223-a874-7ec7f37ac8c9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019f7fa4-602f-7223-a874-7ec7f37ac8c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_019f7fa4-602f-7cf8-bdb7-e96841f1d9bf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_019f7fa4-602f-7cf8-bdb7-e96841f1d9bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_019f7fa4-602f-70f8-88f2-21f640e4ccea" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_019f7fa4-602f-70f8-88f2-21f640e4ccea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019f7fa4-602f-7f56-a51f-79b301c3c831" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019f7fa4-602f-7f56-a51f-79b301c3c831" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019f7fa4-602f-7c4f-9bcd-8d6c5a166f25" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019f7fa4-602f-7c4f-9bcd-8d6c5a166f25" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_IncreaseDecreaseInAccruedTradeDiscountsAndRebates_019f7fa4-602f-7f75-880f-7e4c1c2ee5fc" xlink:href="xers-20260630.xsd#xers_IncreaseDecreaseInAccruedTradeDiscountsAndRebates"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_xers_IncreaseDecreaseInAccruedTradeDiscountsAndRebates_019f7fa4-602f-7f75-880f-7e4c1c2ee5fc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_IncreaseDecreaseInAccruedReturnsReserve_019f7fa4-602f-73a4-9161-810b3546c7b0" xlink:href="xers-20260630.xsd#xers_IncreaseDecreaseInAccruedReturnsReserve"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_xers_IncreaseDecreaseInAccruedReturnsReserve_019f7fa4-602f-73a4-9161-810b3546c7b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOperatingLeaseLiability_019f7fa4-602f-7e2e-a4b6-c15dc4d530e0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOperatingLeaseLiability"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_IncreaseDecreaseInOperatingLeaseLiability_019f7fa4-602f-7e2e-a4b6-c15dc4d530e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019f7fa4-602f-7a5a-8f84-fab7179fb7b3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019f7fa4-602f-7a5a-8f84-fab7179fb7b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019f9092-4bcd-7dbb-8ae2-616d797f8620" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:calculationArc order="16" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019f7fa4-602f-7b05-9620-b4cb4809527f" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019f9092-4bcd-7dbb-8ae2-616d797f8620" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019f7fa4-602f-79c9-ab2a-465edbff8ff2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_019f7fa4-602f-7a16-add6-13b8065a663e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019f7fa4-602f-79c9-ab2a-465edbff8ff2" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_019f7fa4-602f-7a16-add6-13b8065a663e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfWarrants_019f7fa4-602f-73fa-bb6d-c0cf3b904f92" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromIssuanceOfWarrants"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019f7fa4-602f-79c9-ab2a-465edbff8ff2" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfWarrants_019f7fa4-602f-73fa-bb6d-c0cf3b904f92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_019f7fa4-602f-7d0e-a680-0e2ab0fb3ec9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019f7fa4-602f-79c9-ab2a-465edbff8ff2" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_019f7fa4-602f-7d0e-a680-0e2ab0fb3ec9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_019f9096-1bc0-7810-b0f7-e0c65620fc9d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019f7fa4-602f-79c9-ab2a-465edbff8ff2" xlink:to="loc_us-gaap_ProceedsFromStockPlans_019f9096-1bc0-7810-b0f7-e0c65620fc9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019f7fa4-602f-7c83-9fae-ccd292508a60" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_019f7fa4-602f-7cfe-8ab6-05d02c8f041a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019f7fa4-602f-7c83-9fae-ccd292508a60" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_019f7fa4-602f-7cfe-8ab6-05d02c8f041a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019f7fa4-602f-7ea9-952a-f3abecb1ae1e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019f7fa4-602f-7c83-9fae-ccd292508a60" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019f7fa4-602f-7ea9-952a-f3abecb1ae1e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IntangibleAssetsScheduleofIntangibleAssetsDetails" xlink:type="simple" xlink:href="xers-20260630.xsd#IntangibleAssetsScheduleofIntangibleAssetsDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/IntangibleAssetsScheduleofIntangibleAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-715d-af5d-7f43cd5e6a22" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019f7fa4-6030-73f8-8689-b311250aafba" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-715d-af5d-7f43cd5e6a22" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019f7fa4-6030-73f8-8689-b311250aafba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019f7fa4-6030-7a29-ba0c-cccbde27267f" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-715d-af5d-7f43cd5e6a22" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019f7fa4-6030-7a29-ba0c-cccbde27267f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IntangibleAssetsExpectedAmortizationDetails" xlink:type="simple" xlink:href="xers-20260630.xsd#IntangibleAssetsExpectedAmortizationDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/IntangibleAssetsExpectedAmortizationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-7f37-a4f0-406be49ff73c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019f7fa4-6030-7bda-ac42-32cf53ce47e4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-7f37-a4f0-406be49ff73c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019f7fa4-6030-7bda-ac42-32cf53ce47e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019f7fa4-6030-7798-8ecc-c08690393d80" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-7f37-a4f0-406be49ff73c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019f7fa4-6030-7798-8ecc-c08690393d80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019f7fa4-6030-7326-afb7-66101683113a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-7f37-a4f0-406be49ff73c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019f7fa4-6030-7326-afb7-66101683113a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019f7fa4-6030-71d6-9522-fbd0a960b7c0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-7f37-a4f0-406be49ff73c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019f7fa4-6030-71d6-9522-fbd0a960b7c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019f7fa4-6030-7401-93ed-cb37505c7b29" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-7f37-a4f0-406be49ff73c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019f7fa4-6030-7401-93ed-cb37505c7b29" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour_019f7fa4-6030-7a8b-9b44-7eab173f617a" xlink:href="xers-20260630.xsd#xers_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019f7fa4-6030-7f37-a4f0-406be49ff73c" xlink:to="loc_xers_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour_019f7fa4-6030-7a8b-9b44-7eab173f617a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/OtherAccruedLiabilitiesDetails" xlink:type="simple" xlink:href="xers-20260630.xsd#OtherAccruedLiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/OtherAccruedLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-6030-7924-863f-91c2148add2e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019f7fa4-6030-7e31-acc3-4d2614a9dc75" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-6030-7924-863f-91c2148add2e" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019f7fa4-6030-7e31-acc3-4d2614a9dc75" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019f7fa4-6030-7e61-afce-71f8ebabae81" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-6030-7924-863f-91c2148add2e" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019f7fa4-6030-7e61-afce-71f8ebabae81" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_AccruedSupplyChainCosts_019f7fa4-6030-7d49-a8a2-8b40f8280373" xlink:href="xers-20260630.xsd#xers_AccruedSupplyChainCosts"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-6030-7924-863f-91c2148add2e" xlink:to="loc_xers_AccruedSupplyChainCosts_019f7fa4-6030-7d49-a8a2-8b40f8280373" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedMarketingCostsCurrent_019f7fa4-6030-7bb8-b808-2cfa50010ffd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedMarketingCostsCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-6030-7924-863f-91c2148add2e" xlink:to="loc_us-gaap_AccruedMarketingCostsCurrent_019f7fa4-6030-7bb8-b808-2cfa50010ffd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_Accruedresearchcosts_019f7fa4-6030-792e-b162-29e21b09158e" xlink:href="xers-20260630.xsd#xers_Accruedresearchcosts"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-6030-7924-863f-91c2148add2e" xlink:to="loc_xers_Accruedresearchcosts_019f7fa4-6030-792e-b162-29e21b09158e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrent_019f7fa4-6030-70cb-82fe-1bcda40d0e77" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestPayableCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019f7fa4-6030-7924-863f-91c2148add2e" xlink:to="loc_us-gaap_InterestPayableCurrent_019f7fa4-6030-70cb-82fe-1bcda40d0e77" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/DebtComponentsofDebtDetails" xlink:type="simple" xlink:href="xers-20260630.xsd#DebtComponentsofDebtDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/DebtComponentsofDebtDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_019f7fa4-6030-7812-bf08-e7cb88042d92" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-7176-8e76-8e1185fce400" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtInstrumentCarryingAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_019f7fa4-6030-7812-bf08-e7cb88042d92" xlink:to="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-7176-8e76-8e1185fce400" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnamortizedDebtIssuanceExpense_019f7fa4-6030-737f-be42-946fa7336cf4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnamortizedDebtIssuanceExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_019f7fa4-6030-7812-bf08-e7cb88042d92" xlink:to="loc_us-gaap_UnamortizedDebtIssuanceExpense_019f7fa4-6030-737f-be42-946fa7336cf4" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/DebtFuturePrincipalPaymentsDetails" xlink:type="simple" xlink:href="xers-20260630.xsd#DebtFuturePrincipalPaymentsDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/DebtFuturePrincipalPaymentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-77b6-ad0d-018351dff6c3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtInstrumentCarryingAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_019f7fa4-6030-770b-aaca-d727437d055c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-77b6-ad0d-018351dff6c3" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_019f7fa4-6030-770b-aaca-d727437d055c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_019f7fa4-6030-7324-98bc-fde497d2e9b1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-77b6-ad0d-018351dff6c3" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_019f7fa4-6030-7324-98bc-fde497d2e9b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_019f7fa4-6030-759a-83bf-ddd8f6c53803" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-77b6-ad0d-018351dff6c3" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_019f7fa4-6030-759a-83bf-ddd8f6c53803" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_019f7fa4-6030-71fe-a1dd-09c394901a49" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-77b6-ad0d-018351dff6c3" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_019f7fa4-6030-71fe-a1dd-09c394901a49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_019f7fa4-6030-740a-8428-dd2d252f13b8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-77b6-ad0d-018351dff6c3" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_019f7fa4-6030-740a-8428-dd2d252f13b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_019f7fa4-6030-736f-929c-431519077270" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019f7fa4-6030-77b6-ad0d-018351dff6c3" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_019f7fa4-6030-736f-929c-431519077270" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/LeasesSummaryofLeaseCostInformationDetails" xlink:type="simple" xlink:href="xers-20260630.xsd#LeasesSummaryofLeaseCostInformationDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/LeasesSummaryofLeaseCostInformationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_019f7fa4-6030-714a-8d1a-4e3656f7c4cc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableLeaseCost_019f7fa4-6030-736d-a553-bcb98ba76e42" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_VariableLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseCost_019f7fa4-6030-714a-8d1a-4e3656f7c4cc" xlink:to="loc_us-gaap_VariableLeaseCost_019f7fa4-6030-736d-a553-bcb98ba76e42" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubleaseIncome_019f7fa4-6030-7c0e-b77f-22659eb0e4a9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubleaseIncome"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseCost_019f7fa4-6030-714a-8d1a-4e3656f7c4cc" xlink:to="loc_us-gaap_SubleaseIncome_019f7fa4-6030-7c0e-b77f-22659eb0e4a9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseExpense_019f7fa4-6030-71ee-9b80-76fae8a0c8d9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseCost_019f7fa4-6030-714a-8d1a-4e3656f7c4cc" xlink:to="loc_us-gaap_OperatingLeaseExpense_019f7fa4-6030-71ee-9b80-76fae8a0c8d9" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/LeasesScheduleofOperatingLeaseMaturitiesDetails" xlink:type="simple" xlink:href="xers-20260630.xsd#LeasesScheduleofOperatingLeaseMaturitiesDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/LeasesScheduleofOperatingLeaseMaturitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-70d6-b948-0c9a40bf6b68" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_019f7fa4-6030-7d6f-b8c4-d604ecf4cf04" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-70d6-b948-0c9a40bf6b68" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_019f7fa4-6030-7d6f-b8c4-d604ecf4cf04" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_019f7fa4-6030-7305-a83f-444fd6f2e9b4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-70d6-b948-0c9a40bf6b68" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_019f7fa4-6030-7305-a83f-444fd6f2e9b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_019f7fa4-6030-7e51-addc-22dd9f9d7a54" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-70d6-b948-0c9a40bf6b68" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_019f7fa4-6030-7e51-addc-22dd9f9d7a54" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_019f7fa4-6030-7781-b7ab-08efec477599" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-70d6-b948-0c9a40bf6b68" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_019f7fa4-6030-7781-b7ab-08efec477599" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_019f7fa4-6030-73cd-a5ff-e2dd98f7ed53" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-70d6-b948-0c9a40bf6b68" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_019f7fa4-6030-73cd-a5ff-e2dd98f7ed53" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_019f7fa4-6030-7dbe-bae4-b80dd6d384b2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-70d6-b948-0c9a40bf6b68" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_019f7fa4-6030-7dbe-bae4-b80dd6d384b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_019f7fa4-6030-794d-a7e8-680a7269e5c2" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019f7fa4-6030-763f-98dc-ac14eeb32494" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseLiability_019f7fa4-6030-794d-a7e8-680a7269e5c2" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019f7fa4-6030-763f-98dc-ac14eeb32494" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019f7fa4-6030-72f9-8f54-7837c2e476bb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseLiability_019f7fa4-6030-794d-a7e8-680a7269e5c2" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019f7fa4-6030-72f9-8f54-7837c2e476bb" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/LeasesScheduleofOperatingLeaseMaturitiesDetails_1" xlink:type="simple" xlink:href="xers-20260630.xsd#LeasesScheduleofOperatingLeaseMaturitiesDetails_1"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/LeasesScheduleofOperatingLeaseMaturitiesDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-7e3b-b2c4-5f90d5b9bf2e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_019f7fa4-6030-728e-8ba0-e6a97da35209" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-7e3b-b2c4-5f90d5b9bf2e" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_019f7fa4-6030-728e-8ba0-e6a97da35209" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_019f7fa4-6030-71b4-b75c-51e2f2bcbd19" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019f7fa4-6030-7e3b-b2c4-5f90d5b9bf2e" xlink:to="loc_us-gaap_OperatingLeaseLiability_019f7fa4-6030-71b4-b75c-51e2f2bcbd19" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
