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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019e03f2-cbde-7910-9a83-368de837bef5,g:32dd43c9-f749-4da5-b6e1-5235b9ad1ec3-->
<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-20260630.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_AssetsCurrent_019e03f2-cc9c-7e54-bc4f-b2bc3996a31e" 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_019e03f2-cc9c-7320-b3aa-09d67fc19904" 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_019e03f2-cc9c-7e54-bc4f-b2bc3996a31e" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019e03f2-cc9c-7320-b3aa-09d67fc19904" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_019e03f2-cc9c-705f-9347-cd0e1ac59892" 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_019e03f2-cc9c-7e54-bc4f-b2bc3996a31e" xlink:to="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_019e03f2-cc9c-705f-9347-cd0e1ac59892" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_019e03f2-cc9c-72d5-9407-cc8b76477e68" 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_019e03f2-cc9c-7e54-bc4f-b2bc3996a31e" xlink:to="loc_us-gaap_MarketableSecurities_019e03f2-cc9c-72d5-9407-cc8b76477e68" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryGross_019e03f2-cc9c-75c6-a3dd-48973f5fd96a" 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_019e03f2-cc9c-7e54-bc4f-b2bc3996a31e" xlink:to="loc_us-gaap_InventoryGross_019e03f2-cc9c-75c6-a3dd-48973f5fd96a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019e03f2-cc9c-75c6-983d-bd724e479ecb" 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_019e03f2-cc9c-7e54-bc4f-b2bc3996a31e" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019e03f2-cc9c-75c6-983d-bd724e479ecb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019e03f2-cc9c-7f08-b815-314785637fdc" 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_019e03f2-cc9c-7472-b9dd-a71aa845267c" 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_019e03f2-cc9c-7f08-b815-314785637fdc" xlink:to="loc_us-gaap_AssetsCurrent_019e03f2-cc9c-7472-b9dd-a71aa845267c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019e03f2-cc9c-7a5f-8ec1-559dd99b7146" 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_019e03f2-cc9c-7f08-b815-314785637fdc" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019e03f2-cc9c-7a5f-8ec1-559dd99b7146" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019e03f2-cc9c-7ea7-b820-08c28d6e1134" 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_019e03f2-cc9c-7f08-b815-314785637fdc" xlink:to="loc_us-gaap_Goodwill_019e03f2-cc9c-7ea7-b820-08c28d6e1134" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019e03f2-cc9c-7b66-bdd0-f64723a6f58f" 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_019e03f2-cc9c-7f08-b815-314785637fdc" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019e03f2-cc9c-7b66-bdd0-f64723a6f58f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_019e03f2-cc9c-75aa-97e6-0ad3961d4c07" 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_019e03f2-cc9c-7f08-b815-314785637fdc" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_019e03f2-cc9c-75aa-97e6-0ad3961d4c07" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019e03f2-cc9c-7cfb-8d1a-56cd6f7c94df" 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_019e03f2-cc9c-7f08-b815-314785637fdc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019e03f2-cc9c-7cfb-8d1a-56cd6f7c94df" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e03f2-cc9c-7ac5-a701-a4f297b0767d" 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_019e03f2-cc9c-7ed8-a523-0b2c9ebd7f84" 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_019e03f2-cc9c-7ac5-a701-a4f297b0767d" xlink:to="loc_us-gaap_Liabilities_019e03f2-cc9c-7ed8-a523-0b2c9ebd7f84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_019e03f2-cc9c-7905-a645-0c729fdbac0a" 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_019e03f2-cc9c-7ac5-a701-a4f297b0767d" xlink:to="loc_us-gaap_CommitmentsAndContingencies_019e03f2-cc9c-7905-a645-0c729fdbac0a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019e03f2-cc9c-7476-a80b-9f1d702a1348" 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_019e03f2-cc9c-7ac5-a701-a4f297b0767d" xlink:to="loc_us-gaap_StockholdersEquity_019e03f2-cc9c-7476-a80b-9f1d702a1348" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_019e03f2-cc9c-77e0-8c69-ea17d497cbc0" 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_019e03f2-cc9c-787f-a0e5-f428eadbb10e" 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_019e03f2-cc9c-77e0-8c69-ea17d497cbc0" xlink:to="loc_us-gaap_AccountsPayableCurrent_019e03f2-cc9c-787f-a0e5-f428eadbb10e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019e03f2-cc9c-78b1-979c-6c7d8da231d5" 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_019e03f2-cc9c-77e0-8c69-ea17d497cbc0" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_019e03f2-cc9c-78b1-979c-6c7d8da231d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019e03f2-cc9c-7491-808f-8f8e138b5158" 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_019e03f2-cc9c-77e0-8c69-ea17d497cbc0" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityCurrent_019e03f2-cc9c-7491-808f-8f8e138b5158" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019e03f2-cc9c-7c7d-95dd-d3f69c9120eb" 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_019e03f2-cc9c-77e0-8c69-ea17d497cbc0" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019e03f2-cc9c-7c7d-95dd-d3f69c9120eb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019e03f2-cc9c-7080-a090-f39826525415" 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_019e03f2-cc9c-73af-8c5a-4e20b3f60d91" 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_019e03f2-cc9c-7080-a090-f39826525415" xlink:to="loc_us-gaap_PreferredStockValue_019e03f2-cc9c-73af-8c5a-4e20b3f60d91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_019e03f2-cc9c-7d7b-9043-982fd2cc36e9" 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_019e03f2-cc9c-7080-a090-f39826525415" xlink:to="loc_us-gaap_CommonStockValue_019e03f2-cc9c-7d7b-9043-982fd2cc36e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_019e03f2-cc9c-7ce0-b4fe-5b71fd978cda" 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_019e03f2-cc9c-7080-a090-f39826525415" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_019e03f2-cc9c-7ce0-b4fe-5b71fd978cda" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019e03f2-cc9c-7170-88b2-c56faa429363" 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_019e03f2-cc9c-7080-a090-f39826525415" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019e03f2-cc9c-7170-88b2-c56faa429363" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e03f2-cc9c-7584-8dda-9bfcaa02be65" 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_019e03f2-cc9c-7080-a090-f39826525415" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e03f2-cc9c-7584-8dda-9bfcaa02be65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019e03f2-cc9c-7a6a-b161-93a4a375923b" 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_019e03f2-cc9c-738b-8218-3f9a3f47da19" 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_019e03f2-cc9c-7a6a-b161-93a4a375923b" xlink:to="loc_us-gaap_LiabilitiesCurrent_019e03f2-cc9c-738b-8218-3f9a3f47da19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_LongTermDebtNonCurrentIncludingAccretion_019e03f2-cc9c-7b7d-a01c-794d9e18fe21" xlink:href="xfor-20260630.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_019e03f2-cc9c-7a6a-b161-93a4a375923b" xlink:to="loc_xfor_LongTermDebtNonCurrentIncludingAccretion_019e03f2-cc9c-7b7d-a01c-794d9e18fe21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitiesNoncurrent_019e03f2-cc9c-72a8-b623-5701bfd3d1e0" 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_019e03f2-cc9c-7a6a-b161-93a4a375923b" xlink:to="loc_us-gaap_DerivativeLiabilitiesNoncurrent_019e03f2-cc9c-72a8-b623-5701bfd3d1e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityNoncurrent_019e03f2-cc9c-75a7-807c-b6e46012bf7a" 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_019e03f2-cc9c-7a6a-b161-93a4a375923b" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityNoncurrent_019e03f2-cc9c-75a7-807c-b6e46012bf7a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_019e03f2-cc9c-753e-a51d-b91ec960a7fd" 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_019e03f2-cc9c-7a6a-b161-93a4a375923b" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_019e03f2-cc9c-753e-a51d-b91ec960a7fd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVELOSSINCOME" xlink:type="simple" xlink:href="xfor-20260630.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_NonoperatingIncomeExpense_019e03f2-cc9c-7633-8960-027944b62450" 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_019e03f2-cc9c-7ba4-a7e4-3b870f8970a4" 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_019e03f2-cc9c-7633-8960-027944b62450" xlink:to="loc_us-gaap_InvestmentIncomeInterest_019e03f2-cc9c-7ba4-a7e4-3b870f8970a4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseNonoperating_019e03f2-cc9c-7fb9-98b6-9bf78fedd6e0" 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_019e03f2-cc9c-7633-8960-027944b62450" xlink:to="loc_us-gaap_InterestExpenseNonoperating_019e03f2-cc9c-7fb9-98b6-9bf78fedd6e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019e03f2-cc9c-7f18-8979-14f1a162d747" 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_019e03f2-cc9c-7633-8960-027944b62450" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019e03f2-cc9c-7f18-8979-14f1a162d747" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019e03f2-cc9c-739f-ae2f-d093764962f1" 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_019e03f2-cc9c-7633-8960-027944b62450" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019e03f2-cc9c-739f-ae2f-d093764962f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_OperatingIncomeExpenses_019e03f2-cc9c-7470-98a1-2bd560429b00" xlink:href="xfor-20260630.xsd#xfor_OperatingIncomeExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfRevenue_019e03f2-cc9c-7204-9eb2-4fec7b2099e9" 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_019e03f2-cc9c-7470-98a1-2bd560429b00" xlink:to="loc_us-gaap_CostOfRevenue_019e03f2-cc9c-7204-9eb2-4fec7b2099e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_019e03f2-cc9c-7498-91a7-eea7cc14a3de" 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_019e03f2-cc9c-7470-98a1-2bd560429b00" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_019e03f2-cc9c-7498-91a7-eea7cc14a3de" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_019e03f2-cc9c-7f8e-8670-27e64a06af57" 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_019e03f2-cc9c-7470-98a1-2bd560429b00" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_019e03f2-cc9c-7f8e-8670-27e64a06af57" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019e03f2-cc9c-7104-9647-500544db7fc8" 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_019e03f2-cc9c-7362-b101-afb55fc5c27b" 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_019e03f2-cc9c-7104-9647-500544db7fc8" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e03f2-cc9c-7362-b101-afb55fc5c27b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_OperatingIncomeExpenses_019e03f2-cc9c-7bb7-8c4f-0f337955c987" xlink:href="xfor-20260630.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_019e03f2-cc9c-7104-9647-500544db7fc8" xlink:to="loc_xfor_OperatingIncomeExpenses_019e03f2-cc9c-7bb7-8c4f-0f337955c987" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e03f2-cc9c-762f-ad72-b51955ad2c3f" 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_019e03f2-cc9c-7d43-93c3-1735754d0e60" 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_019e03f2-cc9c-762f-ad72-b51955ad2c3f" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019e03f2-cc9c-7d43-93c3-1735754d0e60" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e03f2-cc9c-7f7c-9868-8ed69799d01e" 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_019e03f2-cc9c-762f-ad72-b51955ad2c3f" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e03f2-cc9c-7f7c-9868-8ed69799d01e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e03f2-cc9c-7438-bfd9-5b47d1147bcc" 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_019e03f2-cc9c-7dec-9512-7ebc826ac236" 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_019e03f2-cc9c-7438-bfd9-5b47d1147bcc" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_019e03f2-cc9c-7dec-9512-7ebc826ac236" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019e03f2-cc9c-7445-83a5-c6023b2523f9" 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_019e03f2-cc9c-7438-bfd9-5b47d1147bcc" xlink:to="loc_us-gaap_OperatingIncomeLoss_019e03f2-cc9c-7445-83a5-c6023b2523f9" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cc9c-7c33-817e-8946bd6758ec" 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_019e03f2-cc9c-7df8-b915-b0ad77c18590" 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_019e03f2-cc9c-7c33-817e-8946bd6758ec" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e03f2-cc9c-7df8-b915-b0ad77c18590" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e03f2-cc9c-797b-82b4-a3569f83be83" 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_019e03f2-cc9c-7c33-817e-8946bd6758ec" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e03f2-cc9c-797b-82b4-a3569f83be83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e03f2-cc9c-7b9d-a50b-b19481d3cebf" 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_019e03f2-cc9c-7c33-817e-8946bd6758ec" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e03f2-cc9c-7b9d-a50b-b19481d3cebf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019e03f2-cc9c-70f5-b195-45626b1e4464" 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_019e03f2-cc9c-7c33-817e-8946bd6758ec" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019e03f2-cc9c-70f5-b195-45626b1e4464" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e03f2-cc9c-7cd7-98f3-da772b08be5a" 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_019e03f2-cc9c-724d-87d0-a19113338696" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_NetIncomeLoss_019e03f2-cc9c-724d-87d0-a19113338696" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_019e03f2-cc9c-7617-8512-014078f7c753" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_ShareBasedCompensation_019e03f2-cc9c-7617-8512-014078f7c753" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019e03f2-cc9c-7ca9-aeae-1ba8a546e343" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019e03f2-cc9c-7ca9-aeae-1ba8a546e343" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_NonCashLeaseExpense_019e03f2-cc9c-7a05-ab04-d50ae8eac6f7" xlink:href="xfor-20260630.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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_xfor_NonCashLeaseExpense_019e03f2-cc9c-7a05-ab04-d50ae8eac6f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_NonCashInterestExpense_019e03f2-cc9c-7a32-9992-4822eccd12ff" xlink:href="xfor-20260630.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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_xfor_NonCashInterestExpense_019e03f2-cc9c-7a32-9992-4822eccd12ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability_019e03f2-cc9c-7e0a-84c6-5426c20e57f5" xlink:href="xfor-20260630.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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability_019e03f2-cc9c-7e0a-84c6-5426c20e57f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_019e03f2-cc9c-75de-9980-6f5c489281c8" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_019e03f2-cc9c-75de-9980-6f5c489281c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019e03f2-cc9c-7b86-8033-282f0990ee00" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_019e03f2-cc9c-7b86-8033-282f0990ee00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_019e03f2-cc9c-7c2b-a003-98a71fd7a67c" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_019e03f2-cc9c-7c2b-a003-98a71fd7a67c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019e03f2-cc9c-7c3b-917a-17378f3bc85b" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_019e03f2-cc9c-7c3b-917a-17378f3bc85b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019e03f2-cc9c-7e8c-8e23-d4753eb7a794" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_019e03f2-cc9c-7e8c-8e23-d4753eb7a794" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019e03f2-cc9c-7bc0-8c5e-39ee3dc720c8" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_019e03f2-cc9c-7bc0-8c5e-39ee3dc720c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019e03f2-cc9c-7754-bce1-f3871bf9a8d8" 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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_019e03f2-cc9c-7754-bce1-f3871bf9a8d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_IncreaseDecreaseInLeaseLiabilities_019e03f2-cc9c-7e50-bf8e-6db15085d7e5" xlink:href="xfor-20260630.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_019e03f2-cc9c-7cd7-98f3-da772b08be5a" xlink:to="loc_xfor_IncreaseDecreaseInLeaseLiabilities_019e03f2-cc9c-7e50-bf8e-6db15085d7e5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e03f2-cc9c-795e-891e-fb97e858fe03" 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_019e03f2-cc9c-75b6-a7b6-5950afbf01b0" 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_019e03f2-cc9c-795e-891e-fb97e858fe03" xlink:to="loc_us-gaap_ProceedsFromStockPlans_019e03f2-cc9c-75b6-a7b6-5950afbf01b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_019f9eff-797d-78d0-b7c9-534501d9ad2f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e03f2-cc9c-795e-891e-fb97e858fe03" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_019f9eff-797d-78d0-b7c9-534501d9ad2f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_019e03f2-cc9c-7a40-b22c-5885b2d00322" 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_019e03f2-cc9c-78f8-87f0-ed2ef9d912ab" 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_019e03f2-cc9c-7a40-b22c-5885b2d00322" xlink:to="loc_us-gaap_AssetAcquisitionConsiderationTransferredOtherAssets_019e03f2-cc9c-78f8-87f0-ed2ef9d912ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireMarketableSecurities_019e03f2-cc9c-7394-813b-a71b2a9cb8a7" 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_019e03f2-cc9c-7a40-b22c-5885b2d00322" xlink:to="loc_us-gaap_PaymentsToAcquireMarketableSecurities_019e03f2-cc9c-7394-813b-a71b2a9cb8a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_019e03f2-cc9c-7f9f-860b-40505fbe7773" 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_019e03f2-cc9c-7a40-b22c-5885b2d00322" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_019e03f2-cc9c-7f9f-860b-40505fbe7773" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofReconciliationofCashCashEquivalentsandRestrictedCashDetail" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cc9c-7935-87ca-d32b0cd974ad" 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_019e03f2-cc9c-7f38-89d0-20c42fcab8a1" 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_019e03f2-cc9c-7935-87ca-d32b0cd974ad" xlink:to="loc_us-gaap_RestrictedCashCurrent_019e03f2-cc9c-7f38-89d0-20c42fcab8a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019e03f2-cc9c-7127-b66e-87dada75ea16" 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_019e03f2-cc9c-7935-87ca-d32b0cd974ad" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019e03f2-cc9c-7127-b66e-87dada75ea16" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_019f9f2c-bc7f-73cc-8698-b0fa8a0dd5cd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019e03f2-cc9c-7935-87ca-d32b0cd974ad" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_019f9f2c-bc7f-73cc-8698-b0fa8a0dd5cd" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/InventoryDetails" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cd59-72d5-b485-648d38e7001e" 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_019e03f2-cd59-7cd3-8f17-c66977ce69da" 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_019e03f2-cd59-72d5-b485-648d38e7001e" xlink:to="loc_us-gaap_InventoryRawMaterials_019e03f2-cd59-7cd3-8f17-c66977ce69da" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoods_019e03f2-cd59-718e-a0c0-08e04f50117b" 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_019e03f2-cd59-72d5-b485-648d38e7001e" xlink:to="loc_us-gaap_InventoryFinishedGoods_019e03f2-cd59-718e-a0c0-08e04f50117b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcess_019e03f2-cd59-72f6-98ea-59df04689785" 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_019e03f2-cd59-72d5-b485-648d38e7001e" xlink:to="loc_us-gaap_InventoryWorkInProcess_019e03f2-cd59-72f6-98ea-59df04689785" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/PropertyandEquipmentNetScheduleofPropertyandEquipmentNetDetail" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cd59-70b1-9cc8-fdc0fb62e465" 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_019e03f2-cd59-7d15-a832-e9398f00e38c" 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_019e03f2-cd59-70b1-9cc8-fdc0fb62e465" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_019e03f2-cd59-7d15-a832-e9398f00e38c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_019e03f2-cd59-7a6d-be6f-1db847540485" 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_019e03f2-cd59-70b1-9cc8-fdc0fb62e465" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_019e03f2-cd59-7a6d-be6f-1db847540485" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/IntangibleAssetNetDetails" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cd59-732c-b9f5-1d51356b0d96" 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_019e03f2-cd59-7341-b098-99543bfdd109" 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_019e03f2-cd59-732c-b9f5-1d51356b0d96" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear_019e03f2-cd59-7341-b098-99543bfdd109" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019e03f2-cd59-7b16-8cc9-9bd7c4122a25" 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_019e03f2-cd59-732c-b9f5-1d51356b0d96" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_019e03f2-cd59-7b16-8cc9-9bd7c4122a25" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019e03f2-cd59-7222-8526-682f644ccefe" 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_019e03f2-cd59-732c-b9f5-1d51356b0d96" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_019e03f2-cd59-7222-8526-682f644ccefe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019e03f2-cd59-77cf-8a82-bdfff030e4de" 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_019e03f2-cd59-732c-b9f5-1d51356b0d96" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_019e03f2-cd59-77cf-8a82-bdfff030e4de" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019e03f2-cd59-76bf-adfd-71f77e0e69ef" 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_019e03f2-cd59-732c-b9f5-1d51356b0d96" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_019e03f2-cd59-76bf-adfd-71f77e0e69ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019e03f2-cd59-7c68-80f1-7ff454230632" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019e03f2-cd59-732c-b9f5-1d51356b0d96" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_019e03f2-cd59-7c68-80f1-7ff454230632" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019fcd2f-16cb-7d6e-880a-21a72bf7f926" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_019e03f2-cd59-732c-b9f5-1d51356b0d96" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_019fcd2f-16cb-7d6e-880a-21a72bf7f926" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/AccruedExpensesScheduleofAccruedExpensesDetail" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cd59-76a0-9b6a-ca751547a68f" 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_019e03f2-cd59-7efb-9e57-6e404b38b99e" 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_019e03f2-cd59-76a0-9b6a-ca751547a68f" xlink:to="loc_us-gaap_AccruedRoyaltiesCurrentAndNoncurrent_019e03f2-cd59-7efb-9e57-6e404b38b99e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019e03f2-cd59-7073-be64-e74ef811e16b" 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_019e03f2-cd59-76a0-9b6a-ca751547a68f" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_019e03f2-cd59-7073-be64-e74ef811e16b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedProfessionalFeesCurrent_019e03f2-cd59-74b7-ba26-42b1a396df5f" 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_019e03f2-cd59-76a0-9b6a-ca751547a68f" xlink:to="loc_us-gaap_AccruedProfessionalFeesCurrent_019e03f2-cd59-74b7-ba26-42b1a396df5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019e03f2-cd59-7d45-8aa6-c1c082aec7dc" 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_019e03f2-cd59-76a0-9b6a-ca751547a68f" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_019e03f2-cd59-7d45-8aa6-c1c082aec7dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_AccruedExternalResearchAndDevelopmentExpenses_019e03f2-cd59-7dfb-8394-32d222b3c74d" xlink:href="xfor-20260630.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_019e03f2-cd59-76a0-9b6a-ca751547a68f" xlink:to="loc_xfor_AccruedExternalResearchAndDevelopmentExpenses_019e03f2-cd59-7dfb-8394-32d222b3c74d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LongTermDebtSummaryofLongTermDebtDetail" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cd59-7c28-97d4-f3279d0a6e4f" xlink:href="xfor-20260630.xsd#xfor_LongTermDebtIncludingAccretion"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_019e03f2-cd59-7d8d-b2bc-018b7aa488af" 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_019e03f2-cd59-7c28-97d4-f3279d0a6e4f" xlink:to="loc_us-gaap_LongTermDebt_019e03f2-cd59-7d8d-b2bc-018b7aa488af" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_AccretionOnLongTermDebt_019e03f2-cd59-7d0f-9b3c-0e2c2e562743" xlink:href="xfor-20260630.xsd#xfor_AccretionOnLongTermDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtIncludingAccretion_019e03f2-cd59-7c28-97d4-f3279d0a6e4f" xlink:to="loc_xfor_AccretionOnLongTermDebt_019e03f2-cd59-7d0f-9b3c-0e2c2e562743" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_019e03f2-cd59-77b9-b3f6-aed23450ab69" 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_019e03f2-cd59-7c28-97d4-f3279d0a6e4f" xlink:to="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_019e03f2-cd59-77b9-b3f6-aed23450ab69" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofComponentsofLeaseExpenseDetail" xlink:type="simple" xlink:href="xfor-20260630.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_019e03f2-cd59-7ef2-8d27-976ff5528ccf" 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_019e03f2-cd59-7d93-a511-89608c7be645" 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_019e03f2-cd59-7ef2-8d27-976ff5528ccf" xlink:to="loc_us-gaap_OperatingLeaseCost_019e03f2-cd59-7d93-a511-89608c7be645" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail" xlink:type="simple" xlink:href="xfor-20260630.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_019fcd31-874f-71f3-a754-44a05d649f14" 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_019fcd31-874f-76ce-9360-2846430ef246" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019fcd31-874f-71f3-a754-44a05d649f14" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_019fcd31-874f-76ce-9360-2846430ef246" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_019fcd31-874f-705b-bb51-8b7d41b293b9" 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="https://xbrl.org/2023/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_019fcd31-874f-71f3-a754-44a05d649f14" xlink:to="loc_us-gaap_OperatingLeaseLiability_019fcd31-874f-705b-bb51-8b7d41b293b9" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
