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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019b47e8-0d55-72f3-8127-9e2ab61fcb61,g:76285b1a-e9f9-473e-87e6-9c0c3f7d5be5-->
<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:roleRef roleURI="http://www.xerispharma.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="xers-20251231.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_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_019b47e8-0ef9-7b56-9eae-6a6f7c7f1a4f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:to="loc_us-gaap_AccountsPayableCurrent_019b47e8-0ef9-7b56-9eae-6a6f7c7f1a4f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0ef9-7c56-a2dd-c5d4216b2326" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0ef9-7c56-a2dd-c5d4216b2326" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_AccrualForRebatesAndTradeDiscounts_019b47e8-0ef9-7d7d-8b8b-8aa6e2ab382f" xlink:href="xers-20251231.xsd#xers_AccrualForRebatesAndTradeDiscounts"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:to="loc_xers_AccrualForRebatesAndTradeDiscounts_019b47e8-0ef9-7d7d-8b8b-8aa6e2ab382f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_Accruedreturnsreserve_019b47e8-0ef9-7d46-a3c0-9ec31f994f79" xlink:href="xers-20251231.xsd#xers_Accruedreturnsreserve"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:to="loc_xers_Accruedreturnsreserve_019b47e8-0ef9-7d46-a3c0-9ec31f994f79" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_019b47e8-0ef9-71ee-b6d9-8c2dbf0fb76b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherLiabilitiesCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_019b47e8-0ef9-71ee-b6d9-8c2dbf0fb76b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019b47e8-0ef9-7ee4-8052-c157178c66cf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019b47e8-0ef9-7ee4-8052-c157178c66cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_019b47e8-0ef9-72f2-a02b-23f110a50ece" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-7e2d-90d8-39e597bbfc38" xlink:to="loc_us-gaap_LongTermDebtCurrent_019b47e8-0ef9-72f2-a02b-23f110a50ece" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019b47e8-0ef9-7443-858e-a847f885d05b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_019b47e8-0ef9-7ebd-a270-9b53fea8d2ac" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019b47e8-0ef9-7443-858e-a847f885d05b" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_019b47e8-0ef9-7ebd-a270-9b53fea8d2ac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019b47e8-0ef9-7605-9f19-d839d1640998" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019b47e8-0ef9-7443-858e-a847f885d05b" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019b47e8-0ef9-7605-9f19-d839d1640998" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_019b47e8-0ef9-7989-90ab-1b453861b2a6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019b47e8-0ef9-7443-858e-a847f885d05b" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_019b47e8-0ef9-7989-90ab-1b453861b2a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-71c6-b172-aad513551642" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019b47e8-0ef9-7443-858e-a847f885d05b" xlink:to="loc_us-gaap_LiabilitiesCurrent_019b47e8-0ef9-71c6-b172-aad513551642" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019b47e8-0ef9-7470-893a-15f1a8bea644" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019b47e8-0ef9-73bc-befa-2f55448d8e59" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019b47e8-0ef9-7470-893a-15f1a8bea644" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019b47e8-0ef9-73bc-befa-2f55448d8e59" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_019b47e8-0ef9-7675-82a0-af37b2f95f8a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019b47e8-0ef9-7470-893a-15f1a8bea644" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_019b47e8-0ef9-7675-82a0-af37b2f95f8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_019b47e8-0ef9-7521-bdd9-87ed110802a7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019b47e8-0ef9-7470-893a-15f1a8bea644" xlink:to="loc_us-gaap_InventoryNet_019b47e8-0ef9-7521-bdd9-87ed110802a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrent_019b47e8-0ef9-7218-855f-a8a7e0f6a9ea" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PrepaidExpenseCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019b47e8-0ef9-7470-893a-15f1a8bea644" xlink:to="loc_us-gaap_PrepaidExpenseCurrent_019b47e8-0ef9-7218-855f-a8a7e0f6a9ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019b47e8-0ef9-7617-8324-057ec7992658" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019b47e8-0ef9-7fe0-8459-98652553b225" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019b47e8-0ef9-7617-8324-057ec7992658" xlink:to="loc_us-gaap_Liabilities_019b47e8-0ef9-7fe0-8459-98652553b225" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-7d04-bfaa-d5b05061efd0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019b47e8-0ef9-7617-8324-057ec7992658" xlink:to="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-7d04-bfaa-d5b05061efd0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-744a-95de-9260da946c59" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_019b47e8-0ef9-768f-b5e6-951b262cfb8b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-744a-95de-9260da946c59" xlink:to="loc_us-gaap_PreferredStockValue_019b47e8-0ef9-768f-b5e6-951b262cfb8b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_019b47e8-0ef9-73b6-99a3-07ab129b8b8f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-744a-95de-9260da946c59" xlink:to="loc_us-gaap_CommonStockValue_019b47e8-0ef9-73b6-99a3-07ab129b8b8f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_019b47e8-0ef9-7013-aa14-82bf39dcc841" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-744a-95de-9260da946c59" xlink:to="loc_us-gaap_AdditionalPaidInCapital_019b47e8-0ef9-7013-aa14-82bf39dcc841" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019b47e8-0ef9-7946-bdb3-50abc0789a8f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-744a-95de-9260da946c59" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019b47e8-0ef9-7946-bdb3-50abc0789a8f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019b47e8-0ef9-773b-b685-2188d55241b8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019b47e8-0ef9-744a-95de-9260da946c59" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019b47e8-0ef9-773b-b685-2188d55241b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019b47e8-0ef9-7d6a-89f1-ee57d6afaa73" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019b47e8-0ef9-71f1-8a2d-645e1c8f9b4c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019b47e8-0ef9-7d6a-89f1-ee57d6afaa73" xlink:to="loc_us-gaap_AssetsCurrent_019b47e8-0ef9-71f1-8a2d-645e1c8f9b4c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019b47e8-0ef9-792e-816e-c6c14a3f728a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019b47e8-0ef9-7d6a-89f1-ee57d6afaa73" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019b47e8-0ef9-792e-816e-c6c14a3f728a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019b47e8-0ef9-7589-b582-3faab1d47577" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019b47e8-0ef9-7d6a-89f1-ee57d6afaa73" xlink:to="loc_us-gaap_Goodwill_019b47e8-0ef9-7589-b582-3faab1d47577" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019b47e8-0ef9-7b7c-af61-5d55a71d8656" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019b47e8-0ef9-7d6a-89f1-ee57d6afaa73" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019b47e8-0ef9-7b7c-af61-5d55a71d8656" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_019b47e8-0ef9-757f-8a0d-2aeaafd89609" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019b47e8-0ef9-7d6a-89f1-ee57d6afaa73" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_019b47e8-0ef9-757f-8a0d-2aeaafd89609" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019b47e8-0ef9-7b8e-8f07-f3fc094e7094" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019b47e8-0ef9-7d6a-89f1-ee57d6afaa73" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019b47e8-0ef9-7b8e-8f07-f3fc094e7094" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/ConsolidatedStatementsofOperationsandComprehensiveLoss" xlink:type="simple" xlink:href="xers-20251231.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_OperatingCostsAndExpenses_019b47e8-0ef9-739e-b4e1-80b486978503" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingCostsAndExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019b47e8-0ef9-7a12-80c8-8f2c6a06d469" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019b47e8-0ef9-739e-b4e1-80b486978503" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_019b47e8-0ef9-7a12-80c8-8f2c6a06d469" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019b47e8-0ef9-76ea-af8c-306e9a21be14" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019b47e8-0ef9-739e-b4e1-80b486978503" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019b47e8-0ef9-76ea-af8c-306e9a21be14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization_019b47e8-0ef9-7fe4-9658-26d3c8002c7f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019b47e8-0ef9-739e-b4e1-80b486978503" xlink:to="loc_us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization_019b47e8-0ef9-7fe4-9658-26d3c8002c7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_019b47e8-0ef9-70f8-9581-8019eee5e246" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingCostsAndExpenses_019b47e8-0ef9-739e-b4e1-80b486978503" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019b47e8-0ef9-70f8-9581-8019eee5e246" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-703c-af09-074201a97374" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeOther_019b47e8-0ef9-7396-8eb1-1a78abf34b97" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InterestIncomeOther"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-703c-af09-074201a97374" xlink:to="loc_us-gaap_InterestIncomeOther_019b47e8-0ef9-7396-8eb1-1a78abf34b97" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseNonoperating_019b47e8-0ef9-7122-8416-9d2bb2c8329f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InterestExpenseNonoperating"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-703c-af09-074201a97374" xlink:to="loc_us-gaap_InterestExpenseNonoperating_019b47e8-0ef9-7122-8416-9d2bb2c8329f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAdjustmentOfWarrants_019b47e8-0ef9-79f9-bd5c-0c50cf7697d1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueAdjustmentOfWarrants"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-703c-af09-074201a97374" xlink:to="loc_us-gaap_FairValueAdjustmentOfWarrants_019b47e8-0ef9-79f9-bd5c-0c50cf7697d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1_019b47e8-0ef9-796c-9d65-324d62648938" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-703c-af09-074201a97374" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1_019b47e8-0ef9-796c-9d65-324d62648938" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_DebtRefinancingCosts_019b47e8-0ef9-7f26-bf5a-1c2989596ea9" xlink:href="xers-20251231.xsd#xers_DebtRefinancingCosts"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-703c-af09-074201a97374" xlink:to="loc_xers_DebtRefinancingCosts_019b47e8-0ef9-7f26-bf5a-1c2989596ea9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019c6942-be1f-7730-8525-ce2237a73b90" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-703c-af09-074201a97374" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019c6942-be1f-7730-8525-ce2237a73b90" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019b47e8-0ef9-7207-b553-48af59077dac" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossAttributableToParent_019b47e8-0ef9-7970-a6fa-9763fbba6c5a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019b47e8-0ef9-7207-b553-48af59077dac" xlink:to="loc_us-gaap_IncomeLossAttributableToParent_019b47e8-0ef9-7970-a6fa-9763fbba6c5a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0ef9-7f2f-85f4-19e202787bae" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019b47e8-0ef9-7207-b553-48af59077dac" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0ef9-7f2f-85f4-19e202787bae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019b47e8-0ef9-72db-ae38-e2ca109d3faf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingCostsAndExpenses_019b47e8-0ef9-7eba-b748-3dc0fd16ef74" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingCostsAndExpenses"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019b47e8-0ef9-72db-ae38-e2ca109d3faf" xlink:to="loc_us-gaap_OperatingCostsAndExpenses_019b47e8-0ef9-7eba-b748-3dc0fd16ef74" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019b47e8-0ef9-7cef-b6ee-5e70e80d8df1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019b47e8-0ef9-72db-ae38-e2ca109d3faf" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019b47e8-0ef9-7cef-b6ee-5e70e80d8df1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_019b47e8-0ef9-7f28-950c-545e5d10f497" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodBeforeTax_019b47e8-0ef9-7591-ac03-656d6bbf9af8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019b47e8-0ef9-7f28-950c-545e5d10f497" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodBeforeTax_019b47e8-0ef9-7591-ac03-656d6bbf9af8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019b47e8-0ef9-76a4-9490-fb7d85ebed61" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_019b47e8-0ef9-7f28-950c-545e5d10f497" xlink:to="loc_us-gaap_NetIncomeLoss_019b47e8-0ef9-76a4-9490-fb7d85ebed61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossAttributableToParent_019b47e8-0ef9-736f-bc88-4541876d2b6c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019b47e8-0ef9-779f-ae72-e5370c188743" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_019b47e8-0ef9-736f-bc88-4541876d2b6c" xlink:to="loc_us-gaap_OperatingIncomeLoss_019b47e8-0ef9-779f-ae72-e5370c188743" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-70cc-987a-f7a57248f570" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossAttributableToParent_019b47e8-0ef9-736f-bc88-4541876d2b6c" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019b47e8-0ef9-70cc-987a-f7a57248f570" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/ConsolidatedStatementofCashFlows" xlink:type="simple" xlink:href="xers-20251231.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_NetCashProvidedByUsedInInvestingActivities_019b47e8-0ef9-7cbb-b780-2ee253f12d8c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_ProceedsPaymentsFromCapitalExpenditures_019b47e8-0ef9-7084-9c30-20e0126440f5" xlink:href="xers-20251231.xsd#xers_ProceedsPaymentsFromCapitalExpenditures"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019b47e8-0ef9-7cbb-b780-2ee253f12d8c" xlink:to="loc_xers_ProceedsPaymentsFromCapitalExpenditures_019b47e8-0ef9-7084-9c30-20e0126440f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireInvestments_019b47e8-0ef9-7686-9782-f4ac34d21cbe" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PaymentsToAcquireInvestments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019b47e8-0ef9-7cbb-b780-2ee253f12d8c" xlink:to="loc_us-gaap_PaymentsToAcquireInvestments_019b47e8-0ef9-7686-9782-f4ac34d21cbe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_019b47e8-0ef9-76ea-9250-7726a4f60a3d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019b47e8-0ef9-7cbb-b780-2ee253f12d8c" xlink:to="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_019b47e8-0ef9-76ea-9250-7726a4f60a3d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_ProceedsFromRefinancingOfDebt_019b47e8-0fcb-7e02-94dd-9941e02dc07c" xlink:href="xers-20251231.xsd#xers_ProceedsFromRefinancingOfDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:to="loc_xers_ProceedsFromRefinancingOfDebt_019b47e8-0fcb-7e02-94dd-9941e02dc07c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_DebtRefinancingPaymentOfDebtDiscount_019b47e8-0fcb-7346-a16c-5a000dd0072a" xlink:href="xers-20251231.xsd#xers_DebtRefinancingPaymentOfDebtDiscount"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:to="loc_xers_DebtRefinancingPaymentOfDebtDiscount_019b47e8-0fcb-7346-a16c-5a000dd0072a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_019b47e8-0fcb-746c-8c55-44778fbcde04" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_019b47e8-0fcb-746c-8c55-44778fbcde04" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockPlans_019b47e8-0fcb-7597-b17e-eab348e78988" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:to="loc_us-gaap_ProceedsFromStockPlans_019b47e8-0fcb-7597-b17e-eab348e78988" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_019b47e8-0fcb-7169-93c1-b98e37338591" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_019b47e8-0fcb-7169-93c1-b98e37338591" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfWarrants_019b47e8-0fcb-7762-aedf-7190cc0d4084" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProceedsFromIssuanceOfWarrants"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfWarrants_019b47e8-0fcb-7762-aedf-7190cc0d4084" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_019c95b0-57c2-7543-baeb-63d41e5f3685" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0fcb-7780-9665-848f8673a811" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_019c95b0-57c2-7543-baeb-63d41e5f3685" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019b47e8-0fcb-7e22-8515-90fb0f53cd74" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019c7bde-214a-7688-ac4e-a6946a6302e1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019b47e8-0fcb-7e22-8515-90fb0f53cd74" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019c7bde-214a-7688-ac4e-a6946a6302e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_019b47e8-0fcb-7f4b-88cf-a6c206c1b1df" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019b47e8-0fcb-7e22-8515-90fb0f53cd74" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_019b47e8-0fcb-7f4b-88cf-a6c206c1b1df" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019b47e8-0ef9-72c5-b7c5-e545331605ee" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-7778-aca3-690f554b50c6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019b47e8-0ef9-72c5-b7c5-e545331605ee" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-7778-aca3-690f554b50c6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019b47e8-0ef9-7dec-8039-7f7192437ee5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019b47e8-0ef9-72c5-b7c5-e545331605ee" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019b47e8-0ef9-7dec-8039-7f7192437ee5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0ef9-7389-8c7a-2276515addf9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019b47e8-0ef9-72c5-b7c5-e545331605ee" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019b47e8-0ef9-7389-8c7a-2276515addf9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019b47e8-0ef9-75bd-8a6b-e60ff791ffe1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_NetIncomeLoss_019b47e8-0ef9-75bd-8a6b-e60ff791ffe1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019b47e8-0ef9-7da5-bc3b-0b1516400424" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019b47e8-0ef9-7da5-bc3b-0b1516400424" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_019b47e8-0ef9-79c7-87f3-b90b7244c975" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_019b47e8-0ef9-79c7-87f3-b90b7244c975" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_019b47e8-0ef9-7caa-afad-b21818d812b7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_019b47e8-0ef9-7caa-afad-b21818d812b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCosts_019b47e8-0ef9-7c2b-b178-13922bd6883d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AmortizationOfFinancingCosts"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_AmortizationOfFinancingCosts_019b47e8-0ef9-7c2b-b178-13922bd6883d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019b47e8-0ef9-7335-9615-1ec309652af9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_019b47e8-0ef9-7335-9615-1ec309652af9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019b47e8-0ef9-720e-99c5-9893ca1dac92" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019b47e8-0ef9-720e-99c5-9893ca1dac92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_019b47e8-0ef9-751c-b1ce-71093767266b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_ShareBasedCompensation_019b47e8-0ef9-751c-b1ce-71093767266b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019b47e8-0ef9-73ad-80f9-36905a018632" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_019b47e8-0ef9-73ad-80f9-36905a018632" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_AdjustmentForChangeInFairValueOfContingentValueRights_019b47e8-0ef9-72f6-ad43-b385d94e58b0" xlink:href="xers-20251231.xsd#xers_AdjustmentForChangeInFairValueOfContingentValueRights"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_xers_AdjustmentForChangeInFairValueOfContingentValueRights_019b47e8-0ef9-72f6-ad43-b385d94e58b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_019b47e8-0ef9-7bea-8fef-65a21d6295b1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_019b47e8-0ef9-7bea-8fef-65a21d6295b1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019b47e8-0ef9-7926-a6af-b0450916400e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019b47e8-0ef9-7926-a6af-b0450916400e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_019b47e8-0ef9-78d4-be69-5dfd76c7a3f8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_019b47e8-0ef9-78d4-be69-5dfd76c7a3f8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_019b47e8-0ef9-73b3-b4a4-8e8a2df3abd6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="14" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_019b47e8-0ef9-73b3-b4a4-8e8a2df3abd6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019b47e8-0ef9-775e-99d0-f62dca689ebd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019b47e8-0ef9-775e-99d0-f62dca689ebd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019b47e8-0ef9-7a89-b31d-0537aaace60f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="16" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019b47e8-0ef9-7a89-b31d-0537aaace60f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_IncreaseDecreaseInAccruedTradeDiscountsAndRebates_019b47e8-0ef9-78de-8dbd-c9b08cfb3450" xlink:href="xers-20251231.xsd#xers_IncreaseDecreaseInAccruedTradeDiscountsAndRebates"/>
    <link:calculationArc order="17" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_xers_IncreaseDecreaseInAccruedTradeDiscountsAndRebates_019b47e8-0ef9-78de-8dbd-c9b08cfb3450" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_IncreaseDecreaseInAccruedReturnsReserve_019b47e8-0ef9-7090-b421-ab5bb79b5802" xlink:href="xers-20251231.xsd#xers_IncreaseDecreaseInAccruedReturnsReserve"/>
    <link:calculationArc order="18" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_xers_IncreaseDecreaseInAccruedReturnsReserve_019b47e8-0ef9-7090-b421-ab5bb79b5802" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_IncreaseDecreaseInSupplyAgreementLiabilities_019c95ab-be0e-778d-950b-b1b0be66b0cf" xlink:href="xers-20251231.xsd#xers_IncreaseDecreaseInSupplyAgreementLiabilities"/>
    <link:calculationArc order="19" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_xers_IncreaseDecreaseInSupplyAgreementLiabilities_019c95ab-be0e-778d-950b-b1b0be66b0cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOperatingLeaseLiability_019c95ab-ef25-74c3-912e-22fefe8ed315" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInOperatingLeaseLiability"/>
    <link:calculationArc order="20" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_IncreaseDecreaseInOperatingLeaseLiability_019c95ab-ef25-74c3-912e-22fefe8ed315" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019c95ab-ef25-71fa-8225-ba194b314f81" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <link:calculationArc order="21" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019b47e8-0ef9-716d-88e4-a812e5a28747" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_019c95ab-ef25-71fa-8225-ba194b314f81" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IntangibleAssetsScheduleofIntangibleAssetsDetails" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-77ce-842b-8043efaf38e7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019b47e8-0fcb-72d4-aa6e-5178b6f7daad" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-77ce-842b-8043efaf38e7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019b47e8-0fcb-72d4-aa6e-5178b6f7daad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019b47e8-0fcb-72c7-b3fb-78a86f0a2afb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-77ce-842b-8043efaf38e7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019b47e8-0fcb-72c7-b3fb-78a86f0a2afb" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IntangibleAssetsExpectedAmortizationDetails" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-75df-924f-62c5107d2a37" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019b47e8-0fcb-76ea-b9ff-b59ad901dd8d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-75df-924f-62c5107d2a37" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019b47e8-0fcb-76ea-b9ff-b59ad901dd8d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019b47e8-0fcb-7c20-8427-2ed8e23088ba" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-75df-924f-62c5107d2a37" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019b47e8-0fcb-7c20-8427-2ed8e23088ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019b47e8-0fcb-7558-9cdf-6d9e78bf73c2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-75df-924f-62c5107d2a37" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019b47e8-0fcb-7558-9cdf-6d9e78bf73c2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019b47e8-0fcb-7ebd-9ba7-f85c8b13239f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-75df-924f-62c5107d2a37" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019b47e8-0fcb-7ebd-9ba7-f85c8b13239f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019b47e8-0fcb-70b0-b3b7-1163d4f0b853" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-75df-924f-62c5107d2a37" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019b47e8-0fcb-70b0-b3b7-1163d4f0b853" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019c9148-ec55-78d3-83a4-84cff999a630" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019b47e8-0fcb-75df-924f-62c5107d2a37" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019c9148-ec55-78d3-83a4-84cff999a630" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/OtherAccruedLiabilitiesDetails" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-75a6-ae6e-cf2667d77552" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019b47e8-0fcb-7b24-9f56-89974673e12d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0fcb-75a6-ae6e-cf2667d77552" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019b47e8-0fcb-7b24-9f56-89974673e12d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019b47e8-0fcb-7676-9a02-55080c883889" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0fcb-75a6-ae6e-cf2667d77552" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019b47e8-0fcb-7676-9a02-55080c883889" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_AccruedSupplyChainCosts_019b47e8-0fcb-77c5-a3e8-1a1b1f6b5960" xlink:href="xers-20251231.xsd#xers_AccruedSupplyChainCosts"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0fcb-75a6-ae6e-cf2667d77552" xlink:to="loc_xers_AccruedSupplyChainCosts_019b47e8-0fcb-77c5-a3e8-1a1b1f6b5960" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedMarketingCostsCurrent_019b47e8-0fcb-7f1d-bde2-9f04adb792b7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedMarketingCostsCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0fcb-75a6-ae6e-cf2667d77552" xlink:to="loc_us-gaap_AccruedMarketingCostsCurrent_019b47e8-0fcb-7f1d-bde2-9f04adb792b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_Accruedresearchcosts_019b47e8-0fcb-7219-ad9a-39bc93ae9aa6" xlink:href="xers-20251231.xsd#xers_Accruedresearchcosts"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0fcb-75a6-ae6e-cf2667d77552" xlink:to="loc_xers_Accruedresearchcosts_019b47e8-0fcb-7219-ad9a-39bc93ae9aa6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrent_019b47e8-0fcb-73b6-9a89-a415a9164117" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InterestPayableCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019b47e8-0fcb-75a6-ae6e-cf2667d77552" xlink:to="loc_us-gaap_InterestPayableCurrent_019b47e8-0fcb-73b6-9a89-a415a9164117" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/DebtComponentsofDebtDetails" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-7013-a2c4-3feff326b3ab" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7c20-9b9c-3305714f8a64" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentCarryingAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_019b47e8-0fcb-7013-a2c4-3feff326b3ab" xlink:to="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7c20-9b9c-3305714f8a64" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnamortizedDebtIssuanceExpense_019b47e8-0fcb-73e0-bb32-65399e31bd9b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_UnamortizedDebtIssuanceExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_019b47e8-0fcb-7013-a2c4-3feff326b3ab" xlink:to="loc_us-gaap_UnamortizedDebtIssuanceExpense_019b47e8-0fcb-73e0-bb32-65399e31bd9b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/DebtFuturePrincipalPaymentsDetails" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-7342-8482-717d4f9f9e5a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentCarryingAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_019b47e8-0fcb-7802-8a37-3ae1fa606a9e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7342-8482-717d4f9f9e5a" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_019b47e8-0fcb-7802-8a37-3ae1fa606a9e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_019b47e8-0fcb-77f7-b9c6-6a5eecfd5d5c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7342-8482-717d4f9f9e5a" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_019b47e8-0fcb-77f7-b9c6-6a5eecfd5d5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_019b47e8-0fcb-79ed-9738-c25bfbc8308a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7342-8482-717d4f9f9e5a" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_019b47e8-0fcb-79ed-9738-c25bfbc8308a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_019b47e8-0fcb-72e4-9703-c1a26b09048e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7342-8482-717d4f9f9e5a" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_019b47e8-0fcb-72e4-9703-c1a26b09048e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_019b47e8-0fcb-77c7-8d40-1f7333adb9a2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7342-8482-717d4f9f9e5a" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_019b47e8-0fcb-77c7-8d40-1f7333adb9a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_019b47e8-0fcb-71e9-bc8b-24aadceea1e7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtInstrumentCarryingAmount_019b47e8-0fcb-7342-8482-717d4f9f9e5a" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_019b47e8-0fcb-71e9-bc8b-24aadceea1e7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/LeasesSummaryofLeaseCostInformationDetails" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-7c9f-899e-e838493f6cb2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableLeaseCost_019b47e8-0fcb-7b20-acec-72a08c2ac3c6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_VariableLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseCost_019b47e8-0fcb-7c9f-899e-e838493f6cb2" xlink:to="loc_us-gaap_VariableLeaseCost_019b47e8-0fcb-7b20-acec-72a08c2ac3c6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubleaseIncome_019b47e8-0fcb-78bc-b18f-ca5d10659adf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SubleaseIncome"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseCost_019b47e8-0fcb-7c9f-899e-e838493f6cb2" xlink:to="loc_us-gaap_SubleaseIncome_019b47e8-0fcb-78bc-b18f-ca5d10659adf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseExpense_019b47e8-0fcb-7623-b379-8ac4b8dea6a3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseCost_019b47e8-0fcb-7c9f-899e-e838493f6cb2" xlink:to="loc_us-gaap_OperatingLeaseExpense_019b47e8-0fcb-7623-b379-8ac4b8dea6a3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/LeasesScheduleofOperatingLeaseMaturitiesDetails" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-7be3-88e5-9530b6411f34" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_019b47e8-0fcb-7fbf-90f5-4beded9d630b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7be3-88e5-9530b6411f34" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_019b47e8-0fcb-7fbf-90f5-4beded9d630b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_019b47e8-0fcb-77d2-b801-d7581ef051f2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7be3-88e5-9530b6411f34" xlink:to="loc_us-gaap_OperatingLeaseLiability_019b47e8-0fcb-77d2-b801-d7581ef051f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_019b47e8-0fcb-74c5-8625-688fb6ea5890" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019b47e8-0fcb-7996-9cc7-a902d74ce7bc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseLiability_019b47e8-0fcb-74c5-8625-688fb6ea5890" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019b47e8-0fcb-7996-9cc7-a902d74ce7bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019b47e8-0fcb-708f-92d8-46d40b986940" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseLiability_019b47e8-0fcb-74c5-8625-688fb6ea5890" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019b47e8-0fcb-708f-92d8-46d40b986940" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/LeasesScheduleofOperatingLeaseMaturitiesDetails_1" xlink:type="simple" xlink:href="xers-20251231.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_019b47e8-0fcb-7047-8e52-39ee8aa7213f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_019b47e8-0fcb-7a48-a00a-83257fd4b99b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7047-8e52-39ee8aa7213f" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_019b47e8-0fcb-7a48-a00a-83257fd4b99b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_019b47e8-0fcb-7000-807a-d9cce6ab713f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7047-8e52-39ee8aa7213f" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_019b47e8-0fcb-7000-807a-d9cce6ab713f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_019b47e8-0fcb-78fd-ba93-a5bbe4afca2f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7047-8e52-39ee8aa7213f" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_019b47e8-0fcb-78fd-ba93-a5bbe4afca2f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_019b47e8-0fcb-7c01-adcb-c8f27111c9fd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7047-8e52-39ee8aa7213f" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_019b47e8-0fcb-7c01-adcb-c8f27111c9fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_019b47e8-0fcb-7563-97c7-2892eb5b2ff9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7047-8e52-39ee8aa7213f" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_019b47e8-0fcb-7563-97c7-2892eb5b2ff9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_019c912e-beb0-79f5-b4f2-3132aae355a1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019b47e8-0fcb-7047-8e52-39ee8aa7213f" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_019c912e-beb0-79f5-b4f2-3132aae355a1" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IncomeTaxesScheduleofIncomeLossBeforeIncomeTaxesDetails" xlink:type="simple" xlink:href="xers-20251231.xsd#IncomeTaxesScheduleofIncomeLossBeforeIncomeTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/IncomeTaxesScheduleofIncomeLossBeforeIncomeTaxesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019b47e8-0fcb-7c04-9add-2cbf7a06f03e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_019b47e8-0fcb-7b6a-b3fa-43d92e3215b5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019b47e8-0fcb-7c04-9add-2cbf7a06f03e" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_019b47e8-0fcb-7b6a-b3fa-43d92e3215b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_019b47e8-0fcb-7612-9a1e-306a4f0eeded" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019b47e8-0fcb-7c04-9add-2cbf7a06f03e" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_019b47e8-0fcb-7612-9a1e-306a4f0eeded" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IncomeTaxesScheduleofComponentsofIncomeTaxBenefitExpenseDetails" xlink:type="simple" xlink:href="xers-20251231.xsd#IncomeTaxesScheduleofComponentsofIncomeTaxBenefitExpenseDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/IncomeTaxesScheduleofComponentsofIncomeTaxBenefitExpenseDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-72d4-8e8c-102c5db6a167" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentForeignTaxExpenseBenefit_019b47e8-0fcb-7371-8c51-0470a3f12cf0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CurrentForeignTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-72d4-8e8c-102c5db6a167" xlink:to="loc_us-gaap_CurrentForeignTaxExpenseBenefit_019b47e8-0fcb-7371-8c51-0470a3f12cf0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentFederalStateAndLocalTaxExpenseBenefit_019b47e8-0fcb-7837-be6b-1e0fa9fef459" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CurrentFederalStateAndLocalTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-72d4-8e8c-102c5db6a167" xlink:to="loc_us-gaap_CurrentFederalStateAndLocalTaxExpenseBenefit_019b47e8-0fcb-7837-be6b-1e0fa9fef459" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefitContinuingOperationsAdjustmentOfDeferredTaxAssetLiability_019b47e8-0fcb-77fe-9cd0-118a759e8d50" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxExpenseBenefitContinuingOperationsAdjustmentOfDeferredTaxAssetLiability"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-72d4-8e8c-102c5db6a167" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefitContinuingOperationsAdjustmentOfDeferredTaxAssetLiability_019b47e8-0fcb-77fe-9cd0-118a759e8d50" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IncomeTaxesReconciliationofExpectedIncomeTaxBenefitDetails" xlink:type="simple" xlink:href="xers-20251231.xsd#IncomeTaxesReconciliationofExpectedIncomeTaxBenefitDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/IncomeTaxesReconciliationofExpectedIncomeTaxBenefitDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate_019b47e8-0fcb-7cc5-995b-20f1895ec89a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate_019b47e8-0fcb-7cc5-995b-20f1895ec89a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes_019b47e8-0fcb-720f-b015-0a284b94fbbd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes_019b47e8-0fcb-720f-b015-0a284b94fbbd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential_019b47e8-0fcb-7afc-85af-8ed500dfd447" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential_019b47e8-0fcb-7afc-85af-8ed500dfd447" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance_019b47e8-0fcb-7c60-abc3-6d324b82047f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance_019b47e8-0fcb-7c60-abc3-6d324b82047f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationOtherAdjustments_019b47e8-0fcb-7542-ac20-a0d74f5425d9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationOtherAdjustments"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationOtherAdjustments_019b47e8-0fcb-7542-ac20-a0d74f5425d9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationCrossBorderOtherAmount_019b47e8-0fcb-7259-ad88-642b8e0b4e5e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationCrossBorderOtherAmount"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationCrossBorderOtherAmount_019b47e8-0fcb-7259-ad88-642b8e0b4e5e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationTaxCreditsResearch_019b47e8-0fcb-741a-8469-c814a5528fec" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationTaxCreditsResearch"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationTaxCreditsResearch_019b47e8-0fcb-741a-8469-c814a5528fec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseCompensationSubjectToSection162mLimitation_019b47e8-0fcb-7582-a4d9-62242cb01450" xlink:href="xers-20251231.xsd#xers_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseCompensationSubjectToSection162mLimitation"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_xers_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseCompensationSubjectToSection162mLimitation_019b47e8-0fcb-7582-a4d9-62242cb01450" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost_019b47e8-0fcb-73d7-892f-9e7f7dd3b7ee" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost_019b47e8-0fcb-73d7-892f-9e7f7dd3b7ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseOther_019c8c49-0532-7257-b8ff-a7a89d2a35b9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationNondeductibleExpenseOther"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationNondeductibleExpenseOther_019c8c49-0532-7257-b8ff-a7a89d2a35b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationOtherReconcilingItems_019c8c49-0532-72d5-bb60-4479a499d3d5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationOtherReconcilingItems"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationOtherReconcilingItems_019c8c49-0532-72d5-bb60-4479a499d3d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationTaxContingencies_019c8c4c-48fb-767e-b405-c2ceaa0a9df0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationTaxContingencies"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationTaxContingencies_019c8c4c-48fb-767e-b405-c2ceaa0a9df0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes_019c8c4d-17a7-707a-8b3d-efc9f2947b58" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_019b47e8-0fcb-7acb-974d-cb77d0582ee7" xlink:to="loc_us-gaap_IncomeTaxReconciliationPriorYearIncomeTaxes_019c8c4d-17a7-707a-8b3d-efc9f2947b58" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.xerispharma.com/role/IncomeTaxesScheduleofDeferredTaxAssetsandLiabilitiesDetails" xlink:type="simple" xlink:href="xers-20251231.xsd#IncomeTaxesScheduleofDeferredTaxAssetsandLiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.xerispharma.com/role/IncomeTaxesScheduleofDeferredTaxAssetsandLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_019b47e8-0fcb-7ea2-9537-02c8647547d9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_DeferredTaxLiabilitiesFixedandIntangibleAssets_019b47e8-0fcb-7cb4-a294-35394baa6afe" xlink:href="xers-20251231.xsd#xers_DeferredTaxLiabilitiesFixedandIntangibleAssets"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_019b47e8-0fcb-7ea2-9537-02c8647547d9" xlink:to="loc_xers_DeferredTaxLiabilitiesFixedandIntangibleAssets_019b47e8-0fcb-7cb4-a294-35394baa6afe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_019b47e8-0fcb-7c44-8da4-4eced578f31e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_019b47e8-0fcb-7ea2-9537-02c8647547d9" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_019b47e8-0fcb-7c44-8da4-4eced578f31e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesLeasingArrangements_019b47e8-0fcb-72bc-abd6-435e5c388cc5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxLiabilitiesLeasingArrangements"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_019b47e8-0fcb-7ea2-9537-02c8647547d9" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesLeasingArrangements_019b47e8-0fcb-72bc-abd6-435e5c388cc5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilities_019b47e8-0fcb-7b79-bbe2-211a990501f6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_019b47e8-0fcb-795f-87c0-e85c27ba1005" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_019b47e8-0fcb-7b79-bbe2-211a990501f6" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_019b47e8-0fcb-795f-87c0-e85c27ba1005" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-751e-92da-23b0e2f552bf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxLiabilities_019b47e8-0fcb-7b79-bbe2-211a990501f6" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-751e-92da-23b0e2f552bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_019b47e8-0fcb-70e3-a8b0-8e30594b4403" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_019b47e8-0fcb-70e3-a8b0-8e30594b4403" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsInventory_019b47e8-0fcb-74fa-b274-220e421b2547" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsInventory"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsInventory_019b47e8-0fcb-74fa-b274-220e421b2547" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xers_DeferredTaxAssetsOperatingLeaseLiability_019b47e8-0fcb-79d0-bd77-70db3dde0bf9" xlink:href="xers-20251231.xsd#xers_DeferredTaxAssetsOperatingLeaseLiability"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_xers_DeferredTaxAssetsOperatingLeaseLiability_019b47e8-0fcb-79d0-bd77-70db3dde0bf9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsResearch_019b47e8-0fcb-7a5d-9187-a21da45d3b15" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsResearch"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsResearch_019b47e8-0fcb-7a5d-9187-a21da45d3b15" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities_019b47e8-0fcb-7e26-8ad4-36d6909457bc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities_019b47e8-0fcb-7e26-8ad4-36d6909457bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_019b47e8-0fcb-7032-88c2-4db42db0c4e9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_019b47e8-0fcb-7032-88c2-4db42db0c4e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_019b47e8-0fcb-7ae8-b1d7-5ad36b97985b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_019b47e8-0fcb-7ae8-b1d7-5ad36b97985b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetInterestCarryforward_019b47e8-0fcb-705e-9ad4-14721a1cace5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetInterestCarryforward"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetInterestCarryforward_019b47e8-0fcb-705e-9ad4-14721a1cace5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_019b47e8-0fcb-7967-adb9-cbae5c6a9062" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_019b47e8-0fcb-7967-adb9-cbae5c6a9062" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsInProcessResearchAndDevelopment_019b47e8-0fcb-71c5-97e4-a34cc0054517" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredTaxAssetsInProcessResearchAndDevelopment"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_019b47e8-0fcb-766d-a9b3-7704d96baf0b" xlink:to="loc_us-gaap_DeferredTaxAssetsInProcessResearchAndDevelopment_019b47e8-0fcb-71c5-97e4-a34cc0054517" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
