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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2025 Workiva-->
<!--r:6e741dc3-3cd8-4d93-b7b9-cd93346199d1,g:0f9c7a5c-2b31-4dcc-9245-2a438b8b296a-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.x4pharma.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="xfor-20241231.xsd#ConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_f2b2836c-eddb-44e8-9121-03752b95092e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_780b62d1-75a0-43cc-8bec-28b070223d17" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_f2b2836c-eddb-44e8-9121-03752b95092e" xlink:to="loc_us-gaap_Liabilities_780b62d1-75a0-43cc-8bec-28b070223d17" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_80a6d7b8-bb5e-4e0b-b1e2-80be0cd71eff" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_f2b2836c-eddb-44e8-9121-03752b95092e" xlink:to="loc_us-gaap_StockholdersEquity_80a6d7b8-bb5e-4e0b-b1e2-80be0cd71eff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_2638b97d-0057-4a88-b768-7f9ba491cf47" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_f2b2836c-eddb-44e8-9121-03752b95092e" xlink:to="loc_us-gaap_CommitmentsAndContingencies_2638b97d-0057-4a88-b768-7f9ba491cf47" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_a49dee67-156e-41ea-b098-feeaf6eee4d1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ce68cdd6-f027-4f9f-9db8-17b20b90830c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_a49dee67-156e-41ea-b098-feeaf6eee4d1" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ce68cdd6-f027-4f9f-9db8-17b20b90830c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_8615e645-e569-412c-b26e-767392bfd1e7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccountsAndOtherReceivablesNetCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_a49dee67-156e-41ea-b098-feeaf6eee4d1" xlink:to="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_8615e645-e569-412c-b26e-767392bfd1e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_dc210e91-f3f2-4fcf-ab75-af8db8858bb8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_MarketableSecurities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_a49dee67-156e-41ea-b098-feeaf6eee4d1" xlink:to="loc_us-gaap_MarketableSecurities_dc210e91-f3f2-4fcf-ab75-af8db8858bb8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_ResearchAndDevelopmentIncentiveReceivable_088f1170-6296-4626-be08-d028b0a525cb" xlink:href="xfor-20241231.xsd#xfor_ResearchAndDevelopmentIncentiveReceivable"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_a49dee67-156e-41ea-b098-feeaf6eee4d1" xlink:to="loc_xfor_ResearchAndDevelopmentIncentiveReceivable_088f1170-6296-4626-be08-d028b0a525cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_7a970919-b716-4ce1-94ef-e731921bea37" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_a49dee67-156e-41ea-b098-feeaf6eee4d1" xlink:to="loc_us-gaap_InventoryNet_7a970919-b716-4ce1-94ef-e731921bea37" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_eb56d824-1617-403d-91e0-926cc5bde01a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_a49dee67-156e-41ea-b098-feeaf6eee4d1" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_eb56d824-1617-403d-91e0-926cc5bde01a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_500f30e5-9f85-4a46-bc36-a23558b65ea8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_a79cdb5f-283b-4cd4-a6f1-7b9c1a951116" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_500f30e5-9f85-4a46-bc36-a23558b65ea8" xlink:to="loc_us-gaap_LiabilitiesCurrent_a79cdb5f-283b-4cd4-a6f1-7b9c1a951116" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_LongTermDebtNonCurrentIncludingAccrection_906e95bd-4378-4379-b86f-f13569799fc2" xlink:href="xfor-20241231.xsd#xfor_LongTermDebtNonCurrentIncludingAccrection"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_500f30e5-9f85-4a46-bc36-a23558b65ea8" xlink:to="loc_xfor_LongTermDebtNonCurrentIncludingAccrection_906e95bd-4378-4379-b86f-f13569799fc2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_f9b802bc-9b05-481b-b447-aac22b60304f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_500f30e5-9f85-4a46-bc36-a23558b65ea8" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_f9b802bc-9b05-481b-b447-aac22b60304f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitiesNoncurrent_e7aa7b33-8556-410b-9f1e-4e5d47e9fb19" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DerivativeLiabilitiesNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_500f30e5-9f85-4a46-bc36-a23558b65ea8" xlink:to="loc_us-gaap_DerivativeLiabilitiesNoncurrent_e7aa7b33-8556-410b-9f1e-4e5d47e9fb19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_7bf61e26-0137-485c-99be-5e7b52615084" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_500f30e5-9f85-4a46-bc36-a23558b65ea8" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_7bf61e26-0137-485c-99be-5e7b52615084" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_cde56ea9-9c5f-476f-bd5f-6ebc96e83771" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_f1c1db46-1f8f-42ec-9382-43ed2d78e4ad" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_cde56ea9-9c5f-476f-bd5f-6ebc96e83771" xlink:to="loc_us-gaap_PreferredStockValue_f1c1db46-1f8f-42ec-9382-43ed2d78e4ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_6b9dcfda-5ff0-4bd1-97bf-41f52f11c503" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_cde56ea9-9c5f-476f-bd5f-6ebc96e83771" xlink:to="loc_us-gaap_CommonStockValue_6b9dcfda-5ff0-4bd1-97bf-41f52f11c503" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_151ad35c-d04c-42c6-8d5c-366f5ffd236f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_cde56ea9-9c5f-476f-bd5f-6ebc96e83771" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_151ad35c-d04c-42c6-8d5c-366f5ffd236f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_2bb2d054-50ec-4b95-9d9d-c54f9043c45e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_cde56ea9-9c5f-476f-bd5f-6ebc96e83771" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_2bb2d054-50ec-4b95-9d9d-c54f9043c45e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_71d15819-1199-4756-a84b-92d10e782c4b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_cde56ea9-9c5f-476f-bd5f-6ebc96e83771" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_71d15819-1199-4756-a84b-92d10e782c4b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_da3626aa-54fb-42ee-b1f1-b21ce2af96b5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_a6ef4da2-0e36-4a49-9f2c-bcfbf6eda6fd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_da3626aa-54fb-42ee-b1f1-b21ce2af96b5" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_a6ef4da2-0e36-4a49-9f2c-bcfbf6eda6fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_d24b6419-7324-4bbc-ad33-0f5ba18bbee9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_da3626aa-54fb-42ee-b1f1-b21ce2af96b5" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_d24b6419-7324-4bbc-ad33-0f5ba18bbee9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_933a7dad-d621-41b3-9989-ac08c314f161" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_da3626aa-54fb-42ee-b1f1-b21ce2af96b5" xlink:to="loc_us-gaap_AccountsPayableCurrent_933a7dad-d621-41b3-9989-ac08c314f161" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_24211176-f815-46fc-ae54-386c5976854f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_f497bdb2-25f4-47df-bad7-83309888ffee" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_24211176-f815-46fc-ae54-386c5976854f" xlink:to="loc_us-gaap_AssetsCurrent_f497bdb2-25f4-47df-bad7-83309888ffee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_09024be0-696e-4386-9a61-5ec1bdaf5d6c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_24211176-f815-46fc-ae54-386c5976854f" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_09024be0-696e-4386-9a61-5ec1bdaf5d6c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_ee440069-6970-4da5-840d-7b26f2807e73" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_24211176-f815-46fc-ae54-386c5976854f" xlink:to="loc_us-gaap_Goodwill_ee440069-6970-4da5-840d-7b26f2807e73" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_2f4a1dd1-b8db-4ff8-8755-0d4a4a64920e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_24211176-f815-46fc-ae54-386c5976854f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_2f4a1dd1-b8db-4ff8-8755-0d4a4a64920e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_1d90010a-7ef8-456c-98f3-6a8ab5f066ac" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_24211176-f815-46fc-ae54-386c5976854f" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_1d90010a-7ef8-456c-98f3-6a8ab5f066ac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_9bc4dafb-d33e-482f-b02c-59a4742008cc" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_24211176-f815-46fc-ae54-386c5976854f" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_9bc4dafb-d33e-482f-b02c-59a4742008cc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/ConsolidatedStatementsofOperationsandComprehensiveLoss" xlink:type="simple" xlink:href="xfor-20241231.xsd#ConsolidatedStatementsofOperationsandComprehensiveLoss"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/ConsolidatedStatementsofOperationsandComprehensiveLoss" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_b2b5f75f-74dd-481b-bed2-1f1c7e20b7a8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f429c46d-a7a0-4b4d-a5cd-a321fedc22ca" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_b2b5f75f-74dd-481b-bed2-1f1c7e20b7a8" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f429c46d-a7a0-4b4d-a5cd-a321fedc22ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_1e75dbff-1ff8-463a-9ecf-6b3e25a72158" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_b2b5f75f-74dd-481b-bed2-1f1c7e20b7a8" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_1e75dbff-1ff8-463a-9ecf-6b3e25a72158" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_cacc3051-865f-4827-a6cd-0042e65a5622" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CostsAndExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfRevenue_7d02838f-88c4-4a1e-82c9-c26a76b972be" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CostOfRevenue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cacc3051-865f-4827-a6cd-0042e65a5622" xlink:to="loc_us-gaap_CostOfRevenue_7d02838f-88c4-4a1e-82c9-c26a76b972be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_0e7e1478-5f33-496d-924d-dce8baaf5337" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cacc3051-865f-4827-a6cd-0042e65a5622" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_0e7e1478-5f33-496d-924d-dce8baaf5337" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_0da53dde-a65d-4b1e-a3f5-aa6f13f83827" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cacc3051-865f-4827-a6cd-0042e65a5622" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_0da53dde-a65d-4b1e-a3f5-aa6f13f83827" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_1986548b-31b9-40c4-96ff-12057a7dba41" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GainLossOnDispositionOfIntangibleAssets"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cacc3051-865f-4827-a6cd-0042e65a5622" xlink:to="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_1986548b-31b9-40c4-96ff-12057a7dba41" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_d1e199eb-b125-424c-b437-02a88551482e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_f73ceda2-3cc3-4c4e-83c9-a599825e7128" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_d1e199eb-b125-424c-b437-02a88551482e" xlink:to="loc_us-gaap_OperatingIncomeLoss_f73ceda2-3cc3-4c4e-83c9-a599825e7128" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_294c8dba-0a8a-4b0b-a24c-e813f48bc0e7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NonoperatingIncomeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_d1e199eb-b125-424c-b437-02a88551482e" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_294c8dba-0a8a-4b0b-a24c-e813f48bc0e7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_81c8b7ed-53a1-4a5e-8d93-56c9b634fc55" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_1ee94c3c-e5c7-439c-af2d-70f6c0e716e0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_81c8b7ed-53a1-4a5e-8d93-56c9b634fc55" xlink:to="loc_us-gaap_NetIncomeLoss_1ee94c3c-e5c7-439c-af2d-70f6c0e716e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_bcced91d-6398-43f0-b548-33395afa325a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_81c8b7ed-53a1-4a5e-8d93-56c9b634fc55" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_bcced91d-6398-43f0-b548-33395afa325a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f7a38d5a-6266-4e7d-9eed-4cbbd6001a6b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_8eab2cfa-09bf-4ae0-b676-dce9d6851deb" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f7a38d5a-6266-4e7d-9eed-4cbbd6001a6b" xlink:to="loc_us-gaap_NetIncomeLoss_8eab2cfa-09bf-4ae0-b676-dce9d6851deb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_TemporaryEquityRepurchaseOfConvertiblePreferredStock_2481cf4a-3dd2-4dec-b0b8-ab2bc5dc10e8" xlink:href="xfor-20241231.xsd#xfor_TemporaryEquityRepurchaseOfConvertiblePreferredStock"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f7a38d5a-6266-4e7d-9eed-4cbbd6001a6b" xlink:to="loc_xfor_TemporaryEquityRepurchaseOfConvertiblePreferredStock_2481cf4a-3dd2-4dec-b0b8-ab2bc5dc10e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_8b3a4e8d-f554-48f8-a5e7-20cd208d0390" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NonoperatingIncomeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_9ac07ea9-0698-4ed7-b67f-c96009c3e9b4" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_8b3a4e8d-f554-48f8-a5e7-20cd208d0390" xlink:to="loc_us-gaap_InvestmentIncomeInterest_9ac07ea9-0698-4ed7-b67f-c96009c3e9b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseNonoperating_c5f5c755-d86f-4522-847f-d8432a2abf2d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InterestExpenseNonoperating"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_8b3a4e8d-f554-48f8-a5e7-20cd208d0390" xlink:to="loc_us-gaap_InterestExpenseNonoperating_c5f5c755-d86f-4522-847f-d8432a2abf2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_91d83ab7-7562-4f3a-804d-beb731cdac00" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DerivativeGainLossOnDerivativeNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_8b3a4e8d-f554-48f8-a5e7-20cd208d0390" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_91d83ab7-7562-4f3a-804d-beb731cdac00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_1214924c-da4f-41f1-8b54-a7397640fdb1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NonoperatingIncomeExpense_8b3a4e8d-f554-48f8-a5e7-20cd208d0390" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_1214924c-da4f-41f1-8b54-a7397640fdb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_a0501d5c-1f0a-423b-ac78-51c696bdcbad" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_e9e2976b-048c-49a4-9011-2039ae2b340a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_a0501d5c-1f0a-423b-ac78-51c696bdcbad" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_e9e2976b-048c-49a4-9011-2039ae2b340a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_c08572e7-1c81-45c7-b5e9-74807c0502f7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CostsAndExpenses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_a0501d5c-1f0a-423b-ac78-51c696bdcbad" xlink:to="loc_us-gaap_CostsAndExpenses_c08572e7-1c81-45c7-b5e9-74807c0502f7" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="xfor-20241231.xsd#ConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/ConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a14b1d43-c2c1-41fb-bd76-7150facb21aa" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_ProceedsFromExerciseOfStockOptionsAndWarrants_bde482f8-7a27-4d58-89fe-0b60f71edaf8" xlink:href="xfor-20241231.xsd#xfor_ProceedsFromExerciseOfStockOptionsAndWarrants"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a14b1d43-c2c1-41fb-bd76-7150facb21aa" xlink:to="loc_xfor_ProceedsFromExerciseOfStockOptionsAndWarrants_bde482f8-7a27-4d58-89fe-0b60f71edaf8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_IssuanceCostsRelatedToSaleOfWarrantsAndFeesPaidForAmendmentsToLoanAndSecurityAgreement_f902583c-4999-4332-a635-2dad6c77acf4" xlink:href="xfor-20241231.xsd#xfor_IssuanceCostsRelatedToSaleOfWarrantsAndFeesPaidForAmendmentsToLoanAndSecurityAgreement"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a14b1d43-c2c1-41fb-bd76-7150facb21aa" xlink:to="loc_xfor_IssuanceCostsRelatedToSaleOfWarrantsAndFeesPaidForAmendmentsToLoanAndSecurityAgreement_f902583c-4999-4332-a635-2dad6c77acf4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_80cb81fc-23ef-4861-9932-b7c19ca0c047" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a14b1d43-c2c1-41fb-bd76-7150facb21aa" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_80cb81fc-23ef-4861-9932-b7c19ca0c047" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt_1e3ad318-fb90-41b0-9a6a-4bab4a70fea2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a14b1d43-c2c1-41fb-bd76-7150facb21aa" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt_1e3ad318-fb90-41b0-9a6a-4bab4a70fea2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_fe93700a-b18e-44ad-8bcb-b0c4bf51872c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a14b1d43-c2c1-41fb-bd76-7150facb21aa" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_fe93700a-b18e-44ad-8bcb-b0c4bf51872c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_ProceedsFromIssuanceOrSaleOfEquityNetOfIssuanceCosts_c6ef87a2-a9eb-44dd-a3bf-57513e351909" xlink:href="xfor-20241231.xsd#xfor_ProceedsFromIssuanceOrSaleOfEquityNetOfIssuanceCosts"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_a14b1d43-c2c1-41fb-bd76-7150facb21aa" xlink:to="loc_xfor_ProceedsFromIssuanceOrSaleOfEquityNetOfIssuanceCosts_c6ef87a2-a9eb-44dd-a3bf-57513e351909" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95a4822f-8abe-419d-abc2-5020be052a3f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireIntangibleAssets_5ac6c307-96f9-40d7-a9f8-197bc7b0a168" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsToAcquireIntangibleAssets"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95a4822f-8abe-419d-abc2-5020be052a3f" xlink:to="loc_us-gaap_PaymentsToAcquireIntangibleAssets_5ac6c307-96f9-40d7-a9f8-197bc7b0a168" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfIntangibleAssets_3d2f8e10-262b-46ac-b826-087bec12a47a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromSaleOfIntangibleAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95a4822f-8abe-419d-abc2-5020be052a3f" xlink:to="loc_us-gaap_ProceedsFromSaleOfIntangibleAssets_3d2f8e10-262b-46ac-b826-087bec12a47a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_70c200aa-62e5-442d-b6d2-a4a703e17bd0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95a4822f-8abe-419d-abc2-5020be052a3f" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_70c200aa-62e5-442d-b6d2-a4a703e17bd0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireMarketableSecurities_b2181c10-228d-49de-b489-36376e0b3a05" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PaymentsToAcquireMarketableSecurities"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95a4822f-8abe-419d-abc2-5020be052a3f" xlink:to="loc_us-gaap_PaymentsToAcquireMarketableSecurities_b2181c10-228d-49de-b489-36376e0b3a05" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_1e8d4cb7-c008-4035-b720-773fea40c6b3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_95a4822f-8abe-419d-abc2-5020be052a3f" xlink:to="loc_us-gaap_ProceedsFromSaleAndMaturityOfMarketableSecurities_1e8d4cb7-c008-4035-b720-773fea40c6b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_d84c2876-0652-480b-8334-dbeb24f0cdda" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_bc577dbd-1836-4954-8cef-466db18aa543" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_d84c2876-0652-480b-8334-dbeb24f0cdda" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_bc577dbd-1836-4954-8cef-466db18aa543" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_026f08e4-afcf-43e9-86c0-b82155039c78" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_d84c2876-0652-480b-8334-dbeb24f0cdda" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_026f08e4-afcf-43e9-86c0-b82155039c78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9eef076c-8fcd-4e41-9d38-22686fda2ace" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_d84c2876-0652-480b-8334-dbeb24f0cdda" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_9eef076c-8fcd-4e41-9d38-22686fda2ace" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_4dbf4ac9-6a77-470d-afd5-d141860bd501" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_d84c2876-0652-480b-8334-dbeb24f0cdda" xlink:to="loc_us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_4dbf4ac9-6a77-470d-afd5-d141860bd501" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_dce80c3c-e1c1-4e2e-88c8-9ce30372363e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_ProfitLoss_dce80c3c-e1c1-4e2e-88c8-9ce30372363e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_1506839f-3878-4cdf-8704-391d3fd107d9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_ShareBasedCompensation_1506839f-3878-4cdf-8704-391d3fd107d9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_b191ed4c-0e04-47f7-9772-b188e3ec10bf" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_b191ed4c-0e04-47f7-9772-b188e3ec10bf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_f227fc62-986e-43c7-95da-350c21879672" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GainLossOnDispositionOfIntangibleAssets"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_f227fc62-986e-43c7-95da-350c21879672" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_NonCashLeaseExpense_edb2a5ff-fde5-439f-8793-12a861ba7688" xlink:href="xfor-20241231.xsd#xfor_NonCashLeaseExpense"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_xfor_NonCashLeaseExpense_edb2a5ff-fde5-439f-8793-12a861ba7688" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_NonCashInterestExpense_f5d8af33-6aef-4328-aef2-0bf07e076aaf" xlink:href="xfor-20241231.xsd#xfor_NonCashInterestExpense"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_xfor_NonCashInterestExpense_f5d8af33-6aef-4328-aef2-0bf07e076aaf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability_1bd26edb-2107-4d80-a2fb-7a476a4d1643" xlink:href="xfor-20241231.xsd#xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability_1bd26edb-2107-4d80-a2fb-7a476a4d1643" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_175bbe01-7874-447c-9874-a4d9e8297c20" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherNoncashIncomeExpense"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_175bbe01-7874-447c-9874-a4d9e8297c20" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_d4d22781-1921-44ae-9831-d365e3b2e5ad" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_d4d22781-1921-44ae-9831-d365e3b2e5ad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_e7590d7b-77d8-4633-b47b-0d4ddd185aa1" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_e7590d7b-77d8-4633-b47b-0d4ddd185aa1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_52aa6829-674a-4dd2-874e-1ba385cf216f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_52aa6829-674a-4dd2-874e-1ba385cf216f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_1cd42f5b-dd4d-43da-a7de-a7a4ea6909b2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_1cd42f5b-dd4d-43da-a7de-a7a4ea6909b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_a7aedfa2-3047-41d7-9825-dc6fafa8fdcd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_a7aedfa2-3047-41d7-9825-dc6fafa8fdcd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_IncreaseDecreaseInLeaseLiabilities_7da7e35b-3e04-435e-85ff-4e62690706a0" xlink:href="xfor-20241231.xsd#xfor_IncreaseDecreaseInLeaseLiabilities"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_b22e587b-0e17-4c15-9007-063700df2c87" xlink:to="loc_xfor_IncreaseDecreaseInLeaseLiabilities_7da7e35b-3e04-435e-85ff-4e62690706a0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/SummaryofSignificantAccountingPoliciesScheduleofCashCashEquivalentsandRestrictedCashDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#SummaryofSignificantAccountingPoliciesScheduleofCashCashEquivalentsandRestrictedCashDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/SummaryofSignificantAccountingPoliciesScheduleofCashCashEquivalentsandRestrictedCashDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_edc530bf-f47d-4708-8dc9-d4d7a486bc27" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashNoncurrent_d93aeeb3-36c2-41b5-8e10-e0e035c48191" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RestrictedCashNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_edc530bf-f47d-4708-8dc9-d4d7a486bc27" xlink:to="loc_us-gaap_RestrictedCashNoncurrent_d93aeeb3-36c2-41b5-8e10-e0e035c48191" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_2903f5eb-93bf-428b-bc7a-e33986c964a7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_edc530bf-f47d-4708-8dc9-d4d7a486bc27" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_2903f5eb-93bf-428b-bc7a-e33986c964a7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashCurrent_39d07e4f-7bb3-4074-8887-675b439ac603" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RestrictedCashCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_edc530bf-f47d-4708-8dc9-d4d7a486bc27" xlink:to="loc_us-gaap_RestrictedCashCurrent_39d07e4f-7bb3-4074-8887-675b439ac603" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/FairValueofFinancialAssetsandLiabilitiesGoodwillRollforwardDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#FairValueofFinancialAssetsandLiabilitiesGoodwillRollforwardDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/FairValueofFinancialAssetsandLiabilitiesGoodwillRollforwardDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_db232ed9-d478-4205-8cc1-dd4f748fac16" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillGross_f76d2419-d199-4660-bca6-5f1be1415f6a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GoodwillGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_db232ed9-d478-4205-8cc1-dd4f748fac16" xlink:to="loc_us-gaap_GoodwillGross_f76d2419-d199-4660-bca6-5f1be1415f6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_d5705ba9-41f1-4a52-973a-54ff555c525e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Goodwill_db232ed9-d478-4205-8cc1-dd4f748fac16" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_d5705ba9-41f1-4a52-973a-54ff555c525e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/InventoryDetails" xlink:type="simple" xlink:href="xfor-20241231.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_InventoryNet_e29d38e8-5cc1-4b46-8576-1c002cb49419" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterialsNetOfReserves_f8e6a315-cc74-47de-9d2f-fa0a401c65d6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryRawMaterialsNetOfReserves"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_e29d38e8-5cc1-4b46-8576-1c002cb49419" xlink:to="loc_us-gaap_InventoryRawMaterialsNetOfReserves_f8e6a315-cc74-47de-9d2f-fa0a401c65d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcessNetOfReserves_e8b85231-3b62-4303-8d79-f35b3bf08b26" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryWorkInProcessNetOfReserves"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_e29d38e8-5cc1-4b46-8576-1c002cb49419" xlink:to="loc_us-gaap_InventoryWorkInProcessNetOfReserves_e8b85231-3b62-4303-8d79-f35b3bf08b26" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_37cdb662-56de-4d5d-9979-ae14e1ffd50d" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_InventoryFinishedGoodsNetOfReserves"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryNet_e29d38e8-5cc1-4b46-8576-1c002cb49419" xlink:to="loc_us-gaap_InventoryFinishedGoodsNetOfReserves_37cdb662-56de-4d5d-9979-ae14e1ffd50d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/PropertyandEquipmentDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#PropertyandEquipmentDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/PropertyandEquipmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_9ee1f9c7-9403-4439-a0fc-fa1f7bfb75e3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_364177a8-8234-4c3e-a3aa-715f1be9f479" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_9ee1f9c7-9403-4439-a0fc-fa1f7bfb75e3" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_364177a8-8234-4c3e-a3aa-715f1be9f479" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_7f3da18f-72bb-40f2-9e00-7a5cb88a7d5e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_9ee1f9c7-9403-4439-a0fc-fa1f7bfb75e3" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_7f3da18f-72bb-40f2-9e00-7a5cb88a7d5e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/IntangibleAssetNetNarrativeDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#IntangibleAssetNetNarrativeDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/IntangibleAssetNetNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_8793e4cc-e9c8-4fd2-aaeb-666fe96742f2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_fefb5ea2-b557-4f53-99f8-b4b4b4b7ea79" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_8793e4cc-e9c8-4fd2-aaeb-666fe96742f2" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_fefb5ea2-b557-4f53-99f8-b4b4b4b7ea79" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_f9ca3174-71d7-4510-a951-be1e0818d911" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_8793e4cc-e9c8-4fd2-aaeb-666fe96742f2" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_f9ca3174-71d7-4510-a951-be1e0818d911" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/IntangibleAssetNetFutureAmortizationDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#IntangibleAssetNetFutureAmortizationDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/IntangibleAssetNetFutureAmortizationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_e8e71280-ab37-4edd-817a-a0dde2c7a9d6" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_823b5950-0104-41da-a355-c4b5eb1b6bb2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_e8e71280-ab37-4edd-817a-a0dde2c7a9d6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_823b5950-0104-41da-a355-c4b5eb1b6bb2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_f17c0c5e-fb46-468f-8173-5a06570f2a8a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_e8e71280-ab37-4edd-817a-a0dde2c7a9d6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_f17c0c5e-fb46-468f-8173-5a06570f2a8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_efa097ea-0494-4190-8989-a3380ce9caf8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_e8e71280-ab37-4edd-817a-a0dde2c7a9d6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_efa097ea-0494-4190-8989-a3380ce9caf8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_83fbc6de-1c5b-4ad2-8ff1-a7b4ac7ca48e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_e8e71280-ab37-4edd-817a-a0dde2c7a9d6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_83fbc6de-1c5b-4ad2-8ff1-a7b4ac7ca48e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour_d704a039-b1c4-403d-90f9-107fade46429" xlink:href="xfor-20241231.xsd#xfor_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_e8e71280-ab37-4edd-817a-a0dde2c7a9d6" xlink:to="loc_xfor_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour_d704a039-b1c4-403d-90f9-107fade46429" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/AccruedExpensesDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#AccruedExpensesDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/AccruedExpensesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_a950d67f-4024-45e5-8843-928297104f71" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_f0e5b816-ed81-4e71-b246-92622c18dee9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_a950d67f-4024-45e5-8843-928297104f71" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_f0e5b816-ed81-4e71-b246-92622c18dee9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_AccruedExternalResearchAndDevelopmentExpenses_1f704d70-e154-4882-973a-d4b748e79786" xlink:href="xfor-20241231.xsd#xfor_AccruedExternalResearchAndDevelopmentExpenses"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_a950d67f-4024-45e5-8843-928297104f71" xlink:to="loc_xfor_AccruedExternalResearchAndDevelopmentExpenses_1f704d70-e154-4882-973a-d4b748e79786" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedRoyaltiesCurrent_2944eb4c-734f-4a1c-96bc-51dac8ea6b83" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedRoyaltiesCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_a950d67f-4024-45e5-8843-928297104f71" xlink:to="loc_us-gaap_AccruedRoyaltiesCurrent_2944eb4c-734f-4a1c-96bc-51dac8ea6b83" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedProfessionalFeesCurrent_85d2eba0-5d2a-40a9-adf6-8b32d769b9d2" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_AccruedProfessionalFeesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_a950d67f-4024-45e5-8843-928297104f71" xlink:to="loc_us-gaap_AccruedProfessionalFeesCurrent_85d2eba0-5d2a-40a9-adf6-8b32d769b9d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAccruedLiabilitiesCurrent_8cbf731f-81df-4781-a489-426de4b31fb5" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccruedLiabilitiesCurrent_a950d67f-4024-45e5-8843-928297104f71" xlink:to="loc_us-gaap_OtherAccruedLiabilitiesCurrent_8cbf731f-81df-4781-a489-426de4b31fb5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LongTermDebtScheduleofLongTermDebtDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#LongTermDebtScheduleofLongTermDebtDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/LongTermDebtScheduleofLongTermDebtDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_xfor_LongTermDebtIncludingAccretion_16d6d96a-bc62-47f7-9f31-b5bf21c5fc3e" xlink:href="xfor-20241231.xsd#xfor_LongTermDebtIncludingAccretion"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_7df5adda-c5a8-4c42-95b5-5bcdbd959ff9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LongTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtIncludingAccretion_16d6d96a-bc62-47f7-9f31-b5bf21c5fc3e" xlink:to="loc_us-gaap_LongTermDebt_7df5adda-c5a8-4c42-95b5-5bcdbd959ff9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_AccretionOnLongTermDebt_70871096-4beb-44c4-a7a0-d5926741e232" xlink:href="xfor-20241231.xsd#xfor_AccretionOnLongTermDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtIncludingAccretion_16d6d96a-bc62-47f7-9f31-b5bf21c5fc3e" xlink:to="loc_xfor_AccretionOnLongTermDebt_70871096-4beb-44c4-a7a0-d5926741e232" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_87d1d083-1beb-4f2a-9b5b-94581467b61f" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtIncludingAccretion_16d6d96a-bc62-47f7-9f31-b5bf21c5fc3e" xlink:to="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_87d1d083-1beb-4f2a-9b5b-94581467b61f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LongTermDebtFuturePrincipalPaymentsDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#LongTermDebtFuturePrincipalPaymentsDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/LongTermDebtFuturePrincipalPaymentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_xfor_LongTermDebtAndEOTPayment_cb2bbe0a-0442-4bae-a9de-f3dac9f02346" xlink:href="xfor-20241231.xsd#xfor_LongTermDebtAndEOTPayment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_262741f2-2559-42d5-b0ed-fa276bc27e1e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtAndEOTPayment_cb2bbe0a-0442-4bae-a9de-f3dac9f02346" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_262741f2-2559-42d5-b0ed-fa276bc27e1e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_8ead24f1-e145-4b55-8315-626fde5b5ae0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtAndEOTPayment_cb2bbe0a-0442-4bae-a9de-f3dac9f02346" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_8ead24f1-e145-4b55-8315-626fde5b5ae0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_579b5369-2e4a-4e0d-992e-9859b06f8471" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_xfor_LongTermDebtAndEOTPayment_cb2bbe0a-0442-4bae-a9de-f3dac9f02346" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_579b5369-2e4a-4e0d-992e-9859b06f8471" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofComponentsofLeaseExpenseDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#LeasesScheduleofComponentsofLeaseExpenseDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/LeasesScheduleofComponentsofLeaseExpenseDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_5d4fb635-75e8-4126-be79-c3b43f35178c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_99d940e1-678b-4b24-b35c-88c12dcab4cf" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_5d4fb635-75e8-4126-be79-c3b43f35178c" xlink:to="loc_us-gaap_OperatingLeaseCost_99d940e1-678b-4b24-b35c-88c12dcab4cf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail" xlink:type="simple" xlink:href="xfor-20241231.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_4fa35292-3b40-4b69-8973-b9af55149cb3" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_4d85fc15-d202-4757-b945-29d435d2b325" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_4fa35292-3b40-4b69-8973-b9af55149cb3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_4d85fc15-d202-4757-b945-29d435d2b325" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_121bde58-dd5c-483d-a367-6ffd2052eb30" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_4fa35292-3b40-4b69-8973-b9af55149cb3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_121bde58-dd5c-483d-a367-6ffd2052eb30" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_dfeec9ee-9618-42ca-82db-00964e637193" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_4fa35292-3b40-4b69-8973-b9af55149cb3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_dfeec9ee-9618-42ca-82db-00964e637193" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_7fdafb98-a948-4782-9b99-3d9131e6f2c8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_4fa35292-3b40-4b69-8973-b9af55149cb3" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_7fdafb98-a948-4782-9b99-3d9131e6f2c8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail_1" xlink:type="simple" xlink:href="xfor-20241231.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_689b966d-8cf0-4831-afd7-390364ce73a7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_99b0ea4a-3d16-41e7-a855-1098fdeba24e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_689b966d-8cf0-4831-afd7-390364ce73a7" xlink:to="loc_us-gaap_OperatingLeaseLiability_99b0ea4a-3d16-41e7-a855-1098fdeba24e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_7514b364-8912-4302-8d16-b56b05156479" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_689b966d-8cf0-4831-afd7-390364ce73a7" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount_7514b364-8912-4302-8d16-b56b05156479" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/IncomeTaxesScheduleofIncomeLossBeforeIncomeTaxesDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#IncomeTaxesScheduleofIncomeLossBeforeIncomeTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/IncomeTaxesScheduleofIncomeLossBeforeIncomeTaxesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6f23e9f9-948d-4578-b9f1-3e8c426de7fd" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_5f90f0df-fc5f-42a3-b17c-d837db51b387" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6f23e9f9-948d-4578-b9f1-3e8c426de7fd" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign_5f90f0df-fc5f-42a3-b17c-d837db51b387" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_b2fd08a6-8bf2-483f-95b0-c0e712d74b70" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6f23e9f9-948d-4578-b9f1-3e8c426de7fd" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic_b2fd08a6-8bf2-483f-95b0-c0e712d74b70" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/IncomeTaxesReconciliationofEffectiveIncomeTaxRateDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#IncomeTaxesReconciliationofEffectiveIncomeTaxRateDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/IncomeTaxesReconciliationofEffectiveIncomeTaxRateDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_a795fbf7-f11b-449d-9b72-791448e5ab25" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_a795fbf7-f11b-449d-9b72-791448e5ab25" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_761ddbbb-42c9-484c-a04f-7e425911922e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_761ddbbb-42c9-484c-a04f-7e425911922e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsResearch_a863c363-50f0-4780-9c72-02d9b9c496d7" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsResearch"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsResearch_a863c363-50f0-4780-9c72-02d9b9c496d7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_EffectiveIncomeTaxRateReconciliationTaxCreditOrphanDrugPercent_27f96d9a-0594-48ff-bcb4-6034bdf01c38" xlink:href="xfor-20241231.xsd#xfor_EffectiveIncomeTaxRateReconciliationTaxCreditOrphanDrugPercent"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:to="loc_xfor_EffectiveIncomeTaxRateReconciliationTaxCreditOrphanDrugPercent_27f96d9a-0594-48ff-bcb4-6034bdf01c38" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_EffectiveIncomeTaxRateReconciliationOtherPermanentDifferences_b0f09c1c-3491-4a0e-9209-eda458d23050" xlink:href="xfor-20241231.xsd#xfor_EffectiveIncomeTaxRateReconciliationOtherPermanentDifferences"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:to="loc_xfor_EffectiveIncomeTaxRateReconciliationOtherPermanentDifferences_b0f09c1c-3491-4a0e-9209-eda458d23050" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_c45e483f-0109-4dfc-8cca-6fe2fe18bbcc" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_c45e483f-0109-4dfc-8cca-6fe2fe18bbcc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_fccee6c6-9069-4e1c-96bf-19bacf61007e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_31bfbf59-7141-4b7e-b6bd-2cbc0f2fe581" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_fccee6c6-9069-4e1c-96bf-19bacf61007e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/IncomeTaxesDeferredIncomeTaxAssetDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#IncomeTaxesDeferredIncomeTaxAssetDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/IncomeTaxesDeferredIncomeTaxAssetDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_492884f5-85fa-4a81-8035-c84f6c2b17c0" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_DeferredTaxLiabilityRightOfUseAsset_5251a5ec-530f-429a-a8f3-a8224e09a5bc" xlink:href="xfor-20241231.xsd#xfor_DeferredTaxLiabilityRightOfUseAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_492884f5-85fa-4a81-8035-c84f6c2b17c0" xlink:to="loc_xfor_DeferredTaxLiabilityRightOfUseAsset_5251a5ec-530f-429a-a8f3-a8224e09a5bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_4025ad14-c9d2-4490-a0b5-11c2e538df1a" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_113918d2-950a-4f27-a39c-183917c4be26" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_4025ad14-c9d2-4490-a0b5-11c2e538df1a" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_113918d2-950a-4f27-a39c-183917c4be26" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_bf4c9f53-2187-4431-8f00-ac0017526b69" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsNet_4025ad14-c9d2-4490-a0b5-11c2e538df1a" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_bf4c9f53-2187-4431-8f00-ac0017526b69" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_ed605a37-e80d-4247-b100-da2580e61367" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_1d994127-af46-41b6-a956-074eb743467b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_ed605a37-e80d-4247-b100-da2580e61367" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_1d994127-af46-41b6-a956-074eb743467b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_fba846ce-506a-46a0-82c7-a529174eac48" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_ed605a37-e80d-4247-b100-da2580e61367" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_fba846ce-506a-46a0-82c7-a529174eac48" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_DeferredTaxAssetLeaseLiability_e62918d9-5b12-4042-b7c3-d6a259e724bb" xlink:href="xfor-20241231.xsd#xfor_DeferredTaxAssetLeaseLiability"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_ed605a37-e80d-4247-b100-da2580e61367" xlink:to="loc_xfor_DeferredTaxAssetLeaseLiability_e62918d9-5b12-4042-b7c3-d6a259e724bb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_xfor_DeferredTaxAssetsTaxDeferredExpenseCapitalizedResearchAndDevelopmentCosts_1521c38b-63d3-463f-bd8e-b2d1afcf5367" xlink:href="xfor-20241231.xsd#xfor_DeferredTaxAssetsTaxDeferredExpenseCapitalizedResearchAndDevelopmentCosts"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_ed605a37-e80d-4247-b100-da2580e61367" xlink:to="loc_xfor_DeferredTaxAssetsTaxDeferredExpenseCapitalizedResearchAndDevelopmentCosts_1521c38b-63d3-463f-bd8e-b2d1afcf5367" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsResearch_eb286666-10fe-4b92-8799-e1bd94c55fd9" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsResearch"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_ed605a37-e80d-4247-b100-da2580e61367" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsResearch_eb286666-10fe-4b92-8799-e1bd94c55fd9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_0720bd80-e94a-47dc-bdda-7b3918917592" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_b3651b8d-31ac-4d3a-a400-b96872ec0c69" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_0720bd80-e94a-47dc-bdda-7b3918917592" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_b3651b8d-31ac-4d3a-a400-b96872ec0c69" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsNet_6612f286-c308-486a-a272-51f2450b0a2b" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_0720bd80-e94a-47dc-bdda-7b3918917592" xlink:to="loc_us-gaap_DeferredTaxAssetsNet_6612f286-c308-486a-a272-51f2450b0a2b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.x4pharma.com/role/SegmentReportingDetails" xlink:type="simple" xlink:href="xfor-20241231.xsd#SegmentReportingDetails"/>
  <link:calculationLink xlink:role="http://www.x4pharma.com/role/SegmentReportingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_7412c7e0-f1ff-47ec-9fc2-b4dc62266655" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_51d0e565-ded3-4a1c-92c8-62d69cdb944e" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_7412c7e0-f1ff-47ec-9fc2-b4dc62266655" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_51d0e565-ded3-4a1c-92c8-62d69cdb944e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_8e280869-716b-4501-9996-c42388b02b43" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_LaborAndRelatedExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_7412c7e0-f1ff-47ec-9fc2-b4dc62266655" xlink:to="loc_us-gaap_LaborAndRelatedExpense_8e280869-716b-4501-9996-c42388b02b43" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_c2218ff6-1bd0-47ff-9523-72b828e1b488" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_7412c7e0-f1ff-47ec-9fc2-b4dc62266655" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_c2218ff6-1bd0-47ff-9523-72b828e1b488" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingOtherItemAmount_998e40dd-f779-47fb-8f35-d957f35cc27c" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_SegmentReportingOtherItemAmount"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_7412c7e0-f1ff-47ec-9fc2-b4dc62266655" xlink:to="loc_us-gaap_SegmentReportingOtherItemAmount_998e40dd-f779-47fb-8f35-d957f35cc27c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_30b2a531-856a-4cba-b9f0-768adbeab1f8" xlink:href="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd#us-gaap_GainLossOnDispositionOfIntangibleAssets"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_7412c7e0-f1ff-47ec-9fc2-b4dc62266655" xlink:to="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_30b2a531-856a-4cba-b9f0-768adbeab1f8" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
