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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019d07a8-80fc-7f58-9e85-f1b776fe8f94,g:1cdbd4cd-1c2b-4308-80b5-4be702faac23-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="https://xbrl.org/2023/arcrole/summation-item" xlink:type="simple" xlink:href="https://www.xbrl.org/2023/calculation-1.1.xsd#summation-item"/>
  <link:roleRef roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="xfor-20260331.xsd#CONDENSEDCONSOLIDATEDBALANCESHEETS"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019d07a8-8239-7b6c-8c4e-e8114a6af840" 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_LiabilitiesCurrent_019d07a8-8239-73f9-8e13-a40f595ff124" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019d07a8-8239-7b6c-8c4e-e8114a6af840" xlink:to="loc_us-gaap_LiabilitiesCurrent_019d07a8-8239-73f9-8e13-a40f595ff124" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_LongTermDebtNonCurrentIncludingAccretion_019d07a8-8239-771c-8197-2ba1a5c6927f" xlink:href="xfor-20260331.xsd#xfor_LongTermDebtNonCurrentIncludingAccretion"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019d07a8-8239-7b6c-8c4e-e8114a6af840" xlink:to="loc_xfor_LongTermDebtNonCurrentIncludingAccretion_019d07a8-8239-771c-8197-2ba1a5c6927f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitiesNoncurrent_019d07a8-8239-7109-81af-2b6976a55a61" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeLiabilitiesNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019d07a8-8239-7b6c-8c4e-e8114a6af840" xlink:to="loc_us-gaap_DerivativeLiabilitiesNoncurrent_019d07a8-8239-7109-81af-2b6976a55a61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityNoncurrent_019d07a8-8239-7f57-8bfa-146ad9419b31" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ContractWithCustomerLiabilityNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019d07a8-8239-7b6c-8c4e-e8114a6af840" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityNoncurrent_019d07a8-8239-7f57-8bfa-146ad9419b31" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_019d07a8-8239-7911-8ee1-8b6c444e46a4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019d07a8-8239-7b6c-8c4e-e8114a6af840" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_019d07a8-8239-7911-8ee1-8b6c444e46a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019d07a8-8239-75c2-a32d-f198ec99a67b" 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_019d07a8-8239-713a-ae32-43d6c99f6d0e" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019d07a8-8239-75c2-a32d-f198ec99a67b" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019d07a8-8239-713a-ae32-43d6c99f6d0e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_019d07a8-8239-7aaf-9447-db65078f0f6e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccountsAndOtherReceivablesNetCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019d07a8-8239-75c2-a32d-f198ec99a67b" xlink:to="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_019d07a8-8239-7aaf-9447-db65078f0f6e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_019d07a8-8239-73ce-b597-d7684e17fa3d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_MarketableSecurities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019d07a8-8239-75c2-a32d-f198ec99a67b" xlink:to="loc_us-gaap_MarketableSecurities_019d07a8-8239-73ce-b597-d7684e17fa3d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryGross_019d07a8-8239-7aa2-9fd9-926752996c14" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InventoryGross"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019d07a8-8239-75c2-a32d-f198ec99a67b" xlink:to="loc_us-gaap_InventoryGross_019d07a8-8239-7aa2-9fd9-926752996c14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019d07a8-8239-7a3f-853f-c4a775d21103" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_019d07a8-8239-75c2-a32d-f198ec99a67b" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019d07a8-8239-7a3f-853f-c4a775d21103" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019d07a8-8239-730c-9734-f8a0502c59a1" 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_019d07a8-8239-7019-81f7-507b0990d175" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019d07a8-8239-730c-9734-f8a0502c59a1" xlink:to="loc_us-gaap_Liabilities_019d07a8-8239-7019-81f7-507b0990d175" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_019d07a8-8239-7624-b254-607366001aba" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019d07a8-8239-730c-9734-f8a0502c59a1" xlink:to="loc_us-gaap_CommitmentsAndContingencies_019d07a8-8239-7624-b254-607366001aba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019d07a8-8239-78ea-9f2b-0cfe9877599f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019d07a8-8239-730c-9734-f8a0502c59a1" xlink:to="loc_us-gaap_StockholdersEquity_019d07a8-8239-78ea-9f2b-0cfe9877599f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_019d07a8-8239-749c-b743-f6032a842647" 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_019d07a8-8239-7495-a454-d1f1a74d3d65" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019d07a8-8239-749c-b743-f6032a842647" xlink:to="loc_us-gaap_AccountsPayableCurrent_019d07a8-8239-7495-a454-d1f1a74d3d65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-8239-76c9-92b2-edab089b30f9" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019d07a8-8239-749c-b743-f6032a842647" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-8239-76c9-92b2-edab089b30f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019d07a8-8239-71db-8b35-da2845f1d9aa" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ContractWithCustomerLiabilityCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019d07a8-8239-749c-b743-f6032a842647" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019d07a8-8239-71db-8b35-da2845f1d9aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019d07a8-8239-78b3-8291-514d8ca43623" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_019d07a8-8239-749c-b743-f6032a842647" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019d07a8-8239-78b3-8291-514d8ca43623" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019d07a8-8239-743b-bfcf-4c8cc37c5ad3" 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_019d07a8-8239-7696-91b8-2a100b5f4b0c" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019d07a8-8239-743b-bfcf-4c8cc37c5ad3" xlink:to="loc_us-gaap_PreferredStockValue_019d07a8-8239-7696-91b8-2a100b5f4b0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_019d07a8-8239-7f6e-805c-48c31f79a1e1" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019d07a8-8239-743b-bfcf-4c8cc37c5ad3" xlink:to="loc_us-gaap_CommonStockValue_019d07a8-8239-7f6e-805c-48c31f79a1e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_019d07a8-8239-7a3b-8509-595d8e0349f8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019d07a8-8239-743b-bfcf-4c8cc37c5ad3" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_019d07a8-8239-7a3b-8509-595d8e0349f8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019d07a8-8239-7377-8fe2-05160f653568" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019d07a8-8239-743b-bfcf-4c8cc37c5ad3" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019d07a8-8239-7377-8fe2-05160f653568" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019d07a8-8239-74c8-866e-72a62159fd4a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019d07a8-8239-743b-bfcf-4c8cc37c5ad3" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019d07a8-8239-74c8-866e-72a62159fd4a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019d07a8-8239-70a5-8983-54359bd839a3" 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_019d07a8-8239-7e83-b9e2-dc895c76954b" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019d07a8-8239-70a5-8983-54359bd839a3" xlink:to="loc_us-gaap_AssetsCurrent_019d07a8-8239-7e83-b9e2-dc895c76954b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019d07a8-8239-72f8-a0cc-531f2beec191" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019d07a8-8239-70a5-8983-54359bd839a3" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019d07a8-8239-72f8-a0cc-531f2beec191" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019d07a8-8239-7748-9142-6d4164139684" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019d07a8-8239-70a5-8983-54359bd839a3" xlink:to="loc_us-gaap_Goodwill_019d07a8-8239-7748-9142-6d4164139684" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019d07a8-8239-7c5a-8dde-8b5130a5324b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019d07a8-8239-70a5-8983-54359bd839a3" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019d07a8-8239-7c5a-8dde-8b5130a5324b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_019d07a8-8239-76ab-8c5a-c23fe28bc2b5" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019d07a8-8239-70a5-8983-54359bd839a3" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_019d07a8-8239-76ab-8c5a-c23fe28bc2b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-8239-70b5-a2e6-76fcaa17a844" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019d07a8-8239-70a5-8983-54359bd839a3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-8239-70b5-a2e6-76fcaa17a844" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVELOSSINCOME" xlink:type="simple" xlink:href="xfor-20260331.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVELOSSINCOME"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVELOSSINCOME" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019d07a8-8239-7728-81e3-9bbbba2636cd" 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_RevenueFromContractWithCustomerExcludingAssessedTax_019d07a8-8239-7b42-83a7-05578dbf6d67" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019d07a8-8239-7728-81e3-9bbbba2636cd" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019d07a8-8239-7b42-83a7-05578dbf6d67" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_OperatingIncomeExpenses_019d07a8-8239-7b6f-84fd-1b0c8528ef8a" xlink:href="xfor-20260331.xsd#xfor_OperatingIncomeExpenses"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_019d07a8-8239-7728-81e3-9bbbba2636cd" xlink:to="loc_xfor_OperatingIncomeExpenses_019d07a8-8239-7b6f-84fd-1b0c8528ef8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_OperatingIncomeExpenses_019d07a8-8239-7ddb-b144-1716d1d3753c" xlink:href="xfor-20260331.xsd#xfor_OperatingIncomeExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfRevenue_019d07a8-8239-71ed-bbb5-494124fd8291" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CostOfRevenue"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_xfor_OperatingIncomeExpenses_019d07a8-8239-7ddb-b144-1716d1d3753c" xlink:to="loc_us-gaap_CostOfRevenue_019d07a8-8239-71ed-bbb5-494124fd8291" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019d07a8-8239-77a2-afb6-f2f62862ad73" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_xfor_OperatingIncomeExpenses_019d07a8-8239-7ddb-b144-1716d1d3753c" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_019d07a8-8239-77a2-afb6-f2f62862ad73" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_019d07a8-8239-7c5e-9839-c1e374c7cbd6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_xfor_OperatingIncomeExpenses_019d07a8-8239-7ddb-b144-1716d1d3753c" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_019d07a8-8239-7c5e-9839-c1e374c7cbd6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_019d07a8-8239-7a23-b14b-ee00528876f4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_019d07a8-8239-78dd-81ea-16aa4f307145" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_019d07a8-8239-7a23-b14b-ee00528876f4" xlink:to="loc_us-gaap_InvestmentIncomeInterest_019d07a8-8239-78dd-81ea-16aa4f307145" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseNonoperating_019d07a8-8239-71d2-9450-e948ed1847a1" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_019d07a8-8239-7a23-b14b-ee00528876f4" xlink:to="loc_us-gaap_InterestExpenseNonoperating_019d07a8-8239-71d2-9450-e948ed1847a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019d07a8-8239-7abd-a856-d0e1622f6ce1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeGainLossOnDerivativeNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_019d07a8-8239-7a23-b14b-ee00528876f4" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019d07a8-8239-7abd-a856-d0e1622f6ce1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019d07a8-8239-72ae-a372-669338fe9643" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_019d07a8-8239-7a23-b14b-ee00528876f4" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019d07a8-8239-72ae-a372-669338fe9643" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019d07a8-8239-725a-8cb7-50ea88d47fb8" 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_IncomeTaxExpenseBenefit_019d07a8-8239-7cf1-8743-30c1d64ad7ff" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019d07a8-8239-725a-8cb7-50ea88d47fb8" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019d07a8-8239-7cf1-8743-30c1d64ad7ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019d07a8-8239-7194-b85e-41810bfaf7bc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019d07a8-8239-725a-8cb7-50ea88d47fb8" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019d07a8-8239-7194-b85e-41810bfaf7bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019d07a8-8239-755c-8137-f68fe7bb4cd9" 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_NonoperatingIncomeExpense_019d07a8-8239-7949-a83c-18128b13e6a6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NonoperatingIncomeExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019d07a8-8239-755c-8137-f68fe7bb4cd9" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_019d07a8-8239-7949-a83c-18128b13e6a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019d07a8-8239-7e8d-b721-91ff4f86c1cd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019d07a8-8239-755c-8137-f68fe7bb4cd9" xlink:to="loc_us-gaap_OperatingIncomeLoss_019d07a8-8239-7e8d-b721-91ff4f86c1cd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="xfor-20260331.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019d07a8-8239-7842-8e64-aa0dd7bdeb59" 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_019d07a8-8239-76c6-8c0d-06640b22189d" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019d07a8-8239-7842-8e64-aa0dd7bdeb59" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76c6-8c0d-06640b22189d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019d07a8-8239-789d-8c3c-a455317d840c" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019d07a8-8239-7842-8e64-aa0dd7bdeb59" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019d07a8-8239-789d-8c3c-a455317d840c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019d07a8-8239-72cd-ad44-09227c442a1e" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019d07a8-8239-7842-8e64-aa0dd7bdeb59" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019d07a8-8239-72cd-ad44-09227c442a1e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019d07a8-8239-7e4f-940a-8d25cccf1818" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019d07a8-8239-7842-8e64-aa0dd7bdeb59" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019d07a8-8239-7e4f-940a-8d25cccf1818" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" 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_019d07a8-8239-71e4-acdf-ebbfe8e71026" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_NetIncomeLoss_019d07a8-8239-71e4-acdf-ebbfe8e71026" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_019d07a8-8239-7e4f-a66b-e111f9598512" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_ShareBasedCompensation_019d07a8-8239-7e4f-a66b-e111f9598512" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019d07a8-8239-705d-9ec8-bf933ba97af6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019d07a8-8239-705d-9ec8-bf933ba97af6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_NonCashLeaseExpense_019d07a8-8239-7d3f-8c18-e45ddc92f07c" xlink:href="xfor-20260331.xsd#xfor_NonCashLeaseExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_xfor_NonCashLeaseExpense_019d07a8-8239-7d3f-8c18-e45ddc92f07c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_NonCashInterestExpense_019d07a8-8239-7eb0-8c31-194e27a1daca" xlink:href="xfor-20260331.xsd#xfor_NonCashInterestExpense"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_xfor_NonCashInterestExpense_019d07a8-8239-7eb0-8c31-194e27a1daca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability_019d07a8-8239-7f85-b748-2e6f8e4025d5" xlink:href="xfor-20260331.xsd#xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability_019d07a8-8239-7f85-b748-2e6f8e4025d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_019d07a8-8239-711a-bea3-60703ca4b2b3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherNoncashIncomeExpense"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_019d07a8-8239-711a-bea3-60703ca4b2b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019d07a8-8239-769f-a963-40bf6fed1f8a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019d07a8-8239-769f-a963-40bf6fed1f8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_019d07a8-8239-776c-a3c4-af2d53048119" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_019d07a8-8239-776c-a3c4-af2d53048119" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019d07a8-8239-779a-a686-5f9b32b6a7fe" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019d07a8-8239-779a-a686-5f9b32b6a7fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019d07a8-8239-7d9e-b504-4962ba7c3c95" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019d07a8-8239-7d9e-b504-4962ba7c3c95" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019d07a8-8239-757d-97ce-33748f863736" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019d07a8-8239-757d-97ce-33748f863736" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019d07a8-8239-7659-80cd-436fed52892f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019d07a8-8239-7659-80cd-436fed52892f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_IncreaseDecreaseInLeaseLiabilities_019d07a8-8239-777f-ba0e-c14c30837c0a" xlink:href="xfor-20260331.xsd#xfor_IncreaseDecreaseInLeaseLiabilities"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019d07a8-8239-76a6-bc73-676e30077ec1" xlink:to="loc_xfor_IncreaseDecreaseInLeaseLiabilities_019d07a8-8239-777f-ba0e-c14c30837c0a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019d07a8-8239-7eaf-b09e-9413bfe1f950" 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_us-gaap_AssetAcquisitionConsiderationTransferredOtherAssets_019d07a8-8239-7d9d-9522-f64a7428e99b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AssetAcquisitionConsiderationTransferredOtherAssets"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019d07a8-8239-7eaf-b09e-9413bfe1f950" xlink:to="loc_us-gaap_AssetAcquisitionConsiderationTransferredOtherAssets_019d07a8-8239-7d9d-9522-f64a7428e99b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireMarketableSecurities_019d07a8-8239-7a2f-83df-421fa490c055" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PaymentsToAcquireMarketableSecurities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019d07a8-8239-7eaf-b09e-9413bfe1f950" xlink:to="loc_us-gaap_PaymentsToAcquireMarketableSecurities_019d07a8-8239-7a2f-83df-421fa490c055" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_019d07a8-8239-77b0-9ef3-6fd43b42a9ac" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019d07a8-8239-7eaf-b09e-9413bfe1f950" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_019d07a8-8239-77b0-9ef3-6fd43b42a9ac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019d07a8-8239-7650-8694-3828d72745b1" 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_us-gaap_ProceedsFromStockPlans_019d07a8-8239-7efb-b1e5-c1a7cef23f87" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProceedsFromStockPlans"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019d07a8-8239-7650-8694-3828d72745b1" xlink:to="loc_us-gaap_ProceedsFromStockPlans_019d07a8-8239-7efb-b1e5-c1a7cef23f87" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofReconciliationofCashCashEquivalentsandRestrictedCashDetail" xlink:type="simple" xlink:href="xfor-20260331.xsd#DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofReconciliationofCashCashEquivalentsandRestrictedCashDetail"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofReconciliationofCashCashEquivalentsandRestrictedCashDetail" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019d07a8-8239-7fe6-aec6-183f878cc0c6" 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_RestrictedCashCurrent_019d07a8-8239-7279-a4c0-44de68d62d5c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestrictedCashCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019d07a8-8239-7fe6-aec6-183f878cc0c6" xlink:to="loc_us-gaap_RestrictedCashCurrent_019d07a8-8239-7279-a4c0-44de68d62d5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019d07a8-8239-766b-8cfe-316632562135" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019d07a8-8239-7fe6-aec6-183f878cc0c6" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019d07a8-8239-766b-8cfe-316632562135" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/InventoryDetails" xlink:type="simple" xlink:href="xfor-20260331.xsd#InventoryDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/InventoryDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryGross_019d07a8-823a-7231-96d2-9b3edf70c95a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InventoryGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterials_019d07a8-823a-7b1d-9624-7ab9133bc667" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InventoryRawMaterials"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryGross_019d07a8-823a-7231-96d2-9b3edf70c95a" xlink:to="loc_us-gaap_InventoryRawMaterials_019d07a8-823a-7b1d-9624-7ab9133bc667" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoods_019d07a8-823a-7d87-932c-2047dbe8984b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InventoryFinishedGoods"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryGross_019d07a8-823a-7231-96d2-9b3edf70c95a" xlink:to="loc_us-gaap_InventoryFinishedGoods_019d07a8-823a-7d87-932c-2047dbe8984b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcess_019d07a8-823a-7d3e-9e64-654c74b59b28" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InventoryWorkInProcess"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryGross_019d07a8-823a-7231-96d2-9b3edf70c95a" xlink:to="loc_us-gaap_InventoryWorkInProcess_019d07a8-823a-7d3e-9e64-654c74b59b28" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/PropertyandEquipmentNetScheduleofPropertyandEquipmentNetDetail" xlink:type="simple" xlink:href="xfor-20260331.xsd#PropertyandEquipmentNetScheduleofPropertyandEquipmentNetDetail"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/PropertyandEquipmentNetScheduleofPropertyandEquipmentNetDetail" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019d07a8-82d7-7cdb-bf40-9904b73c7e79" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_019d07a8-82d7-774d-bcd6-0fe1d6a56f96" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_019d07a8-82d7-7cdb-bf40-9904b73c7e79" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_019d07a8-82d7-774d-bcd6-0fe1d6a56f96" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_019d07a8-82d7-7ea5-8b1f-aba01f94cd82" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_019d07a8-82d7-7cdb-bf40-9904b73c7e79" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_019d07a8-82d7-7ea5-8b1f-aba01f94cd82" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/IntangibleAssetNetDetails" xlink:type="simple" xlink:href="xfor-20260331.xsd#IntangibleAssetNetDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/IntangibleAssetNetDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-823a-7e08-980a-d3d8d7a5a3f3" 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_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019d07a8-823a-7407-b0b2-38462013cbba" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-823a-7e08-980a-d3d8d7a5a3f3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019d07a8-823a-7407-b0b2-38462013cbba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019d07a8-823a-7a34-80dd-d137a8f72a42" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-823a-7e08-980a-d3d8d7a5a3f3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019d07a8-823a-7a34-80dd-d137a8f72a42" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019d07a8-823a-7717-8522-8fe08332bca0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-823a-7e08-980a-d3d8d7a5a3f3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019d07a8-823a-7717-8522-8fe08332bca0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019d07a8-823a-7ea2-90c8-85325e868ebd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-823a-7e08-980a-d3d8d7a5a3f3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019d07a8-823a-7ea2-90c8-85325e868ebd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019ddb75-d9f1-73c1-bf39-f2428745f567" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-823a-7e08-980a-d3d8d7a5a3f3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019ddb75-d9f1-73c1-bf39-f2428745f567" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour_019d07a8-823a-7245-b016-0cda5de06d70" xlink:href="xfor-20260331.xsd#xfor_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019d07a8-823a-7e08-980a-d3d8d7a5a3f3" xlink:to="loc_xfor_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour_019d07a8-823a-7245-b016-0cda5de06d70" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/AccruedExpensesScheduleofAccruedExpensesDetail" xlink:type="simple" xlink:href="xfor-20260331.xsd#AccruedExpensesScheduleofAccruedExpensesDetail"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/AccruedExpensesScheduleofAccruedExpensesDetail" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-823a-7632-b044-8502c217dea4" 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_AccruedRoyaltiesCurrentAndNoncurrent_019d07a8-823a-778d-8bc6-7dc65bc826e5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedRoyaltiesCurrentAndNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-823a-7632-b044-8502c217dea4" xlink:to="loc_us-gaap_AccruedRoyaltiesCurrentAndNoncurrent_019d07a8-823a-778d-8bc6-7dc65bc826e5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019d07a8-823a-7236-be83-9068823ba7e4" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-823a-7632-b044-8502c217dea4" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019d07a8-823a-7236-be83-9068823ba7e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedProfessionalFeesCurrent_019d07a8-823a-7b09-9509-b9168ee135fe" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedProfessionalFeesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-823a-7632-b044-8502c217dea4" xlink:to="loc_us-gaap_AccruedProfessionalFeesCurrent_019d07a8-823a-7b09-9509-b9168ee135fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019d07a8-823a-7eda-a585-a8adbb9e6ac6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-823a-7632-b044-8502c217dea4" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019d07a8-823a-7eda-a585-a8adbb9e6ac6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_AccruedExternalResearchAndDevelopmentExpenses_019d07a8-823a-7121-b34c-b164ea8a0dcf" xlink:href="xfor-20260331.xsd#xfor_AccruedExternalResearchAndDevelopmentExpenses"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_019d07a8-823a-7632-b044-8502c217dea4" xlink:to="loc_xfor_AccruedExternalResearchAndDevelopmentExpenses_019d07a8-823a-7121-b34c-b164ea8a0dcf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LongTermDebtSummaryofLongTermDebtDetail" xlink:type="simple" xlink:href="xfor-20260331.xsd#LongTermDebtSummaryofLongTermDebtDetail"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/LongTermDebtSummaryofLongTermDebtDetail" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_xfor_LongTermDebtIncludingAccretion_019d07a8-823a-76d0-893d-496e4ee57ec5" xlink:href="xfor-20260331.xsd#xfor_LongTermDebtIncludingAccretion"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_019d07a8-823a-70f8-8d6c-ba7bdb118007" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtIncludingAccretion_019d07a8-823a-76d0-893d-496e4ee57ec5" xlink:to="loc_us-gaap_LongTermDebt_019d07a8-823a-70f8-8d6c-ba7bdb118007" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_AccretionOnLongTermDebt_019d07a8-823a-761b-9e5e-8de716584548" xlink:href="xfor-20260331.xsd#xfor_AccretionOnLongTermDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtIncludingAccretion_019d07a8-823a-76d0-893d-496e4ee57ec5" xlink:to="loc_xfor_AccretionOnLongTermDebt_019d07a8-823a-761b-9e5e-8de716584548" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_019d07a8-823a-7771-bea0-fe0ae7cb845b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtIncludingAccretion_019d07a8-823a-76d0-893d-496e4ee57ec5" xlink:to="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_019d07a8-823a-7771-bea0-fe0ae7cb845b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofComponentsofLeaseExpenseDetail" xlink:type="simple" xlink:href="xfor-20260331.xsd#LeasesScheduleofComponentsofLeaseExpenseDetail"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/LeasesScheduleofComponentsofLeaseExpenseDetail" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_019d07a8-823a-71c5-95c9-9263f9c36839" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_019d07a8-823a-77d0-a835-e62b053c80e3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_019d07a8-823a-71c5-95c9-9263f9c36839" xlink:to="loc_us-gaap_OperatingLeaseCost_019d07a8-823a-77d0-a835-e62b053c80e3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail" xlink:type="simple" xlink:href="xfor-20260331.xsd#LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019d07a8-823a-7be7-b5be-dd9e78eb5204" 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_OperatingLeaseLiability_019d07a8-823a-79cf-bb75-395c1269a76c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019d07a8-823a-7be7-b5be-dd9e78eb5204" xlink:to="loc_us-gaap_OperatingLeaseLiability_019d07a8-823a-79cf-bb75-395c1269a76c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_019d07a8-823a-76fe-a9f3-ee3e827fff86" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019d07a8-823a-7be7-b5be-dd9e78eb5204" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_019d07a8-823a-76fe-a9f3-ee3e827fff86" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail_1" xlink:type="simple" xlink:href="xfor-20260331.xsd#LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail_1"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019d07a8-823a-79fb-af2b-23b944b926b0" 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_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_019d07a8-823a-76ac-af34-bd68dafe98e2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019d07a8-823a-79fb-af2b-23b944b926b0" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear_019d07a8-823a-76ac-af34-bd68dafe98e2" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
