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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2023 Workiva-->
<!--r:f13e2399-57d1-43ee-9f6c-34f1f6b98aed,g:62b0add9-2baa-4849-b08d-88b40f0b0344-->
<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.fanniemae.com/role/CondensedConsolidatedBalanceSheetsUnaudited" xlink:type="simple" xlink:href="fnm-20230630.xsd#CondensedConsolidatedBalanceSheetsUnaudited"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/CondensedConsolidatedBalanceSheetsUnaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_82ae8a47-ce64-4eff-8a3e-f63521627416" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndCapitalLeaseObligations_63094bf0-0f91-4fed-bb56-ca810803a811" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtAndCapitalLeaseObligations"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_82ae8a47-ce64-4eff-8a3e-f63521627416" xlink:to="loc_us-gaap_DebtAndCapitalLeaseObligations_63094bf0-0f91-4fed-bb56-ca810803a811" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_09c80b6a-93fa-4ec0-a5e5-591036f7a7d6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_82ae8a47-ce64-4eff-8a3e-f63521627416" xlink:to="loc_us-gaap_OtherLiabilities_09c80b6a-93fa-4ec0-a5e5-591036f7a7d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_04f0d10a-d292-45fc-b391-8283870f23b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestPayableCurrentAndNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_82ae8a47-ce64-4eff-8a3e-f63521627416" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_04f0d10a-d292-45fc-b391-8283870f23b5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_641f2614-c936-4922-b554-07c29edc7e87" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_SeniorPreferredStockValue_3a91e496-e856-4289-afea-7cb7aec3fc6a" xlink:href="fnm-20230630.xsd#fnm_SeniorPreferredStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_641f2614-c936-4922-b554-07c29edc7e87" xlink:to="loc_fnm_SeniorPreferredStockValue_3a91e496-e856-4289-afea-7cb7aec3fc6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_8034b297-0df8-45d3-a896-99317710534d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_641f2614-c936-4922-b554-07c29edc7e87" xlink:to="loc_us-gaap_PreferredStockValue_8034b297-0df8-45d3-a896-99317710534d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_099a9ddc-24b4-4e42-929a-7e3eee79578d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_641f2614-c936-4922-b554-07c29edc7e87" xlink:to="loc_us-gaap_CommonStockValue_099a9ddc-24b4-4e42-929a-7e3eee79578d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_67235b9b-a9af-4109-b1b0-09fc1469063e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_641f2614-c936-4922-b554-07c29edc7e87" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_67235b9b-a9af-4109-b1b0-09fc1469063e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_84a6281b-0c37-4e6b-b3bc-24b56dc17285" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_641f2614-c936-4922-b554-07c29edc7e87" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_84a6281b-0c37-4e6b-b3bc-24b56dc17285" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_039db407-50b1-43c5-a287-bb09057d0b3b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockValue"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_641f2614-c936-4922-b554-07c29edc7e87" xlink:to="loc_us-gaap_TreasuryStockValue_039db407-50b1-43c5-a287-bb09057d0b3b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_10efbc70-47a9-41af-9859-0bb2c8e12883" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_10efbc70-47a9-41af-9859-0bb2c8e12883" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalents_f0abb440-c821-4b6c-b4c4-5b1ee2d98c6b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedCashAndCashEquivalents"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalents_f0abb440-c821-4b6c-b4c4-5b1ee2d98c6b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_7b454a10-61c7-4764-b7ae-f33a78c56b7e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_MarketableSecurities_7b454a10-61c7-4764-b7ae-f33a78c56b7e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_1fd9c215-c3b8-49bb-9cd5-01bd7f74c75e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_1fd9c215-c3b8-49bb-9cd5-01bd7f74c75e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_AdvanceToLender_ecc6bf3d-2ea0-4161-9eae-dc0a80c4dace" xlink:href="fnm-20230630.xsd#fnm_AdvanceToLender"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_fnm_AdvanceToLender_ecc6bf3d-2ea0-4161-9eae-dc0a80c4dace" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLoss_b9ab791f-40ef-41b7-a520-c82843b761d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLoss_b9ab791f-40ef-41b7-a520-c82843b761d9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_e9c9fad1-d5e1-4b15-9652-5bebba396aa0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_e9c9fad1-d5e1-4b15-9652-5bebba396aa0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_ff912527-2734-477c-ba63-73cd9c2b731d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_OtherAssets_ff912527-2734-477c-ba63-73cd9c2b731d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResell_fe21ca8b-df13-44ca-890d-551228749685" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResell"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_6d891986-35d6-419c-8143-1d353e4d538f" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResell_fe21ca8b-df13-44ca-890d-551228749685" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_4a531064-e318-4f56-98d9-b4cc03c5b12d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_6915b347-d3fd-4fda-8d5e-553ed24f707f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_4a531064-e318-4f56-98d9-b4cc03c5b12d" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_6915b347-d3fd-4fda-8d5e-553ed24f707f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_6fe49803-8ccc-4ca7-9a49-57a6831f16f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_4a531064-e318-4f56-98d9-b4cc03c5b12d" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_6fe49803-8ccc-4ca7-9a49-57a6831f16f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_2141ee7c-32b3-4f38-9ede-370398fffbdc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansReceivableHeldForSaleAmount_77be775f-c13b-4cda-9b0b-da6879fe08c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LoansReceivableHeldForSaleAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_2141ee7c-32b3-4f38-9ede-370398fffbdc" xlink:to="loc_us-gaap_LoansReceivableHeldForSaleAmount_77be775f-c13b-4cda-9b0b-da6879fe08c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_44562eb4-4252-446f-84dd-d2575e0d7c0a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_2141ee7c-32b3-4f38-9ede-370398fffbdc" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_44562eb4-4252-446f-84dd-d2575e0d7c0a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_221c5f3d-0482-4942-9d68-542b78ce33f1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_25b2d9be-4929-40db-9f95-060fef7fc806" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_221c5f3d-0482-4942-9d68-542b78ce33f1" xlink:to="loc_us-gaap_Liabilities_25b2d9be-4929-40db-9f95-060fef7fc806" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_07d67260-c4d5-492a-80d5-4efa76992070" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_221c5f3d-0482-4942-9d68-542b78ce33f1" xlink:to="loc_us-gaap_CommitmentsAndContingencies_07d67260-c4d5-492a-80d5-4efa76992070" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_b872cf05-dabd-4b76-aab6-1d7d8e25fe4f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_221c5f3d-0482-4942-9d68-542b78ce33f1" xlink:to="loc_us-gaap_StockholdersEquity_b872cf05-dabd-4b76-aab6-1d7d8e25fe4f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/CondensedConsolidatedStatementsofOperationsandComprehensiveIncomeUnaudited" xlink:type="simple" xlink:href="fnm-20230630.xsd#CondensedConsolidatedStatementsofOperationsandComprehensiveIncomeUnaudited"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/CondensedConsolidatedStatementsofOperationsandComprehensiveIncomeUnaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_bdeb2942-7e13-4461-9d31-cc51b80f9a46" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_6a9d1df6-745b-4c67-ad02-1f534cf20c7f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_NetIncomeLossAvailableToCommonStockholdersDiluted_bdeb2942-7e13-4461-9d31-cc51b80f9a46" xlink:to="loc_us-gaap_NetIncomeLoss_6a9d1df6-745b-4c67-ad02-1f534cf20c7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendsAndOtherAdjustments_6f7f9ed4-e6d3-4759-858e-0d4a171e1ff4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockDividendsAndOtherAdjustments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_bdeb2942-7e13-4461-9d31-cc51b80f9a46" xlink:to="loc_us-gaap_PreferredStockDividendsAndOtherAdjustments_6f7f9ed4-e6d3-4759-858e-0d4a171e1ff4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_dccc5113-fb9f-48e2-9d1f-ab77b656f590" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestIncome"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_b096396e-4ac7-4704-b74b-2b2fc8900df3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnInvestments"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_dccc5113-fb9f-48e2-9d1f-ab77b656f590" xlink:to="loc_us-gaap_GainLossOnInvestments_b096396e-4ac7-4704-b74b-2b2fc8900df3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_ad0fffe8-d9ca-43e4-98fd-9f45d5711936" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueOptionChangesInFairValueGainLoss1"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_dccc5113-fb9f-48e2-9d1f-ab77b656f590" xlink:to="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_ad0fffe8-d9ca-43e4-98fd-9f45d5711936" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_5026a3f2-5fca-495b-9d74-7e43e6415634" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestIncomeOtherOperatingIncome"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_dccc5113-fb9f-48e2-9d1f-ab77b656f590" xlink:to="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_5026a3f2-5fca-495b-9d74-7e43e6415634" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_d2164972-7e31-4b20-8c6d-1a44f9a0bc98" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndDividendIncomeOperating"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeDebtSecuritiesOperating_0d756461-b6da-412d-9151-bcbd9aac5b84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeDebtSecuritiesOperating"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_d2164972-7e31-4b20-8c6d-1a44f9a0bc98" xlink:to="loc_us-gaap_InterestIncomeDebtSecuritiesOperating_0d756461-b6da-412d-9151-bcbd9aac5b84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_da8e8b54-db95-4e17-8939-2ddefef9f27b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndFeeIncomeLoansAndLeases"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_d2164972-7e31-4b20-8c6d-1a44f9a0bc98" xlink:to="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_da8e8b54-db95-4e17-8939-2ddefef9f27b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInterestAndDividendIncome_240f649d-a6ba-4cf5-81d5-49d0126b05ae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherInterestAndDividendIncome"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_d2164972-7e31-4b20-8c6d-1a44f9a0bc98" xlink:to="loc_us-gaap_OtherInterestAndDividendIncome_240f649d-a6ba-4cf5-81d5-49d0126b05ae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_c2421bf8-0b3f-4043-8cae-8e0312400fbd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfessionalAndContractServicesExpense_1ad042b2-47a2-42fc-b608-f8b0a6e8dbd5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProfessionalAndContractServicesExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GeneralAndAdministrativeExpense_c2421bf8-0b3f-4043-8cae-8e0312400fbd" xlink:to="loc_us-gaap_ProfessionalAndContractServicesExpense_1ad042b2-47a2-42fc-b608-f8b0a6e8dbd5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_b849d848-7f80-4c04-a43e-e402eec2d89e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_GeneralAndAdministrativeExpense_c2421bf8-0b3f-4043-8cae-8e0312400fbd" xlink:to="loc_us-gaap_LaborAndRelatedExpense_b849d848-7f80-4c04-a43e-e402eec2d89e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherGeneralAndAdministrativeExpense_ac68ea38-de7f-4dee-8165-b5769958d530" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GeneralAndAdministrativeExpense_c2421bf8-0b3f-4043-8cae-8e0312400fbd" xlink:to="loc_us-gaap_OtherGeneralAndAdministrativeExpense_ac68ea38-de7f-4dee-8165-b5769958d530" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_9fd52b7c-a11b-4d27-b0c7-354b32bd3ea6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_0219fbac-2787-49d5-b8be-90662cf6400e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_9fd52b7c-a11b-4d27-b0c7-354b32bd3ea6" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_0219fbac-2787-49d5-b8be-90662cf6400e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_3ce5570c-cd44-47ef-ad80-33b19da03ac6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_9fd52b7c-a11b-4d27-b0c7-354b32bd3ea6" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_3ce5570c-cd44-47ef-ad80-33b19da03ac6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_ce626228-2477-47f4-8497-4bb9dd56e6c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseLongTermDebt_def7803d-0c79-42ac-91f4-affe3b912de6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseLongTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_ce626228-2477-47f4-8497-4bb9dd56e6c7" xlink:to="loc_us-gaap_InterestExpenseLongTermDebt_def7803d-0c79-42ac-91f4-affe3b912de6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseShortTermBorrowings_113d2440-2f98-4c35-bb30-662f1fff9df2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseShortTermBorrowings"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_ce626228-2477-47f4-8497-4bb9dd56e6c7" xlink:to="loc_us-gaap_InterestExpenseShortTermBorrowings_113d2440-2f98-4c35-bb30-662f1fff9df2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_61e4a856-4c91-42da-b79a-366c6d85d928" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_f10e50db-68e4-435c-82c6-529e1498c22d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndDividendIncomeOperating"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNet_61e4a856-4c91-42da-b79a-366c6d85d928" xlink:to="loc_us-gaap_InterestAndDividendIncomeOperating_f10e50db-68e4-435c-82c6-529e1498c22d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_10352955-a565-40a0-aa07-258e9f2be459" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNet_61e4a856-4c91-42da-b79a-366c6d85d928" xlink:to="loc_us-gaap_InterestExpense_10352955-a565-40a0-aa07-258e9f2be459" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_6f2cea3d-e9f9-4cef-8236-8f94c0970619" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_b27c6dce-c2b5-44b9-848d-a9514562fe91" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_6f2cea3d-e9f9-4cef-8236-8f94c0970619" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_b27c6dce-c2b5-44b9-848d-a9514562fe91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_018127de-849e-4ae5-8347-12b9d875b2fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_6f2cea3d-e9f9-4cef-8236-8f94c0970619" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_018127de-849e-4ae5-8347-12b9d875b2fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_7924e615-5078-4c68-8c3d-4c94ab385fcb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_b572aba7-743f-4829-a957-2c9682877474" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_7924e615-5078-4c68-8c3d-4c94ab385fcb" xlink:to="loc_us-gaap_NetIncomeLoss_b572aba7-743f-4829-a957-2c9682877474" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_14b5b03a-4016-4701-84d5-15069a1e6e89" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_7924e615-5078-4c68-8c3d-4c94ab385fcb" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_14b5b03a-4016-4701-84d5-15069a1e6e89" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_be4ba589-f4be-420a-be89-fb2a5c29d6e5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_6c101a07-6e3f-407a-ac69-5eaf69e3b273" xlink:href="fnm-20230630.xsd#fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_be4ba589-f4be-420a-be89-fb2a5c29d6e5" xlink:to="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_6c101a07-6e3f-407a-ac69-5eaf69e3b273" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoninterestExpense_cd266fd4-0cdb-4f08-96a1-2fce0cdbc310" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNoninterestExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_be4ba589-f4be-420a-be89-fb2a5c29d6e5" xlink:to="loc_us-gaap_OtherNoninterestExpense_cd266fd4-0cdb-4f08-96a1-2fce0cdbc310" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_ebbf6feb-61aa-4a16-886b-114b583f1ed9" xlink:href="fnm-20230630.xsd#fnm_ChangeInExpectedCreditEnhancementRecoveries"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_be4ba589-f4be-420a-be89-fb2a5c29d6e5" xlink:to="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_ebbf6feb-61aa-4a16-886b-114b583f1ed9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_CreditEnhancementExpense_2c7be1eb-b425-47d1-8e3c-05d2c02de321" xlink:href="fnm-20230630.xsd#fnm_CreditEnhancementExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_be4ba589-f4be-420a-be89-fb2a5c29d6e5" xlink:to="loc_fnm_CreditEnhancementExpense_2c7be1eb-b425-47d1-8e3c-05d2c02de321" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_31de786e-098a-4cb4-acbb-4d0d80dfe63c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_be4ba589-f4be-420a-be89-fb2a5c29d6e5" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_31de786e-098a-4cb4-acbb-4d0d80dfe63c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_56b098f2-4ff0-40dd-a770-6ebc203e0a61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_0de2290b-1a12-44e4-964e-ab7b319304a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_56b098f2-4ff0-40dd-a770-6ebc203e0a61" xlink:to="loc_us-gaap_NetIncomeLoss_0de2290b-1a12-44e4-964e-ab7b319304a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendsAndOtherAdjustments_97079db5-3cb0-48eb-b122-5c3a36df7371" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockDividendsAndOtherAdjustments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_56b098f2-4ff0-40dd-a770-6ebc203e0a61" xlink:to="loc_us-gaap_PreferredStockDividendsAndOtherAdjustments_97079db5-3cb0-48eb-b122-5c3a36df7371" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/CondensedConsolidatedStatementsofCashFlowsUnaudited" xlink:type="simple" xlink:href="fnm-20230630.xsd#CondensedConsolidatedStatementsofCashFlowsUnaudited"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/CondensedConsolidatedStatementsofCashFlowsUnaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_8f5bcf22-06a0-4cfb-8cae-ca2101d9be3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_175a9c8d-571b-4ec4-a15d-a9c26775463d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_8f5bcf22-06a0-4cfb-8cae-ca2101d9be3f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_175a9c8d-571b-4ec4-a15d-a9c26775463d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_bce16a5b-ca58-42df-921f-2f9d7ffeb01a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_8f5bcf22-06a0-4cfb-8cae-ca2101d9be3f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_bce16a5b-ca58-42df-921f-2f9d7ffeb01a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_77b9d1e6-900b-4d0b-8b5a-1ca8524b75b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_8f5bcf22-06a0-4cfb-8cae-ca2101d9be3f" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_77b9d1e6-900b-4d0b-8b5a-1ca8524b75b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_fe1110eb-9cec-4848-a98d-e27d453a9ec9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfDebt_f2f344d6-8c46-4e89-8d34-da83a05f98f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_fe1110eb-9cec-4848-a98d-e27d453a9ec9" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfDebt_f2f344d6-8c46-4e89-8d34-da83a05f98f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfDebt_8b452aac-86ad-4ae4-bd67-aed70ece225a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_fe1110eb-9cec-4848-a98d-e27d453a9ec9" xlink:to="loc_us-gaap_RepaymentsOfDebt_8b452aac-86ad-4ae4-bd67-aed70ece225a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromPaymentsForOtherFinancingActivities_e23db596-20c6-4750-8847-ac75315c629f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromPaymentsForOtherFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_fe1110eb-9cec-4848-a98d-e27d453a9ec9" xlink:to="loc_us-gaap_ProceedsFromPaymentsForOtherFinancingActivities_e23db596-20c6-4750-8847-ac75315c629f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ProceedsFromSaleAndPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_2bcc4853-df10-442e-b841-f5b7698e8d2c" xlink:href="fnm-20230630.xsd#fnm_ProceedsFromSaleAndPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:to="loc_fnm_ProceedsFromSaleAndPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_2bcc4853-df10-442e-b841-f5b7698e8d2c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_PaymentsForAdvancesToLenders_09db9a33-27e7-44d0-a89b-958bf80d1662" xlink:href="fnm-20230630.xsd#fnm_PaymentsForAdvancesToLenders"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:to="loc_fnm_PaymentsForAdvancesToLenders_09db9a33-27e7-44d0-a89b-958bf80d1662" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfLoansAndLeasesHeldForInvestment_77d66271-812b-46fb-9ad4-c7b47d25a647" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleOfLoansAndLeasesHeldForInvestment"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:to="loc_us-gaap_ProceedsFromSaleOfLoansAndLeasesHeldForInvestment_77d66271-812b-46fb-9ad4-c7b47d25a647" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromPaymentsForFederalFundsSoldAndSecuritiesPurchasedUnderAgreementsToResellNet_359b6a5d-cb3d-4e4f-acda-fcd6e53a0569" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromPaymentsForFederalFundsSoldAndSecuritiesPurchasedUnderAgreementsToResellNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:to="loc_us-gaap_ProceedsFromPaymentsForFederalFundsSoldAndSecuritiesPurchasedUnderAgreementsToResellNet_359b6a5d-cb3d-4e4f-acda-fcd6e53a0569" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_1df859ea-976d-46c1-8455-28e96781c162" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireLoansHeldForInvestment"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:to="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_1df859ea-976d-46c1-8455-28e96781c162" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_2d1a0e2a-6c01-453d-a6aa-eb7bd4aa49a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleOfForeclosedAssets"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:to="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_2d1a0e2a-6c01-453d-a6aa-eb7bd4aa49a5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_8446520f-f06e-4d3b-b6af-4925065a0578" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForProceedsFromOtherInvestingActivities"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_9744a226-8a15-44ba-bfdf-5bb4c238a01f" xlink:to="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_8446520f-f06e-4d3b-b6af-4925065a0578" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/CondensedConsolidatedStatementsofChangesinEquityUnaudited" xlink:type="simple" xlink:href="fnm-20230630.xsd#CondensedConsolidatedStatementsofChangesinEquityUnaudited"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/CondensedConsolidatedStatementsofChangesinEquityUnaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_c9c29a95-6690-4531-a162-0bfb9665ed17" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_088ad91d-872b-41a5-898f-beeaad10ac4e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_c9c29a95-6690-4531-a162-0bfb9665ed17" xlink:to="loc_us-gaap_NetIncomeLoss_088ad91d-872b-41a5-898f-beeaad10ac4e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeOtherNetOfTax_7346da04-6073-4db3-9e28-b758d8efe55b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeOtherNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_c9c29a95-6690-4531-a162-0bfb9665ed17" xlink:to="loc_us-gaap_OtherComprehensiveIncomeOtherNetOfTax_7346da04-6073-4db3-9e28-b758d8efe55b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_0267f0fa-fb31-40c0-b1d8-bc72c0fe88ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_c9c29a95-6690-4531-a162-0bfb9665ed17" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_0267f0fa-fb31-40c0-b1d8-bc72c0fe88ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_0629ff01-4b04-4b31-93ed-705d49bede79" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_c9c29a95-6690-4531-a162-0bfb9665ed17" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_0629ff01-4b04-4b31-93ed-705d49bede79" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/ConsolidationsandTransfersofFinancialAssetsUnconsolidatedVIEsDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#ConsolidationsandTransfersofFinancialAssetsUnconsolidatedVIEsDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/ConsolidationsandTransfersofFinancialAssetsUnconsolidatedVIEsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsNet_fde42220-9655-4464-bd9d-7c8766738162" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_19bd0c77-5bff-47b7-99d8-fe6f492ec95b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilities"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsNet_fde42220-9655-4464-bd9d-7c8766738162" xlink:to="loc_us-gaap_OtherLiabilities_19bd0c77-5bff-47b7-99d8-fe6f492ec95b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_1e09f696-ae3d-4b3a-b61d-eb61ba86880d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsNet_fde42220-9655-4464-bd9d-7c8766738162" xlink:to="loc_us-gaap_OtherAssets_1e09f696-ae3d-4b3a-b61d-eb61ba86880d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_942aca15-d322-45dd-a07e-ea0c99a5c4db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_AssetsNet_fde42220-9655-4464-bd9d-7c8766738162" xlink:to="loc_us-gaap_MarketableSecurities_942aca15-d322-45dd-a07e-ea0c99a5c4db" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/MortgageLoansLoansinMortgagePortfolioDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#MortgageLoansLoansinMortgagePortfolioDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/MortgageLoansLoansinMortgagePortfolioDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_d1f39c10-8d6c-430c-9b2d-717da223a59a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_MortgageLoansOnRealEstateUnpaidPrincipalBalance_26f27945-9350-4ab2-b45e-8c31fea33516" xlink:href="fnm-20230630.xsd#fnm_MortgageLoansOnRealEstateUnpaidPrincipalBalance"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_d1f39c10-8d6c-430c-9b2d-717da223a59a" xlink:to="loc_fnm_MortgageLoansOnRealEstateUnpaidPrincipalBalance_26f27945-9350-4ab2-b45e-8c31fea33516" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_MortgageLoansCostBasisAndFairValueAdjustmentsNet_a98ed7b3-23b7-4db7-a538-b4230f6e66c9" xlink:href="fnm-20230630.xsd#fnm_MortgageLoansCostBasisAndFairValueAdjustmentsNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_d1f39c10-8d6c-430c-9b2d-717da223a59a" xlink:to="loc_fnm_MortgageLoansCostBasisAndFairValueAdjustmentsNet_a98ed7b3-23b7-4db7-a538-b4230f6e66c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_e7072971-7314-4a15-b491-ca10d3fb28a3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_d1f39c10-8d6c-430c-9b2d-717da223a59a" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_e7072971-7314-4a15-b491-ca10d3fb28a3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/MortgageLoansCreditQualityIndicatorsSFDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#MortgageLoansCreditQualityIndicatorsSFDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/MortgageLoansCreditQualityIndicatorsSFDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NotesReceivableGross_67e85be3-4dbd-4feb-92ab-d83c55a131be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NotesReceivableGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYear_b231961b-03d6-46b3-ac4b-2ac9c4f33f63" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_67e85be3-4dbd-4feb-92ab-d83c55a131be" xlink:to="loc_us-gaap_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYear_b231961b-03d6-46b3-ac4b-2ac9c4f33f63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedInCurrentFiscalYear_bafe32a5-59de-416f-b49d-4cff813b576d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableOriginatedInCurrentFiscalYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_67e85be3-4dbd-4feb-92ab-d83c55a131be" xlink:to="loc_us-gaap_FinancingReceivableOriginatedInCurrentFiscalYear_bafe32a5-59de-416f-b49d-4cff813b576d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYear_5d3497b3-ccf3-4509-a117-7f55c9073ea8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYear"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_67e85be3-4dbd-4feb-92ab-d83c55a131be" xlink:to="loc_us-gaap_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYear_5d3497b3-ccf3-4509-a117-7f55c9073ea8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYear_511f9c98-943a-46fe-b224-c7614eee1a44" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_67e85be3-4dbd-4feb-92ab-d83c55a131be" xlink:to="loc_us-gaap_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYear_511f9c98-943a-46fe-b224-c7614eee1a44" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYear_a6243916-2161-4b1c-8127-11ece77d7114" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_67e85be3-4dbd-4feb-92ab-d83c55a131be" xlink:to="loc_us-gaap_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYear_a6243916-2161-4b1c-8127-11ece77d7114" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear_71bd0e72-3ece-4c8e-9832-3475d960bf07" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_67e85be3-4dbd-4feb-92ab-d83c55a131be" xlink:to="loc_us-gaap_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear_71bd0e72-3ece-4c8e-9832-3475d960bf07" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/InvestmentsinSecuritiesScheduleofAccumulatedOtherComprehensiveIncomeLossDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#InvestmentsinSecuritiesScheduleofAccumulatedOtherComprehensiveIncomeLossDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/InvestmentsinSecuritiesScheduleofAccumulatedOtherComprehensiveIncomeLossDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_d861e0aa-2e2d-4dee-a9b2-41243b8bd124" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleSecuritiesOtherThanTemporaryImpairmentNotRecorded_4a5d625e-1152-46bb-a56d-b9e71957b9a3" xlink:href="fnm-20230630.xsd#fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleSecuritiesOtherThanTemporaryImpairmentNotRecorded"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_d861e0aa-2e2d-4dee-a9b2-41243b8bd124" xlink:to="loc_fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleSecuritiesOtherThanTemporaryImpairmentNotRecorded_4a5d625e-1152-46bb-a56d-b9e71957b9a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_1b8363e9-9591-4fa8-ac90-85edcbfa521b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_d861e0aa-2e2d-4dee-a9b2-41243b8bd124" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_1b8363e9-9591-4fa8-ac90-85edcbfa521b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/InvestmentsinSecuritiesMaturityInformationDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#InvestmentsinSecuritiesMaturityInformationDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/InvestmentsinSecuritiesMaturityInformationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLoss_c411103b-6413-441b-85e4-df90aae828b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis_841f202c-02a1-4dd0-8902-9c27b2fca2b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLoss_c411103b-6413-441b-85e4-df90aae828b0" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis_841f202c-02a1-4dd0-8902-9c27b2fca2b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_c75796e0-b860-4428-b66c-92c9897ce449" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLoss_c411103b-6413-441b-85e4-df90aae828b0" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_c75796e0-b860-4428-b66c-92c9897ce449" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_1c0d0225-e6a0-4650-8a2c-0fc5aeea52b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLoss_c411103b-6413-441b-85e4-df90aae828b0" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_1c0d0225-e6a0-4650-8a2c-0fc5aeea52b8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_b65c4351-998f-480b-aab1-0a8d123089e0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLoss_c411103b-6413-441b-85e4-df90aae828b0" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_b65c4351-998f-480b-aab1-0a8d123089e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_26434d51-87f1-40eb-99a2-2e2bb4d0c16e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_47105ee1-354d-4e8e-8e76-3c6d80fec7b3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_26434d51-87f1-40eb-99a2-2e2bb4d0c16e" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_47105ee1-354d-4e8e-8e76-3c6d80fec7b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_1d7f33da-9893-4225-93f5-5d755b2d42d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_26434d51-87f1-40eb-99a2-2e2bb4d0c16e" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_1d7f33da-9893-4225-93f5-5d755b2d42d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue_a07c9b1f-95a7-43a4-9b00-1b294940c150" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_26434d51-87f1-40eb-99a2-2e2bb4d0c16e" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue_a07c9b1f-95a7-43a4-9b00-1b294940c150" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_db1da775-b8a7-45b8-8255-9da56beee80d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_26434d51-87f1-40eb-99a2-2e2bb4d0c16e" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_db1da775-b8a7-45b8-8255-9da56beee80d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/DerivativeInstrumentsNotionalandFairValuePositionDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#DerivativeInstrumentsNotionalandFairValuePositionDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/DerivativeInstrumentsNotionalandFairValuePositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_efb9ca53-4972-4ece-9755-a84fd6005e3c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_ea99fca7-bf58-4b0b-9733-b0d74aee56fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilities_efb9ca53-4972-4ece-9755-a84fd6005e3c" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_ea99fca7-bf58-4b0b-9733-b0d74aee56fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_eba2e1e4-9da4-4a33-9a42-855620117a0b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossAsset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilities_efb9ca53-4972-4ece-9755-a84fd6005e3c" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_eba2e1e4-9da4-4a33-9a42-855620117a0b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_b22090bf-7b97-4807-b4c2-4504ff7aaaaa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_6239a685-9827-40f3-82e5-1c7c57cdb07c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssets_b22090bf-7b97-4807-b4c2-4504ff7aaaaa" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_6239a685-9827-40f3-82e5-1c7c57cdb07c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_8ffa0c89-853f-4be9-b74e-b7648ed146bb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossLiability"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssets_b22090bf-7b97-4807-b4c2-4504ff7aaaaa" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_8ffa0c89-853f-4be9-b74e-b7648ed146bb" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/DerivativeInstrumentsFVGainsandLossesDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#DerivativeInstrumentsFVGainsandLossesDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/DerivativeInstrumentsFVGainsandLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_eade3d84-09b9-4688-bc2d-de78e5774b16" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_8a1a654c-1834-40c0-a4e8-90e36329e9bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_eade3d84-09b9-4688-bc2d-de78e5774b16" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_8a1a654c-1834-40c0-a4e8-90e36329e9bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_5b64a5d8-e2d7-459b-b89b-9265f3b40a11" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_eade3d84-09b9-4688-bc2d-de78e5774b16" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_5b64a5d8-e2d7-459b-b89b-9265f3b40a11" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_InterestAccrualsOnHedgingInstruments_8ce7051e-3f04-4549-992c-fcf79d45e02d" xlink:href="fnm-20230630.xsd#fnm_InterestAccrualsOnHedgingInstruments"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_eade3d84-09b9-4688-bc2d-de78e5774b16" xlink:to="loc_fnm_InterestAccrualsOnHedgingInstruments_8ce7051e-3f04-4549-992c-fcf79d45e02d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DiscontinuedHedgeRelatedBasisAdjustmentAmortization_b26e5ad7-504e-4ba0-ab4f-fde3a11547d3" xlink:href="fnm-20230630.xsd#fnm_DiscontinuedHedgeRelatedBasisAdjustmentAmortization"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_eade3d84-09b9-4688-bc2d-de78e5774b16" xlink:to="loc_fnm_DiscontinuedHedgeRelatedBasisAdjustmentAmortization_b26e5ad7-504e-4ba0-ab4f-fde3a11547d3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/SegmentReportingDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#SegmentReportingDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/SegmentReportingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_c15388f8-3d75-49b3-8df1-a78c19aea294" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProfitLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_b1909bae-4682-4eae-8908-b6a29349c43e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_c15388f8-3d75-49b3-8df1-a78c19aea294" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_b1909bae-4682-4eae-8908-b6a29349c43e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6057d2b9-98bd-4b1b-b522-c4c681e8ed80" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ProfitLoss_c15388f8-3d75-49b3-8df1-a78c19aea294" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_6057d2b9-98bd-4b1b-b522-c4c681e8ed80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenuesNetOfInterestExpense_1a89e7a6-2ce6-45fe-9594-936754235c47" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenuesNetOfInterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncomeOther_3ac481eb-57ec-479f-bb34-8ac25374cd1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestIncomeOther"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_RevenuesNetOfInterestExpense_1a89e7a6-2ce6-45fe-9594-936754235c47" xlink:to="loc_us-gaap_NoninterestIncomeOther_3ac481eb-57ec-479f-bb34-8ac25374cd1b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_7ff340df-c9b6-4cef-8612-07e13d676cbe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_RevenuesNetOfInterestExpense_1a89e7a6-2ce6-45fe-9594-936754235c47" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_7ff340df-c9b6-4cef-8612-07e13d676cbe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenuesNetOfInterestExpense_9d82bb27-4c77-4681-80a2-47dd0e215166" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenuesNetOfInterestExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_us-gaap_RevenuesNetOfInterestExpense_9d82bb27-4c77-4681-80a2-47dd0e215166" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_InvestmentGainsLossNet1_1657a4e6-fdc7-412a-aad6-17f48e3f4b5d" xlink:href="fnm-20230630.xsd#fnm_InvestmentGainsLossNet1"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_fnm_InvestmentGainsLossNet1_1657a4e6-fdc7-412a-aad6-17f48e3f4b5d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_5b0631ac-6a26-4c2d-b0c3-8185821ce260" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_5b0631ac-6a26-4c2d-b0c3-8185821ce260" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoninterestExpense_a4cdbe86-8137-4c4c-b2d8-a35766a57c76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNoninterestExpense"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_us-gaap_OtherNoninterestExpense_a4cdbe86-8137-4c4c-b2d8-a35766a57c76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_6069ca53-a528-4b70-836a-dcdb99964927" xlink:href="fnm-20230630.xsd#fnm_ChangeInExpectedCreditEnhancementRecoveries"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_6069ca53-a528-4b70-836a-dcdb99964927" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_a5a5fe60-b4e8-41c7-a601-9a3bbf82d71f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueOptionChangesInFairValueGainLoss1"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_a5a5fe60-b4e8-41c7-a601-9a3bbf82d71f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_fea3f552-a1bb-42d9-81f7-83f84eb62748" xlink:href="fnm-20230630.xsd#fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_fea3f552-a1bb-42d9-81f7-83f84eb62748" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_CreditEnhancementExpense_1deb44d7-358b-4857-9366-7adcb7a2a014" xlink:href="fnm-20230630.xsd#fnm_CreditEnhancementExpense"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_fnm_CreditEnhancementExpense_1deb44d7-358b-4857-9366-7adcb7a2a014" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_cc67eb50-f761-4c1a-8558-c36bdfd599f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dc708989-eff3-45f4-89a8-592f5c44aded" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_cc67eb50-f761-4c1a-8558-c36bdfd599f6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/NettingArrangementsDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#NettingArrangementsDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/NettingArrangementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement_53a89d82-6844-43ec-bf99-472ba7e5792f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross_95e0ada1-b735-4e94-adc3-0f26cad577ed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement_53a89d82-6844-43ec-bf99-472ba7e5792f" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross_95e0ada1-b735-4e94-adc3-0f26cad577ed" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset_7682d5d1-88d7-405d-94ce-0736a0681564" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement_53a89d82-6844-43ec-bf99-472ba7e5792f" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset_7682d5d1-88d7-405d-94ce-0736a0681564" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_9db6f63c-03f2-4f11-8af9-e45f814527f0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_41beed93-00d4-4e53-9fd8-af2a5c4cbe05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_9db6f63c-03f2-4f11-8af9-e45f814527f0" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_41beed93-00d4-4e53-9fd8-af2a5c4cbe05" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_fa0789ef-71e6-4a94-b86f-fad37075e74c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossAsset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_9db6f63c-03f2-4f11-8af9-e45f814527f0" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_fa0789ef-71e6-4a94-b86f-fad37075e74c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_7c82c9ef-b4d1-4c50-bdfb-0eeef12a5368" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement_e980aa2c-dc7f-4177-9932-ed5e557dd782" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_7c82c9ef-b4d1-4c50-bdfb-0eeef12a5368" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement_e980aa2c-dc7f-4177-9932-ed5e557dd782" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedNotOffsetPolicyElectionDeduction_0e1c7efc-06f2-4e1b-a97e-e95029e9bb21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_7c82c9ef-b4d1-4c50-bdfb-0eeef12a5368" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedNotOffsetPolicyElectionDeduction_0e1c7efc-06f2-4e1b-a97e-e95029e9bb21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities_6984eaef-3edc-43d5-89fd-46181148d443" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_7c82c9ef-b4d1-4c50-bdfb-0eeef12a5368" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities_6984eaef-3edc-43d5-89fd-46181148d443" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross_16edd878-806b-4748-9914-3a42be3a4e8b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_450ba7de-4dd9-4b47-bfa3-3017a7d99a1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross_16edd878-806b-4748-9914-3a42be3a4e8b" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_450ba7de-4dd9-4b47-bfa3-3017a7d99a1b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_afd59ddf-84c5-4188-9a1e-2c077b03bb36" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_6d227b0c-3175-42ae-aa93-7b9eead3a56f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_afd59ddf-84c5-4188-9a1e-2c077b03bb36" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_6d227b0c-3175-42ae-aa93-7b9eead3a56f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_5c2aef0b-e62f-4147-b7be-ba3703b391e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_afd59ddf-84c5-4188-9a1e-2c077b03bb36" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_5c2aef0b-e62f-4147-b7be-ba3703b391e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities_6a33b616-b04a-46db-a525-cee3f9d8f030" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_057e4daa-3427-4222-92d2-9010e57f2dd7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralRightToReclaimSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities_6a33b616-b04a-46db-a525-cee3f9d8f030" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_057e4daa-3427-4222-92d2-9010e57f2dd7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_24da7fbc-7b04-4632-852e-661197dd0a88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_facbacfd-cc23-4c01-89dc-99e937f01a0e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_24da7fbc-7b04-4632-852e-661197dd0a88" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_facbacfd-cc23-4c01-89dc-99e937f01a0e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellLiability_62bc4a1e-8d3b-4d1b-80b2-732bb32668b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellLiability"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_24da7fbc-7b04-4632-852e-661197dd0a88" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellLiability_62bc4a1e-8d3b-4d1b-80b2-732bb32668b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities_13c72c6c-abc3-4e04-9297-b406b2aa5ecc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_c5723981-5ed4-49ef-a597-447acb477682" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralObligationToReturnSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities_13c72c6c-abc3-4e04-9297-b406b2aa5ecc" xlink:to="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_c5723981-5ed4-49ef-a597-447acb477682" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_21aa23cc-97c9-4952-a8e2-be45cd4f9765" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities_13c72c6c-abc3-4e04-9297-b406b2aa5ecc" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_21aa23cc-97c9-4952-a8e2-be45cd4f9765" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecurityPurchasedUnderAgreementToResellSecurityBorrowedAfterOffsetSubjectToMasterNettingArrangement_dfa203c2-ce8e-4d50-b2ed-2d6c67e85048" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecurityPurchasedUnderAgreementToResellSecurityBorrowedAfterOffsetSubjectToMasterNettingArrangement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_e77317d9-2b1f-4e5e-be7f-86940e9c5d4b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecurityPurchasedUnderAgreementToResellSecurityBorrowedAfterOffsetSubjectToMasterNettingArrangement_dfa203c2-ce8e-4d50-b2ed-2d6c67e85048" xlink:to="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_e77317d9-2b1f-4e5e-be7f-86940e9c5d4b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_f4c9a468-d2a5-42e2-baf7-4c4774a1a749" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecurityPurchasedUnderAgreementToResellSecurityBorrowedAfterOffsetSubjectToMasterNettingArrangement_dfa203c2-ce8e-4d50-b2ed-2d6c67e85048" xlink:to="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_f4c9a468-d2a5-42e2-baf7-4c4774a1a749" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_c92c5b74-7528-4484-9922-89046175848f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_035b7084-1a9f-40ce-9cff-9821f23018db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_c92c5b74-7528-4484-9922-89046175848f" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_035b7084-1a9f-40ce-9cff-9821f23018db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_20c59dcd-9600-46c2-b936-aa80a75345c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_c92c5b74-7528-4484-9922-89046175848f" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_20c59dcd-9600-46c2-b936-aa80a75345c6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement_161304f9-f707-4ee1-8b15-5c2cea4aebda" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_c92c5b74-7528-4484-9922-89046175848f" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement_161304f9-f707-4ee1-8b15-5c2cea4aebda" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_682a4c95-ce84-4986-890c-e01f4acb14da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_c6bf957f-5958-4020-9e40-0e099f17adbc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralRightToReclaimSecurities"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_682a4c95-ce84-4986-890c-e01f4acb14da" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_c6bf957f-5958-4020-9e40-0e099f17adbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_af1c4db2-67b8-4d5b-b763-001f5546ca41" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_682a4c95-ce84-4986-890c-e01f4acb14da" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_af1c4db2-67b8-4d5b-b763-001f5546ca41" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_8e48a4da-c593-4c5e-acaf-a166a2f9c49c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_682a4c95-ce84-4986-890c-e01f4acb14da" xlink:to="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_8e48a4da-c593-4c5e-acaf-a166a2f9c49c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedNotOffsetPolicyElectionDeduction_3ffd4c39-6b6f-42a4-ad16-f5860f78265a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedNotOffsetPolicyElectionDeduction"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_9d4b7ea7-0f13-4306-bef5-a67d0ffd2d05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedNotOffsetPolicyElectionDeduction_3ffd4c39-6b6f-42a4-ad16-f5860f78265a" xlink:to="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_9d4b7ea7-0f13-4306-bef5-a67d0ffd2d05" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_1947c904-d2e0-4ef0-bfc7-f5938c55674f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedNotOffsetPolicyElectionDeduction_3ffd4c39-6b6f-42a4-ad16-f5860f78265a" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_1947c904-d2e0-4ef0-bfc7-f5938c55674f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset_2dc333b9-0140-423c-bfa3-dd38163165d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_30babc47-eb69-4aaf-a8fc-b86e5d25a8cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset_2dc333b9-0140-423c-bfa3-dd38163165d5" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_30babc47-eb69-4aaf-a8fc-b86e5d25a8cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedNotOffsetPolicyElectionDeduction_46531a3f-5880-40d3-a0ad-eafba03d3b90" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedNotOffsetPolicyElectionDeduction"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_390ddcff-b1cf-4ce1-b0bd-d6aa15a90943" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedNotOffsetPolicyElectionDeduction_46531a3f-5880-40d3-a0ad-eafba03d3b90" xlink:to="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_390ddcff-b1cf-4ce1-b0bd-d6aa15a90943" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_63824c4b-0068-46ef-971c-92759a32896d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_5c91c7b5-7775-4562-a3e1-4636d12838a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAsset"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_63824c4b-0068-46ef-971c-92759a32896d" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_5c91c7b5-7775-4562-a3e1-4636d12838a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellGross_7660d60a-3fc5-4588-af83-f49402c8cafa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellGross"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_63824c4b-0068-46ef-971c-92759a32896d" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellGross_7660d60a-3fc5-4588-af83-f49402c8cafa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_149cea47-6366-4e68-a7a4-0bf45a197385" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_e5650a24-b913-47d4-b17b-11eb7c4928d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_149cea47-6366-4e68-a7a4-0bf45a197385" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_e5650a24-b913-47d4-b17b-11eb7c4928d9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_68f7aa7a-bd72-408f-991e-050b87c5d3ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_149cea47-6366-4e68-a7a4-0bf45a197385" xlink:to="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_68f7aa7a-bd72-408f-991e-050b87c5d3ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_48bd5ccb-ef18-40d5-b5e9-1a3f77ff33d6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralObligationToReturnSecurities"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_149cea47-6366-4e68-a7a4-0bf45a197385" xlink:to="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_48bd5ccb-ef18-40d5-b5e9-1a3f77ff33d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_51ffdff6-8379-4d87-bbc8-535873fe432c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_b7737ab7-9f35-4f34-a8ee-bffc121f1b0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossLiability"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_51ffdff6-8379-4d87-bbc8-535873fe432c" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_b7737ab7-9f35-4f34-a8ee-bffc121f1b0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_0b44dfe1-8c97-43f8-8fa0-a74cfad99b1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAsset"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_51ffdff6-8379-4d87-bbc8-535873fe432c" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_0b44dfe1-8c97-43f8-8fa0-a74cfad99b1b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/NettingArrangementsDetails_1" xlink:type="simple" xlink:href="fnm-20230630.xsd#NettingArrangementsDetails_1"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/NettingArrangementsDetails_1" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_8c726761-4e77-4af8-9e7e-3db2df39b325" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_d797235c-a633-47ca-842b-ef9869cec3fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_8c726761-4e77-4af8-9e7e-3db2df39b325" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_d797235c-a633-47ca-842b-ef9869cec3fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement_eaaa09b0-cf84-49bb-bca8-a2e36a718ee4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_9e5a30db-2da6-4aca-83a0-ef7448a2bf8c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritySoldUnderAgreementToRepurchaseSecurityLoanedAfterOffsetSubjectToMasterNettingArrangement_eaaa09b0-cf84-49bb-bca8-a2e36a718ee4" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_9e5a30db-2da6-4aca-83a0-ef7448a2bf8c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/FairValueFairValueofFinancialInstrumentsDetails" xlink:type="simple" xlink:href="fnm-20230630.xsd#FairValueFairValueofFinancialInstrumentsDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/FairValueFairValueofFinancialInstrumentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecurities_8105a459-5de5-4e5c-b2ef-116146ce1232" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TradingSecurities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_us-gaap_TradingSecurities_8105a459-5de5-4e5c-b2ef-116146ce1232" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgagesHeldForSaleFairValueDisclosure_8117595f-6017-451d-bc47-1a9a7d8c8d9c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgagesHeldForSaleFairValueDisclosure"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_us-gaap_MortgagesHeldForSaleFairValueDisclosure_8117595f-6017-451d-bc47-1a9a7d8c8d9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansReceivableFairValueDisclosure_9967a767-57d5-49de-a383-b279818239ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LoansReceivableFairValueDisclosure"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_us-gaap_LoansReceivableFairValueDisclosure_9967a767-57d5-49de-a383-b279818239ef" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_AdvancesToLendersFairValueDisclosure_f830f929-386e-43ba-9199-710d57362dc9" xlink:href="fnm-20230630.xsd#fnm_AdvancesToLendersFairValueDisclosure"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_fnm_AdvancesToLendersFairValueDisclosure_f830f929-386e-43ba-9199-710d57362dc9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_0e729647-23bb-49d0-9916-60b5c7578b58" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssets"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_us-gaap_DerivativeAssets_0e729647-23bb-49d0-9916-60b5c7578b58" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_GuarantyAssetsAndBuyUpsFairValueDisclosure_2fa04d97-e911-4fcb-ba83-1d110c075219" xlink:href="fnm-20230630.xsd#fnm_GuarantyAssetsAndBuyUpsFairValueDisclosure"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_fnm_GuarantyAssetsAndBuyUpsFairValueDisclosure_2fa04d97-e911-4fcb-ba83-1d110c075219" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalFundsSoldAndSecuritiesBorrowedOrPurchasedUnderAgreementsToResellFairValueDisclosure_492afead-7147-4edc-bb8c-a7d503632cb4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FederalFundsSoldAndSecuritiesBorrowedOrPurchasedUnderAgreementsToResellFairValueDisclosure"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_us-gaap_FederalFundsSoldAndSecuritiesBorrowedOrPurchasedUnderAgreementsToResellFairValueDisclosure_492afead-7147-4edc-bb8c-a7d503632cb4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_CashCashEquivalentsAndRestrictedCashFairValueDisclosure_79bfb123-c730-422e-98fb-5bd0f6b45206" xlink:href="fnm-20230630.xsd#fnm_CashCashEquivalentsAndRestrictedCashFairValueDisclosure"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_fnm_CashCashEquivalentsAndRestrictedCashFairValueDisclosure_79bfb123-c730-422e-98fb-5bd0f6b45206" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_59ec01d4-9619-468f-a129-49d5c39b8d43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_3a1bfd5d-be10-40c8-bfbf-89a9bc1ce11a" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_59ec01d4-9619-468f-a129-49d5c39b8d43" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_e624a37b-9c8c-452e-a11c-38fd527bf23d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_d8e10bff-6565-479a-81a1-b121935960e4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e624a37b-9c8c-452e-a11c-38fd527bf23d" xlink:to="loc_us-gaap_DerivativeLiabilities_d8e10bff-6565-479a-81a1-b121935960e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtFairValue_874740a8-ec90-479b-9e45-aae019a607f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e624a37b-9c8c-452e-a11c-38fd527bf23d" xlink:to="loc_us-gaap_LongTermDebtFairValue_874740a8-ec90-479b-9e45-aae019a607f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteesFairValueDisclosure_7aae8e17-6f9b-4f74-8018-b5ac893a9598" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteesFairValueDisclosure"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e624a37b-9c8c-452e-a11c-38fd527bf23d" xlink:to="loc_us-gaap_GuaranteesFairValueDisclosure_7aae8e17-6f9b-4f74-8018-b5ac893a9598" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShorttermDebtFairValue_59ed635a-07e9-4ce8-a731-56a60a85b03e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShorttermDebtFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e624a37b-9c8c-452e-a11c-38fd527bf23d" xlink:to="loc_us-gaap_ShorttermDebtFairValue_59ed635a-07e9-4ce8-a731-56a60a85b03e" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
