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

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:c8a9469f-fe06-49bc-9fa9-69e61aa0fff1,g:453611f8-2842-45f7-b4c7-206148db097a-->
<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/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="fnm-20211231.xsd#ConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansAndLeasesReceivableNetReportedAmount_72714515-da3a-4a4a-9415-94470a141e13" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LoansAndLeasesReceivableNetReportedAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_0b61ac79-eada-4b0a-9ffd-f53ce99235c0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LoansAndLeasesReceivableNetReportedAmount_72714515-da3a-4a4a-9415-94470a141e13" xlink:to="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_0b61ac79-eada-4b0a-9ffd-f53ce99235c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansReceivableHeldForSaleAmount_980722e3-4539-418f-8a13-94780e047cd1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LoansReceivableHeldForSaleAmount"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LoansAndLeasesReceivableNetReportedAmount_72714515-da3a-4a4a-9415-94470a141e13" xlink:to="loc_us-gaap_LoansReceivableHeldForSaleAmount_980722e3-4539-418f-8a13-94780e047cd1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_f03cab96-ec75-483b-9e49-c5ef7d54aacf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_9aa4e3fe-553e-4861-9216-e3502f3ca781" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_f03cab96-ec75-483b-9e49-c5ef7d54aacf" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_9aa4e3fe-553e-4861-9216-e3502f3ca781" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_da2d0bdc-e260-4ecd-9bbd-238f02537efe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_f03cab96-ec75-483b-9e49-c5ef7d54aacf" xlink:to="loc_us-gaap_CommonStockValue_da2d0bdc-e260-4ecd-9bbd-238f02537efe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_SeniorPreferredStockValue_889ab0b8-299e-4d2b-b720-8ea96960ad14" xlink:href="fnm-20211231.xsd#fnm_SeniorPreferredStockValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_f03cab96-ec75-483b-9e49-c5ef7d54aacf" xlink:to="loc_fnm_SeniorPreferredStockValue_889ab0b8-299e-4d2b-b720-8ea96960ad14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_06ebad76-a1f7-4175-b8ed-cea90dcb3905" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_f03cab96-ec75-483b-9e49-c5ef7d54aacf" xlink:to="loc_us-gaap_PreferredStockValue_06ebad76-a1f7-4175-b8ed-cea90dcb3905" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_44886cbd-b0ce-481b-8641-8448b03c2600" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockValue"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_f03cab96-ec75-483b-9e49-c5ef7d54aacf" xlink:to="loc_us-gaap_TreasuryStockValue_44886cbd-b0ce-481b-8641-8448b03c2600" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_dae69d98-1d17-4ffd-80e3-a98432a55202" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_f03cab96-ec75-483b-9e49-c5ef7d54aacf" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_dae69d98-1d17-4ffd-80e3-a98432a55202" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_cf669ccc-49ba-4b72-a092-5b190b9414cb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NotesReceivableGross_3d670896-b2f6-40db-841d-678d3156a159" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NotesReceivableGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_cf669ccc-49ba-4b72-a092-5b190b9414cb" xlink:to="loc_us-gaap_NotesReceivableGross_3d670896-b2f6-40db-841d-678d3156a159" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllowanceForLoanAndLeaseLossesRealEstate_0514a13a-71a7-45ad-a5bd-629c0db17109" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AllowanceForLoanAndLeaseLossesRealEstate"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MortgageLoansOnRealEstateCommercialAndConsumerNet_cf669ccc-49ba-4b72-a092-5b190b9414cb" xlink:to="loc_us-gaap_AllowanceForLoanAndLeaseLossesRealEstate_0514a13a-71a7-45ad-a5bd-629c0db17109" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_143dd4db-99c5-4607-8bc5-247e0d8f3048" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_bf9c4163-2a71-456a-afb7-19f4ff489948" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_143dd4db-99c5-4607-8bc5-247e0d8f3048" xlink:to="loc_us-gaap_Liabilities_bf9c4163-2a71-456a-afb7-19f4ff489948" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_01725c37-e327-4e5b-9b3c-f6c8adc9d8ab" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_143dd4db-99c5-4607-8bc5-247e0d8f3048" xlink:to="loc_us-gaap_CommitmentsAndContingencies_01725c37-e327-4e5b-9b3c-f6c8adc9d8ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_a0e3e364-0efa-457f-a5ef-e5d9ba61b6c1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_143dd4db-99c5-4607-8bc5-247e0d8f3048" xlink:to="loc_us-gaap_StockholdersEquity_a0e3e364-0efa-457f-a5ef-e5d9ba61b6c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_fd3d30f5-59aa-4b14-a9d3-ea2d2a817cbc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_fd3d30f5-59aa-4b14-a9d3-ea2d2a817cbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalents_1d921e03-dd72-4806-9466-9f387666e893" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalents_1d921e03-dd72-4806-9466-9f387666e893" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_3bc55179-f08b-463d-9eb7-a31f88fbbceb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_MarketableSecurities_3bc55179-f08b-463d-9eb7-a31f88fbbceb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansAndLeasesReceivableNetReportedAmount_3ff3e873-3ef2-4bfd-ac1c-f1901944c76b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LoansAndLeasesReceivableNetReportedAmount"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_LoansAndLeasesReceivableNetReportedAmount_3ff3e873-3ef2-4bfd-ac1c-f1901944c76b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_AdvanceToLender_3ede4bd6-7116-41b5-9e7d-bb30e1089c77" xlink:href="fnm-20211231.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_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_fnm_AdvanceToLender_3ede4bd6-7116-41b5-9e7d-bb30e1089c77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestReceivable_c5e29b73-9407-483a-a62f-55b1acb52e8a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestReceivable"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_InterestReceivable_c5e29b73-9407-483a-a62f-55b1acb52e8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealEstateAcquiredThroughForeclosure_f9a23552-7a2a-4dde-b176-fdd2be517797" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RealEstateAcquiredThroughForeclosure"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_RealEstateAcquiredThroughForeclosure_f9a23552-7a2a-4dde-b176-fdd2be517797" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_0e990118-2bed-4d96-bad5-872016ae7fad" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_0e990118-2bed-4d96-bad5-872016ae7fad" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_1f3f09fd-0546-4f70-b33f-ff6b58c4c9a3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_OtherAssets_1f3f09fd-0546-4f70-b33f-ff6b58c4c9a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResell_b5f5cce0-3c58-42b2-86cf-8a6fc611aead" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResell"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_355c1623-32b0-4dd8-94ac-f226857235d3" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResell_b5f5cce0-3c58-42b2-86cf-8a6fc611aead" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_f07b4e6b-ba7e-4ece-80b9-2c2dadcf3c33" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MarketableSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_a0e03aa2-ed59-4806-9e86-27e556fec62b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MarketableSecurities_f07b4e6b-ba7e-4ece-80b9-2c2dadcf3c33" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_a0e03aa2-ed59-4806-9e86-27e556fec62b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecuritiesDebt_f0009e63-e8c5-4022-9743-b90b81d6ea34" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TradingSecuritiesDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MarketableSecurities_f07b4e6b-ba7e-4ece-80b9-2c2dadcf3c33" xlink:to="loc_us-gaap_TradingSecuritiesDebt_f0009e63-e8c5-4022-9743-b90b81d6ea34" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_49709f8e-b5fa-4327-9ab8-0ef66efd01a9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndCapitalLeaseObligations_a6a157bf-bc1c-48f0-b3d1-0f91a8ced34e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_49709f8e-b5fa-4327-9ab8-0ef66efd01a9" xlink:to="loc_us-gaap_DebtAndCapitalLeaseObligations_a6a157bf-bc1c-48f0-b3d1-0f91a8ced34e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_19ad6e69-2bf8-4133-87cd-2960b95686d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_49709f8e-b5fa-4327-9ab8-0ef66efd01a9" xlink:to="loc_us-gaap_OtherLiabilities_19ad6e69-2bf8-4133-87cd-2960b95686d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_82697876-e62d-413a-a49c-a2ec2b6f1ab5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_49709f8e-b5fa-4327-9ab8-0ef66efd01a9" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_82697876-e62d-413a-a49c-a2ec2b6f1ab5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/ConsolidatedStatementsofOperationsandComprehensiveIncome" xlink:type="simple" xlink:href="fnm-20211231.xsd#ConsolidatedStatementsofOperationsandComprehensiveIncome"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/ConsolidatedStatementsofOperationsandComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e0e149ba-bc68-4baf-9af8-8378adb77590" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_5c9a2cdd-b107-40b0-9cac-aa9d3646e19c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e0e149ba-bc68-4baf-9af8-8378adb77590" xlink:to="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_5c9a2cdd-b107-40b0-9cac-aa9d3646e19c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_5448da32-a5d6-47f0-93b2-a4302743ecd4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NoninterestIncome"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e0e149ba-bc68-4baf-9af8-8378adb77590" xlink:to="loc_us-gaap_NoninterestIncome_5448da32-a5d6-47f0-93b2-a4302743ecd4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_3d07c45b-8eec-4327-8f81-4f8e88258556" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NoninterestExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_e0e149ba-bc68-4baf-9af8-8378adb77590" xlink:to="loc_us-gaap_NoninterestExpense_3d07c45b-8eec-4327-8f81-4f8e88258556" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_b8c44b18-bbdf-44f1-b600-2ff6bb2d1f1b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseShortTermBorrowings_f65db9af-9b24-47a7-8141-3669a495078f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpenseShortTermBorrowings"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_b8c44b18-bbdf-44f1-b600-2ff6bb2d1f1b" xlink:to="loc_us-gaap_InterestExpenseShortTermBorrowings_f65db9af-9b24-47a7-8141-3669a495078f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseLongTermDebt_4756ec21-dbca-4586-b35c-ffad9deb3304" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestExpenseLongTermDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpense_b8c44b18-bbdf-44f1-b600-2ff6bb2d1f1b" xlink:to="loc_us-gaap_InterestExpenseLongTermDebt_4756ec21-dbca-4586-b35c-ffad9deb3304" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_3c7ab753-40b7-405d-b40c-00ad8d4ca6b8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_0761aa52-eb7f-437f-bf12-9a5a3fb0f71a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_3c7ab753-40b7-405d-b40c-00ad8d4ca6b8" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_0761aa52-eb7f-437f-bf12-9a5a3fb0f71a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_f1e1fe6b-f0a4-47f0-876f-66efb6e47b24" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_3c7ab753-40b7-405d-b40c-00ad8d4ca6b8" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_f1e1fe6b-f0a4-47f0-876f-66efb6e47b24" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_4e8f2398-0745-44b5-859d-2a3e671f2d7c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendsAndOtherAdjustments_513c2b38-83ab-4985-9e51-3e9d54097a64" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PreferredStockDividendsAndOtherAdjustments"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_4e8f2398-0745-44b5-859d-2a3e671f2d7c" xlink:to="loc_us-gaap_PreferredStockDividendsAndOtherAdjustments_513c2b38-83ab-4985-9e51-3e9d54097a64" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_e9403801-794a-4d5d-9fd0-29b7c07bde26" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_4e8f2398-0745-44b5-859d-2a3e671f2d7c" xlink:to="loc_us-gaap_NetIncomeLoss_e9403801-794a-4d5d-9fd0-29b7c07bde26" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_60cb3df5-198b-47c0-88f2-88cd5246bc75" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_28717f80-b781-4a1f-9889-67d38a9b9b09" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_60cb3df5-198b-47c0-88f2-88cd5246bc75" xlink:to="loc_us-gaap_InterestAndDividendIncomeOperating_28717f80-b781-4a1f-9889-67d38a9b9b09" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_90dd1876-faac-4c4c-8ba0-8e43ba7122bc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_60cb3df5-198b-47c0-88f2-88cd5246bc75" xlink:to="loc_us-gaap_InterestExpense_90dd1876-faac-4c4c-8ba0-8e43ba7122bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_97e39aff-4ac3-4749-aa6e-29ac1eb35127" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NoninterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_70f3dca0-8367-45f7-974f-222d3e53d78e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_97e39aff-4ac3-4749-aa6e-29ac1eb35127" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_70f3dca0-8367-45f7-974f-222d3e53d78e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeclosedRealEstateExpense_592a3859-405f-4fc1-ae6d-e2af7c254e5f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ForeclosedRealEstateExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_97e39aff-4ac3-4749-aa6e-29ac1eb35127" xlink:to="loc_us-gaap_ForeclosedRealEstateExpense_592a3859-405f-4fc1-ae6d-e2af7c254e5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_e7fa66ac-1a29-4456-87a9-ec0300b981ce" xlink:href="fnm-20211231.xsd#fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_97e39aff-4ac3-4749-aa6e-29ac1eb35127" xlink:to="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_e7fa66ac-1a29-4456-87a9-ec0300b981ce" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_CreditEnhancementExpense_0954e1d7-fd9e-4e9b-9634-4a854be61e0f" xlink:href="fnm-20211231.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_97e39aff-4ac3-4749-aa6e-29ac1eb35127" xlink:to="loc_fnm_CreditEnhancementExpense_0954e1d7-fd9e-4e9b-9634-4a854be61e0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_0d92e6b1-a3b5-442c-8ec1-409ff9066460" xlink:href="fnm-20211231.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_NoninterestExpense_97e39aff-4ac3-4749-aa6e-29ac1eb35127" xlink:to="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_0d92e6b1-a3b5-442c-8ec1-409ff9066460" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoninterestExpense_8ecd0d03-2e7a-4801-8bdb-3baa4155cf7b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNoninterestExpense"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_97e39aff-4ac3-4749-aa6e-29ac1eb35127" xlink:to="loc_us-gaap_OtherNoninterestExpense_8ecd0d03-2e7a-4801-8bdb-3baa4155cf7b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_a9480e66-bb5a-4b12-8978-9a3038561a2b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_18f3c85b-4847-487a-8130-56b2354d4741" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a9480e66-bb5a-4b12-8978-9a3038561a2b" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_18f3c85b-4847-487a-8130-56b2354d4741" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_f46121da-bcd6-429b-bf6b-7a1ee632190b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a9480e66-bb5a-4b12-8978-9a3038561a2b" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_f46121da-bcd6-429b-bf6b-7a1ee632190b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_8e3661f9-3594-4581-9c60-86fd994178b5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestAndDividendIncomeOperating"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeDebtSecuritiesTradingOperating_9bb10179-409a-482b-add3-e839a9a90b4d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeDebtSecuritiesTradingOperating"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_8e3661f9-3594-4581-9c60-86fd994178b5" xlink:to="loc_us-gaap_InterestIncomeDebtSecuritiesTradingOperating_9bb10179-409a-482b-add3-e839a9a90b4d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeDebtSecuritiesAvailableForSaleOperating_746747eb-d77c-409c-bb2a-d5d82146048b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeDebtSecuritiesAvailableForSaleOperating"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_8e3661f9-3594-4581-9c60-86fd994178b5" xlink:to="loc_us-gaap_InterestIncomeDebtSecuritiesAvailableForSaleOperating_746747eb-d77c-409c-bb2a-d5d82146048b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_08e50f64-383b-42ac-840b-e4ba6b67b5a1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestAndFeeIncomeLoansAndLeases"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_8e3661f9-3594-4581-9c60-86fd994178b5" xlink:to="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_08e50f64-383b-42ac-840b-e4ba6b67b5a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInterestAndDividendIncome_80ae569f-3eb3-4dbc-b4b8-22540fc0c9c0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherInterestAndDividendIncome"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_8e3661f9-3594-4581-9c60-86fd994178b5" xlink:to="loc_us-gaap_OtherInterestAndDividendIncome_80ae569f-3eb3-4dbc-b4b8-22540fc0c9c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeSecuritiesPurchasedUnderAgreementsToResell_f6ee3994-71a6-4282-9099-3295de994add" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeSecuritiesPurchasedUnderAgreementsToResell"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_8e3661f9-3594-4581-9c60-86fd994178b5" xlink:to="loc_us-gaap_InterestIncomeSecuritiesPurchasedUnderAgreementsToResell_f6ee3994-71a6-4282-9099-3295de994add" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_98f29757-e04d-4e6e-b534-bab8a8ad0c2a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NoninterestIncome"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_c3afa174-1c64-4b5f-a78a-2d4d52cf01fe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_98f29757-e04d-4e6e-b534-bab8a8ad0c2a" xlink:to="loc_us-gaap_GainLossOnInvestments_c3afa174-1c64-4b5f-a78a-2d4d52cf01fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_a038607f-ed89-42ff-a9c5-3db952758587" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_98f29757-e04d-4e6e-b534-bab8a8ad0c2a" xlink:to="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_a038607f-ed89-42ff-a9c5-3db952758587" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_a24745a5-625a-4901-be6b-b76c974af908" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_98f29757-e04d-4e6e-b534-bab8a8ad0c2a" xlink:to="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_a24745a5-625a-4901-be6b-b76c974af908" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_507995c6-e7f8-4212-a9b6-09f7b1cd2fd5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_a0a51cec-6ae5-42ed-acfb-73c1e8d86e10" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_507995c6-e7f8-4212-a9b6-09f7b1cd2fd5" xlink:to="loc_us-gaap_NetIncomeLoss_a0a51cec-6ae5-42ed-acfb-73c1e8d86e10" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_90352582-f918-41f2-8c75-5e65c97d4e7c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_507995c6-e7f8-4212-a9b6-09f7b1cd2fd5" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_90352582-f918-41f2-8c75-5e65c97d4e7c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_e3d6c7d2-3bd6-404b-9b7f-a4a99e742dee" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_fe5bea3d-96e1-4ef8-a056-76971fbf9c5a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LaborAndRelatedExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GeneralAndAdministrativeExpense_e3d6c7d2-3bd6-404b-9b7f-a4a99e742dee" xlink:to="loc_us-gaap_LaborAndRelatedExpense_fe5bea3d-96e1-4ef8-a056-76971fbf9c5a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfessionalAndContractServicesExpense_4a08acf7-3b60-402d-96c5-48fa2fe0468d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfessionalAndContractServicesExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GeneralAndAdministrativeExpense_e3d6c7d2-3bd6-404b-9b7f-a4a99e742dee" xlink:to="loc_us-gaap_ProfessionalAndContractServicesExpense_4a08acf7-3b60-402d-96c5-48fa2fe0468d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherGeneralAndAdministrativeExpense_b912578b-85cc-4c4b-8ac1-4308d82f0acf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_e3d6c7d2-3bd6-404b-9b7f-a4a99e742dee" xlink:to="loc_us-gaap_OtherGeneralAndAdministrativeExpense_b912578b-85cc-4c4b-8ac1-4308d82f0acf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_3f237497-2845-4a9c-8822-607c3eaec17b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_0084cdf1-82c0-4b90-9397-8f269aa89bb1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_3f237497-2845-4a9c-8822-607c3eaec17b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_0084cdf1-82c0-4b90-9397-8f269aa89bb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeOtherNetOfTax_f056aa83-687a-4b37-bbe8-46a1ca4187b2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_OtherComprehensiveIncomeLossNetOfTax_3f237497-2845-4a9c-8822-607c3eaec17b" xlink:to="loc_us-gaap_OtherComprehensiveIncomeOtherNetOfTax_f056aa83-687a-4b37-bbe8-46a1ca4187b2" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="fnm-20211231.xsd#ConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/ConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_19e16663-6c4c-4d64-b5ad-ccd629f5e22c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_21bf3f60-d16b-40f1-accd-89a70eb8c4f7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_19e16663-6c4c-4d64-b5ad-ccd629f5e22c" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_21bf3f60-d16b-40f1-accd-89a70eb8c4f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_087360d8-1192-4386-a095-c49ad3035f40" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_19e16663-6c4c-4d64-b5ad-ccd629f5e22c" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_087360d8-1192-4386-a095-c49ad3035f40" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_67ed9513-7b45-4130-a7f8-f359d0b8a3b9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_19e16663-6c4c-4d64-b5ad-ccd629f5e22c" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_67ed9513-7b45-4130-a7f8-f359d0b8a3b9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_24b8e056-2246-47b5-9aa3-e41c5c5f39ee" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_ProfitLoss_24b8e056-2246-47b5-9aa3-e41c5c5f39ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_c03ec24d-bee2-41ce-8f6f-c17095e0c3de" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_c03ec24d-bee2-41ce-8f6f-c17095e0c3de" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_8cda1a54-3ec0-44fb-be12-879f7fdc87d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_8cda1a54-3ec0-44fb-be12-879f7fdc87d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ValuationLossGain_c8fc08b8-a716-438c-8e7c-74388bdbdc22" xlink:href="fnm-20211231.xsd#fnm_ValuationLossGain"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_fnm_ValuationLossGain_c8fc08b8-a716-438c-8e7c-74388bdbdc22" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable_18b22366-ed76-41c3-9e92-ceb9bf5c400e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable_18b22366-ed76-41c3-9e92-ceb9bf5c400e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_NetGainsRelatedToTheDispositionofAcquiredPropertyandPreforeclosureSalesIncludingCreditEnhancements_997c2dba-64c7-4461-8ed0-bd20fdcff2e4" xlink:href="fnm-20211231.xsd#fnm_NetGainsRelatedToTheDispositionofAcquiredPropertyandPreforeclosureSalesIncludingCreditEnhancements"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_fnm_NetGainsRelatedToTheDispositionofAcquiredPropertyandPreforeclosureSalesIncludingCreditEnhancements_997c2dba-64c7-4461-8ed0-bd20fdcff2e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet_5133a1cd-a150-47be-986e-516d9f9aa2bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet_5133a1cd-a150-47be-986e-516d9f9aa2bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_IncreaseDecreaseInServicerAdvances_ea2bfa20-5c79-41fb-ab24-4c42283b04d4" xlink:href="fnm-20211231.xsd#fnm_IncreaseDecreaseInServicerAdvances"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_fnm_IncreaseDecreaseInServicerAdvances_ea2bfa20-5c79-41fb-ab24-4c42283b04d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_062081c8-d116-47a5-8e1e-c2a6ae910599" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherOperatingActivitiesCashFlowStatement"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_OtherOperatingActivitiesCashFlowStatement_062081c8-d116-47a5-8e1e-c2a6ae910599" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInTradingSecurities_20c01062-f009-4e20-bed9-0baa036042f2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInTradingSecurities"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_IncreaseDecreaseInTradingSecurities_20c01062-f009-4e20-bed9-0baa036042f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPaidNet_a94c1bec-7f7f-44ff-aae3-a5737b356bf0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestPaidNet"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_InterestPaidNet_a94c1bec-7f7f-44ff-aae3-a5737b356bf0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnOilAndGasHedgingActivity_2189ecd1-9252-4dce-9c3e-677fbbec62ab" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GainLossOnOilAndGasHedgingActivity"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_39ab4c45-9671-4147-ba00-3f2dc1708c92" xlink:to="loc_us-gaap_GainLossOnOilAndGasHedgingActivity_2189ecd1-9252-4dce-9c3e-677fbbec62ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_f737873a-979e-4675-8dc1-64adb1ab0977" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfDebt_5e658782-1715-4040-8a9b-5f94c87d4d8a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_f737873a-979e-4675-8dc1-64adb1ab0977" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfDebt_5e658782-1715-4040-8a9b-5f94c87d4d8a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfDebt_d141c4cb-155a-4c09-8c08-47b0bde1f09d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_f737873a-979e-4675-8dc1-64adb1ab0977" xlink:to="loc_us-gaap_RepaymentsOfDebt_d141c4cb-155a-4c09-8c08-47b0bde1f09d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_PaymentOfCashDividendsOnSeniorPreferredStockToTreasury_fd973d30-1c28-4864-b487-640ed6c129cf" xlink:href="fnm-20211231.xsd#fnm_PaymentOfCashDividendsOnSeniorPreferredStockToTreasury"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_f737873a-979e-4675-8dc1-64adb1ab0977" xlink:to="loc_fnm_PaymentOfCashDividendsOnSeniorPreferredStockToTreasury_fd973d30-1c28-4864-b487-640ed6c129cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromPaymentsForOtherFinancingActivities_096bed17-b2ab-474a-b942-ae8d96277896" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromPaymentsForOtherFinancingActivities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_f737873a-979e-4675-8dc1-64adb1ab0977" xlink:to="loc_us-gaap_ProceedsFromPaymentsForOtherFinancingActivities_096bed17-b2ab-474a-b942-ae8d96277896" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromMaturitiesRepaymentsAndCallsOfTradingSecuritiesHeldforinvestment_28cb20b2-8c22-4543-9bbb-7eaa7eb88a3c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromMaturitiesRepaymentsAndCallsOfTradingSecuritiesHeldforinvestment"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromMaturitiesRepaymentsAndCallsOfTradingSecuritiesHeldforinvestment_28cb20b2-8c22-4543-9bbb-7eaa7eb88a3c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfTradingSecuritiesHeldforinvestment_df64b25d-965a-4a49-a2a7-4d3c7ceb6a01" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromSaleOfTradingSecuritiesHeldforinvestment"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromSaleOfTradingSecuritiesHeldforinvestment_df64b25d-965a-4a49-a2a7-4d3c7ceb6a01" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_5e722a28-5b40-4ae4-b0d2-9fa8e59646d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_5e722a28-5b40-4ae4-b0d2-9fa8e59646d6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_d2b6a364-8587-4337-ac5e-510e5c7c000e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_d2b6a364-8587-4337-ac5e-510e5c7c000e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_275bb5f5-8795-4629-a569-1a5dd5dcfd1b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_275bb5f5-8795-4629-a569-1a5dd5dcfd1b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_46cd289a-e2d3-4161-a1fe-80005838fcf9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_46cd289a-e2d3-4161-a1fe-80005838fcf9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfLoansAndLeasesHeldForInvestment_731a8f47-f397-4efb-ba7f-8aa733eb12d4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromSaleOfLoansAndLeasesHeldForInvestment"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromSaleOfLoansAndLeasesHeldForInvestment_731a8f47-f397-4efb-ba7f-8aa733eb12d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_PaymentsForAdvancesToLenders_eb3572d0-7558-4f31-879f-29cf067a3fac" xlink:href="fnm-20211231.xsd#fnm_PaymentsForAdvancesToLenders"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_fnm_PaymentsForAdvancesToLenders_eb3572d0-7558-4f31-879f-29cf067a3fac" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_eb70ae6c-889b-4712-9bdf-df75fbc1d5aa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromSaleOfForeclosedAssets"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromSaleOfForeclosedAssets_eb70ae6c-889b-4712-9bdf-df75fbc1d5aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromPaymentsForSecuritiesPurchasedUnderAgreementsToResell_66e43213-97b2-4498-9d95-aaf94555ef9e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProceedsFromPaymentsForSecuritiesPurchasedUnderAgreementsToResell"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_ProceedsFromPaymentsForSecuritiesPurchasedUnderAgreementsToResell_66e43213-97b2-4498-9d95-aaf94555ef9e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_a9e4f42b-adba-44b2-aafd-0b0f17996ec9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PaymentsForProceedsFromOtherInvestingActivities"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_us-gaap_PaymentsForProceedsFromOtherInvestingActivities_a9e4f42b-adba-44b2-aafd-0b0f17996ec9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ProceedsFromSaleAndPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_1623bd3b-d606-4d3e-9087-af80ddae6da3" xlink:href="fnm-20211231.xsd#fnm_ProceedsFromSaleAndPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_b1d9bfce-7e1d-483e-879c-5bfdd6d8280b" xlink:to="loc_fnm_ProceedsFromSaleAndPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_1623bd3b-d606-4d3e-9087-af80ddae6da3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/ConsolidatedStatementsofChangesinEquityDeficit" xlink:type="simple" xlink:href="fnm-20211231.xsd#ConsolidatedStatementsofChangesinEquityDeficit"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/ConsolidatedStatementsofChangesinEquityDeficit" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_96e3a72c-0891-4e40-8a72-6fd03375e27d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_2b8975ca-7590-4748-baf2-fa775e4bc4e0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_96e3a72c-0891-4e40-8a72-6fd03375e27d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_2b8975ca-7590-4748-baf2-fa775e4bc4e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeOtherNetOfTax_cc369718-f6ce-43cd-93a5-1ed0df3f616d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_96e3a72c-0891-4e40-8a72-6fd03375e27d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeOtherNetOfTax_cc369718-f6ce-43cd-93a5-1ed0df3f616d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_e9b5a47c-37d9-469b-af3f-87cbf5f69712" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_96e3a72c-0891-4e40-8a72-6fd03375e27d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_e9b5a47c-37d9-469b-af3f-87cbf5f69712" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_1d4f5768-7dbd-45ea-ab9e-b2faf853cb0d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_96e3a72c-0891-4e40-8a72-6fd03375e27d" xlink:to="loc_us-gaap_NetIncomeLoss_1d4f5768-7dbd-45ea-ab9e-b2faf853cb0d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/ConsolidationsandTransfersofFinancialAssetsUnconsolidatedVIEsDetails" xlink:type="simple" xlink:href="fnm-20211231.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_ce3476e4-186f-4b56-b3bd-1a86b9b33530" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecuritiesDebt_8b584f49-98ef-4b9f-ad2a-96b01f25e16a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TradingSecuritiesDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsNet_ce3476e4-186f-4b56-b3bd-1a86b9b33530" xlink:to="loc_us-gaap_TradingSecuritiesDebt_8b584f49-98ef-4b9f-ad2a-96b01f25e16a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_2f57acbe-4144-4019-a1b1-ca702e390d90" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsNet_ce3476e4-186f-4b56-b3bd-1a86b9b33530" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_2f57acbe-4144-4019-a1b1-ca702e390d90" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_d3a93a27-aa41-4932-aa32-40859d48b30e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsNet_ce3476e4-186f-4b56-b3bd-1a86b9b33530" xlink:to="loc_us-gaap_OtherAssets_d3a93a27-aa41-4932-aa32-40859d48b30e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_90a94ed4-3cd4-47ac-b556-3900ec1c6028" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherLiabilities"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsNet_ce3476e4-186f-4b56-b3bd-1a86b9b33530" xlink:to="loc_us-gaap_OtherLiabilities_90a94ed4-3cd4-47ac-b556-3900ec1c6028" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/MortgageLoansLoansinMortgagePortfolioDetails" xlink:type="simple" xlink:href="fnm-20211231.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_LoansAndLeasesReceivableNetReportedAmount_73e05bae-30f3-434b-9aa7-ad9f1bcf3254" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LoansAndLeasesReceivableNetReportedAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_MortgageLoansOnRealEstateUnpaidPrincipalBalance_da54044c-c7c4-4d35-b90b-c2030c5b04f1" xlink:href="fnm-20211231.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_LoansAndLeasesReceivableNetReportedAmount_73e05bae-30f3-434b-9aa7-ad9f1bcf3254" xlink:to="loc_fnm_MortgageLoansOnRealEstateUnpaidPrincipalBalance_da54044c-c7c4-4d35-b90b-c2030c5b04f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_MortgageLoansCostBasisAndFairValueAdjustmentsNet_31d9a235-67f0-4271-8786-5e12e2dd0019" xlink:href="fnm-20211231.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_LoansAndLeasesReceivableNetReportedAmount_73e05bae-30f3-434b-9aa7-ad9f1bcf3254" xlink:to="loc_fnm_MortgageLoansCostBasisAndFairValueAdjustmentsNet_31d9a235-67f0-4271-8786-5e12e2dd0019" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllowanceForLoanAndLeaseLossesRealEstate_cceeff09-c0ab-4ce6-bb2c-ddfc6edf346e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AllowanceForLoanAndLeaseLossesRealEstate"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LoansAndLeasesReceivableNetReportedAmount_73e05bae-30f3-434b-9aa7-ad9f1bcf3254" xlink:to="loc_us-gaap_AllowanceForLoanAndLeaseLossesRealEstate_cceeff09-c0ab-4ce6-bb2c-ddfc6edf346e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/MortgageLoansCreditQualityIndicatorsSFDetails" xlink:type="simple" xlink:href="fnm-20211231.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_b4cde8bb-d76f-43bf-b615-f331edd7832c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NotesReceivableGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYear_6e647911-b066-4b39-a11a-bbdda24a9620" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_b4cde8bb-d76f-43bf-b615-f331edd7832c" xlink:to="loc_us-gaap_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYear_6e647911-b066-4b39-a11a-bbdda24a9620" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear_36a7fa6a-56ee-4bfa-9a09-7b567907a2d8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_b4cde8bb-d76f-43bf-b615-f331edd7832c" xlink:to="loc_us-gaap_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear_36a7fa6a-56ee-4bfa-9a09-7b567907a2d8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedInCurrentFiscalYear_e04387df-5de7-4d31-bdaa-df71258fdf4f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinancingReceivableOriginatedInCurrentFiscalYear"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_b4cde8bb-d76f-43bf-b615-f331edd7832c" xlink:to="loc_us-gaap_FinancingReceivableOriginatedInCurrentFiscalYear_e04387df-5de7-4d31-bdaa-df71258fdf4f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYear_51c1a078-14af-4792-bbac-3a897401fea5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_b4cde8bb-d76f-43bf-b615-f331edd7832c" xlink:to="loc_us-gaap_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYear_51c1a078-14af-4792-bbac-3a897401fea5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYear_732b093c-d93e-416f-8cef-78f27316f0e4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYear"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_b4cde8bb-d76f-43bf-b615-f331edd7832c" xlink:to="loc_us-gaap_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYear_732b093c-d93e-416f-8cef-78f27316f0e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYear_9e4fbe60-125e-4a9d-8e31-dbb89af8b58f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NotesReceivableGross_b4cde8bb-d76f-43bf-b615-f331edd7832c" xlink:to="loc_us-gaap_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYear_9e4fbe60-125e-4a9d-8e31-dbb89af8b58f" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/InvestmentsinSecuritiesAvailableforsaleSecuritiesGainsLossesDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#InvestmentsinSecuritiesAvailableforsaleSecuritiesGainsLossesDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/InvestmentsinSecuritiesAvailableforsaleSecuritiesGainsLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_f8aea308-33a9-415d-a585-2a9072fe8dff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleGainLossOtherThanTemporaryImpairmentRecorded_aa2b97e0-d389-466d-bbe7-99e5de2cf93a" xlink:href="fnm-20211231.xsd#fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleGainLossOtherThanTemporaryImpairmentRecorded"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_f8aea308-33a9-415d-a585-2a9072fe8dff" xlink:to="loc_fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleGainLossOtherThanTemporaryImpairmentRecorded_aa2b97e0-d389-466d-bbe7-99e5de2cf93a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_24c632f5-d0bb-40aa-9b43-47bf8bee2772" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_f8aea308-33a9-415d-a585-2a9072fe8dff" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_24c632f5-d0bb-40aa-9b43-47bf8bee2772" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleSecuritiesOtherThanTemporaryImpairmentNotRecorded_0864b34b-b60f-4cc5-9a8c-1e427f57eeea" xlink:href="fnm-20211231.xsd#fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleSecuritiesOtherThanTemporaryImpairmentNotRecorded"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_f8aea308-33a9-415d-a585-2a9072fe8dff" xlink:to="loc_fnm_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAvailableForSaleSecuritiesOtherThanTemporaryImpairmentNotRecorded_0864b34b-b60f-4cc5-9a8c-1e427f57eeea" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/InvestmentsinSecuritiesInvestmentsClassifiedbyContractualMaturityDateDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#InvestmentsinSecuritiesInvestmentsClassifiedbyContractualMaturityDateDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/InvestmentsinSecuritiesInvestmentsClassifiedbyContractualMaturityDateDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_487e8abb-7715-46af-8edf-b09fa5f972d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis_140c5a0d-e6e0-437a-8b9c-8069e52a49d0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_487e8abb-7715-46af-8edf-b09fa5f972d6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis_140c5a0d-e6e0-437a-8b9c-8069e52a49d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_16e343ab-69f9-409e-b174-32aa4bc5b513" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_487e8abb-7715-46af-8edf-b09fa5f972d6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenAmortizedCostBasis_16e343ab-69f9-409e-b174-32aa4bc5b513" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_08994355-b44f-4e3a-93d8-ba703d9bedc0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_487e8abb-7715-46af-8edf-b09fa5f972d6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenAmortizedCostBasis_08994355-b44f-4e3a-93d8-ba703d9bedc0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_6e271215-5ae2-440f-8f0a-c3c902cc754f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_487e8abb-7715-46af-8edf-b09fa5f972d6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveAmortizedCostBasis_6e271215-5ae2-440f-8f0a-c3c902cc754f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_a2505ee7-39e9-4658-9de2-c1bbbec2ed0f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_7f9bfb76-00c2-4101-afb6-649fef21a454" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a2505ee7-39e9-4658-9de2-c1bbbec2ed0f" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue_7f9bfb76-00c2-4101-afb6-649fef21a454" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_e7bdc0fa-3f79-41d5-87e5-8ea2cbcc180c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a2505ee7-39e9-4658-9de2-c1bbbec2ed0f" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearTwoThroughFiveFairValue_e7bdc0fa-3f79-41d5-87e5-8ea2cbcc180c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue_b7e3c0bb-0d37-4387-8088-659a3cd22279" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a2505ee7-39e9-4658-9de2-c1bbbec2ed0f" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingYearSixThroughTenFairValue_b7e3c0bb-0d37-4387-8088-659a3cd22279" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_a4595453-5b71-4945-9313-a8d056cbc2e5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_a2505ee7-39e9-4658-9de2-c1bbbec2ed0f" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesRollingAfterYearTenFairValue_a4595453-5b71-4945-9313-a8d056cbc2e5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/ShortTermandLongTermDebtCharacteristicsofDebtDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#ShortTermandLongTermDebtCharacteristicsofDebtDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/ShortTermandLongTermDebtCharacteristicsofDebtDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_65db83d4-4f4a-4fe9-9487-410c2dc9f8cf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_bba81f59-e483-48b6-bbd7-5b4fd3a073f7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_65db83d4-4f4a-4fe9-9487-410c2dc9f8cf" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_bba81f59-e483-48b6-bbd7-5b4fd3a073f7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_42f068c7-4716-483b-870b-ec0ccb5a80b4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_65db83d4-4f4a-4fe9-9487-410c2dc9f8cf" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_42f068c7-4716-483b-870b-ec0ccb5a80b4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_6d6c30ba-2a07-45e8-9c40-7803cf471cca" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_65db83d4-4f4a-4fe9-9487-410c2dc9f8cf" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_6d6c30ba-2a07-45e8-9c40-7803cf471cca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_ccfdbb76-4093-49fb-bdf2-83fd5377c810" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_65db83d4-4f4a-4fe9-9487-410c2dc9f8cf" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_ccfdbb76-4093-49fb-bdf2-83fd5377c810" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_3616939b-b9c4-440d-b32e-a0e01f6ebff8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_65db83d4-4f4a-4fe9-9487-410c2dc9f8cf" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_3616939b-b9c4-440d-b32e-a0e01f6ebff8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_d5dd2eae-84df-4e1b-8ce8-25cd0fbcd07b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_65db83d4-4f4a-4fe9-9487-410c2dc9f8cf" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_d5dd2eae-84df-4e1b-8ce8-25cd0fbcd07b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/DerivativeInstrumentsScheduleofNotionalandFairValuePositionDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#DerivativeInstrumentsScheduleofNotionalandFairValuePositionDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/DerivativeInstrumentsScheduleofNotionalandFairValuePositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_348273b3-e92a-40e7-b0fd-f8ad457e93f1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_21d1ebf8-9b45-4c6b-9d53-bfdbd9a89154" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_348273b3-e92a-40e7-b0fd-f8ad457e93f1" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_21d1ebf8-9b45-4c6b-9d53-bfdbd9a89154" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_24d6d75c-5fd7-4844-ae4d-24a5ab84ec4f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_348273b3-e92a-40e7-b0fd-f8ad457e93f1" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_24d6d75c-5fd7-4844-ae4d-24a5ab84ec4f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_4ea3e969-bd95-4fdd-ae52-8b6b710c3702" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_e56e2419-b7a6-48ff-b250-eb4746d55de8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_4ea3e969-bd95-4fdd-ae52-8b6b710c3702" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_e56e2419-b7a6-48ff-b250-eb4746d55de8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_2dc59e5b-5bef-4918-b29c-bff4971c7002" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_4ea3e969-bd95-4fdd-ae52-8b6b710c3702" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_2dc59e5b-5bef-4918-b29c-bff4971c7002" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/DerivativeInstrumentsEffectofFairValueHedgeAccountingDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#DerivativeInstrumentsEffectofFairValueHedgeAccountingDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/DerivativeInstrumentsEffectofFairValueHedgeAccountingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_01040dcd-fc69-446a-bfe5-1913c7f0a312" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_ff42a5c6-10ba-43bb-a067-2f4e805ca2e1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_01040dcd-fc69-446a-bfe5-1913c7f0a312" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_ff42a5c6-10ba-43bb-a067-2f4e805ca2e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DiscontinuedHedgeRelatedBasisAdjustmentAmortization_9173532d-c2b3-41b8-9dd8-de51d649d29b" xlink:href="fnm-20211231.xsd#fnm_DiscontinuedHedgeRelatedBasisAdjustmentAmortization"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_01040dcd-fc69-446a-bfe5-1913c7f0a312" xlink:to="loc_fnm_DiscontinuedHedgeRelatedBasisAdjustmentAmortization_9173532d-c2b3-41b8-9dd8-de51d649d29b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_InterestAccrualsOnHedgingInstruments_9b08ae72-64b9-4b36-8cd5-9df33f403d1f" xlink:href="fnm-20211231.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_01040dcd-fc69-446a-bfe5-1913c7f0a312" xlink:to="loc_fnm_InterestAccrualsOnHedgingInstruments_9b08ae72-64b9-4b36-8cd5-9df33f403d1f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_c3f190fb-902b-4612-8e1b-2f3ced253360" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_01040dcd-fc69-446a-bfe5-1913c7f0a312" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_c3f190fb-902b-4612-8e1b-2f3ced253360" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/IncomeTaxesProvisionforFederalIncomeTaxesDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#IncomeTaxesProvisionforFederalIncomeTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/IncomeTaxesProvisionforFederalIncomeTaxesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_8ab9436d-201c-4c74-b02f-a71532c1498b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_f3a25ef7-cec9-4493-8080-44ce99f7c48f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_8ab9436d-201c-4c74-b02f-a71532c1498b" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_f3a25ef7-cec9-4493-8080-44ce99f7c48f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsInvestment_7ca2b15f-aae4-4955-bd70-c57ea79d2fb8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsInvestment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_8ab9436d-201c-4c74-b02f-a71532c1498b" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsInvestment_7ca2b15f-aae4-4955-bd70-c57ea79d2fb8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxSettlements_85742572-5a63-4b71-84bc-450593b97cd4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxSettlements"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_8ab9436d-201c-4c74-b02f-a71532c1498b" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxSettlements_85742572-5a63-4b71-84bc-450593b97cd4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_84d8085e-c823-4755-95d9-4011b406a7c5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_8ab9436d-201c-4c74-b02f-a71532c1498b" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_84d8085e-c823-4755-95d9-4011b406a7c5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_0be3a07d-9c6b-493d-a5fe-0c05d326ac8d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_c9e04a08-6d7b-40cf-b688-155627499575" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_0be3a07d-9c6b-493d-a5fe-0c05d326ac8d" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_c9e04a08-6d7b-40cf-b688-155627499575" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_ef701888-aab2-46df-aaa8-0310d554bab3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_0be3a07d-9c6b-493d-a5fe-0c05d326ac8d" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_ef701888-aab2-46df-aaa8-0310d554bab3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/IncomeTaxesDeferredTaxAssetsandLiabilitiesDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#IncomeTaxesDeferredTaxAssetsandLiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/IncomeTaxesDeferredTaxAssetsandLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_31454266-ebd3-47d3-a0d8-29347ef58619" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_e0d96655-9630-4ab7-a9f8-4d2567441f58" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_31454266-ebd3-47d3-a0d8-29347ef58619" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_e0d96655-9630-4ab7-a9f8-4d2567441f58" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_2c33e0d0-60a8-4d58-9680-8651cf4de484" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_31454266-ebd3-47d3-a0d8-29347ef58619" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_2c33e0d0-60a8-4d58-9680-8651cf4de484" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_098862a7-98aa-4516-b51d-53ace3bed18a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsEquityMethodInvestments_32e35eb1-cca1-44ab-8f5e-d67c3bc2664f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsEquityMethodInvestments"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_098862a7-98aa-4516-b51d-53ace3bed18a" xlink:to="loc_us-gaap_DeferredTaxAssetsEquityMethodInvestments_32e35eb1-cca1-44ab-8f5e-d67c3bc2664f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsInvestments_f7a39299-17d3-456c-87ab-f88dd61393c1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsInvestments"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_098862a7-98aa-4516-b51d-53ace3bed18a" xlink:to="loc_us-gaap_DeferredTaxAssetsInvestments_f7a39299-17d3-456c-87ab-f88dd61393c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_MortgageAndMortgageRelatedAssetsIncludingAcquiredCreditImpairedLoans_1b4e001b-7ab3-43d8-b65c-39eab592ec51" xlink:href="fnm-20211231.xsd#fnm_MortgageAndMortgageRelatedAssetsIncludingAcquiredCreditImpairedLoans"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_098862a7-98aa-4516-b51d-53ace3bed18a" xlink:to="loc_fnm_MortgageAndMortgageRelatedAssetsIncludingAcquiredCreditImpairedLoans_1b4e001b-7ab3-43d8-b65c-39eab592ec51" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsProvisionForLoanLosses_d89605eb-6319-473a-abd8-48957dd480cf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsProvisionForLoanLosses"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_098862a7-98aa-4516-b51d-53ace3bed18a" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsProvisionForLoanLosses_d89605eb-6319-473a-abd8-48957dd480cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsDerivativeInstruments_b31eaa2d-c9e1-45f4-9d51-2b2785377822" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxAssetsDerivativeInstruments"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_098862a7-98aa-4516-b51d-53ace3bed18a" xlink:to="loc_us-gaap_DeferredTaxAssetsDerivativeInstruments_b31eaa2d-c9e1-45f4-9d51-2b2785377822" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_df5d1fa0-c809-42ed-8f84-2fd3c1f50d30" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesInvestments_b031a689-3062-4d1e-926b-c66e8de70ba5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesInvestments"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_df5d1fa0-c809-42ed-8f84-2fd3c1f50d30" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesInvestments_b031a689-3062-4d1e-926b-c66e8de70ba5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_1734ca95-a1cd-449f-ae97-9356d748ee37" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_df5d1fa0-c809-42ed-8f84-2fd3c1f50d30" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_1734ca95-a1cd-449f-ae97-9356d748ee37" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/SegmentReportingScheduleofSegmentReportingDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#SegmentReportingScheduleofSegmentReportingDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/SegmentReportingScheduleofSegmentReportingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenuesNetOfInterestExpense_ad1d29d0-ae11-4503-92a4-dab99a30a544" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RevenuesNetOfInterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncomeOther_876d248f-43d5-413e-a9f1-5a9e2ed5206b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ad1d29d0-ae11-4503-92a4-dab99a30a544" xlink:to="loc_us-gaap_NoninterestIncomeOther_876d248f-43d5-413e-a9f1-5a9e2ed5206b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_ad1f813c-2a09-40e9-a385-8152050ae79d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ad1d29d0-ae11-4503-92a4-dab99a30a544" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_ad1f813c-2a09-40e9-a385-8152050ae79d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_Creditrelatedincomeexpense_bf4f4b74-6a25-4da6-a818-a8c9cafe780e" xlink:href="fnm-20211231.xsd#fnm_Creditrelatedincomeexpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ForeclosedRealEstateExpenseIncome_276e67bf-eaad-4910-a14d-17147f28b39f" xlink:href="fnm-20211231.xsd#fnm_ForeclosedRealEstateExpenseIncome"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_Creditrelatedincomeexpense_bf4f4b74-6a25-4da6-a818-a8c9cafe780e" xlink:to="loc_fnm_ForeclosedRealEstateExpenseIncome_276e67bf-eaad-4910-a14d-17147f28b39f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_fd681e4f-9d2e-4f72-a381-d08ab7940e05" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_Creditrelatedincomeexpense_bf4f4b74-6a25-4da6-a818-a8c9cafe780e" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_fd681e4f-9d2e-4f72-a381-d08ab7940e05" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_e7ede443-7236-4e0c-b9a0-c849b769320f" xlink:href="fnm-20211231.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_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_fnm_SingleFamilyGuarantyFeeTemporaryPayrollTaxCutContinuationActOf2011_e7ede443-7236-4e0c-b9a0-c849b769320f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_Creditrelatedincomeexpense_ce0fb6dd-011c-457e-8f5c-ee6c7f3dd04c" xlink:href="fnm-20211231.xsd#fnm_Creditrelatedincomeexpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_fnm_Creditrelatedincomeexpense_ce0fb6dd-011c-457e-8f5c-ee6c7f3dd04c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoninterestExpense_a2018fe1-4afb-4914-a19f-20b61c7177e6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNoninterestExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_us-gaap_OtherNoninterestExpense_a2018fe1-4afb-4914-a19f-20b61c7177e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_CreditEnhancementExpense_7c419744-a66c-4355-a3c7-9a5663626369" xlink:href="fnm-20211231.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_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_fnm_CreditEnhancementExpense_7c419744-a66c-4355-a3c7-9a5663626369" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_dc4c5f76-2d65-451d-9e00-2b7c761dac0b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GainLossOnInvestments"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_us-gaap_GainLossOnInvestments_dc4c5f76-2d65-451d-9e00-2b7c761dac0b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_2a00a95f-c6f3-4cf4-81fc-ead1b865d41d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_us-gaap_FairValueOptionChangesInFairValueGainLoss1_2a00a95f-c6f3-4cf4-81fc-ead1b865d41d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_da44c9e3-e0c4-47a6-b592-7c4c93a3c676" xlink:href="fnm-20211231.xsd#fnm_ChangeInExpectedCreditEnhancementRecoveries"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_fnm_ChangeInExpectedCreditEnhancementRecoveries_da44c9e3-e0c4-47a6-b592-7c4c93a3c676" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_fd9c9e3e-162e-445e-b657-3e1548439eae" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_fd9c9e3e-162e-445e-b657-3e1548439eae" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenuesNetOfInterestExpense_5df95369-b6fc-4639-9f07-76c27c86c467" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RevenuesNetOfInterestExpense"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_496dc82b-c0cf-4979-a71a-50fd555d9140" xlink:to="loc_us-gaap_RevenuesNetOfInterestExpense_5df95369-b6fc-4639-9f07-76c27c86c467" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/RegulatoryCapitalRequirementsDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#RegulatoryCapitalRequirementsDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/RegulatoryCapitalRequirementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DeficitOfCoreCapitalOverStatutoryMinimumCapitalRequirement_ad3f6dbf-a56a-4180-8c11-d09c601d5d77" xlink:href="fnm-20211231.xsd#fnm_DeficitOfCoreCapitalOverStatutoryMinimumCapitalRequirement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Capital_fd317f30-61bb-4402-96ce-ba2696be9a50" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Capital"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DeficitOfCoreCapitalOverStatutoryMinimumCapitalRequirement_ad3f6dbf-a56a-4180-8c11-d09c601d5d77" xlink:to="loc_us-gaap_Capital_fd317f30-61bb-4402-96ce-ba2696be9a50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalRequiredForCapitalAdequacy_8d0e7efe-f244-4e64-a6d1-d76b2cbe100e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CapitalRequiredForCapitalAdequacy"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DeficitOfCoreCapitalOverStatutoryMinimumCapitalRequirement_ad3f6dbf-a56a-4180-8c11-d09c601d5d77" xlink:to="loc_us-gaap_CapitalRequiredForCapitalAdequacy_8d0e7efe-f244-4e64-a6d1-d76b2cbe100e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/ConcentrationsofCreditRiskOtherConcentrationsDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#ConcentrationsofCreditRiskOtherConcentrationsDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/ConcentrationsofCreditRiskOtherConcentrationsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_fnm_MortgageInsuranceCoverageRiskInForce_602d93c9-ebe1-4800-8e17-8df972258319" xlink:href="fnm-20211231.xsd#fnm_MortgageInsuranceCoverageRiskInForce"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_PoolMortgageInsuranceCoverageRiskInForce_cbc4c0c3-667a-4028-adf6-f44a64ac0965" xlink:href="fnm-20211231.xsd#fnm_PoolMortgageInsuranceCoverageRiskInForce"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_MortgageInsuranceCoverageRiskInForce_602d93c9-ebe1-4800-8e17-8df972258319" xlink:to="loc_fnm_PoolMortgageInsuranceCoverageRiskInForce_cbc4c0c3-667a-4028-adf6-f44a64ac0965" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_PrimaryMortgageInsuranceCoverageRiskInForce_52494049-b764-4d7f-996f-5777d134aef5" xlink:href="fnm-20211231.xsd#fnm_PrimaryMortgageInsuranceCoverageRiskInForce"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_MortgageInsuranceCoverageRiskInForce_602d93c9-ebe1-4800-8e17-8df972258319" xlink:to="loc_fnm_PrimaryMortgageInsuranceCoverageRiskInForce_52494049-b764-4d7f-996f-5777d134aef5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/NettingArrangementsDetails" xlink:type="simple" xlink:href="fnm-20211231.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_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities_cd2da2df-d3f4-44d5-ad29-af321d62de50" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_d994d84b-6b2b-45b4-af0d-58047c7ad5ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_cd2da2df-d3f4-44d5-ad29-af321d62de50" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_d994d84b-6b2b-45b4-af0d-58047c7ad5ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_0a5960dc-7cff-4943-bb4e-561108db1cee" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_9c8aec3f-c927-44e7-87c2-0c5e1821032e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_0a5960dc-7cff-4943-bb4e-561108db1cee" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_9c8aec3f-c927-44e7-87c2-0c5e1821032e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_f4b81bf7-c89a-4344-bdde-154b3539c933" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_0a5960dc-7cff-4943-bb4e-561108db1cee" xlink:to="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_f4b81bf7-c89a-4344-bdde-154b3539c933" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_e50f51b8-0d00-4e22-9da0-0ecaab9c5755" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeCollateralRightToReclaimSecurities"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral_0a5960dc-7cff-4943-bb4e-561108db1cee" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_e50f51b8-0d00-4e22-9da0-0ecaab9c5755" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_2fb8abf0-f1fe-43a7-be9e-06348adc5e0a" xlink:href="fnm-20211231.xsd#fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_57081e21-4c0f-4c07-bc93-d1923ef89f86" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_2fb8abf0-f1fe-43a7-be9e-06348adc5e0a" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_57081e21-4c0f-4c07-bc93-d1923ef89f86" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement_b0ad3815-ab5c-48aa-b2e9-973368762a73" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_2fb8abf0-f1fe-43a7-be9e-06348adc5e0a" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement_b0ad3815-ab5c-48aa-b2e9-973368762a73" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_2a6b93e5-11d8-4558-be33-31f34218bfd6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_b1f57a70-e100-4d8a-9bc0-8187d89f881b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_2a6b93e5-11d8-4558-be33-31f34218bfd6" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_b1f57a70-e100-4d8a-9bc0-8187d89f881b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_09d8d621-1cc5-4526-9454-2fa84546ef95" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_2a6b93e5-11d8-4558-be33-31f34218bfd6" xlink:to="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_09d8d621-1cc5-4526-9454-2fa84546ef95" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_4804267c-88dd-4cc6-bd7a-9aae7c93ca58" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_2a6b93e5-11d8-4558-be33-31f34218bfd6" xlink:to="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_4804267c-88dd-4cc6-bd7a-9aae7c93ca58" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_91c0b0cf-c6f6-4209-ab78-93f00b27a5c1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_cee1480c-7d4a-4046-be95-61e676130f9d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_91c0b0cf-c6f6-4209-ab78-93f00b27a5c1" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_cee1480c-7d4a-4046-be95-61e676130f9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_eb189d37-8e9e-4289-a4d0-423fcb813165" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountNotOffsetAgainstCollateral_91c0b0cf-c6f6-4209-ab78-93f00b27a5c1" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_eb189d37-8e9e-4289-a4d0-423fcb813165" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedSubjectToMasterNettingArrangements_fef4c13d-9883-454d-b363-444042474d19" xlink:href="fnm-20211231.xsd#fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedSubjectToMasterNettingArrangements"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross_d28f1efd-4e66-49c7-9339-c240c27e89d9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedSubjectToMasterNettingArrangements_fef4c13d-9883-454d-b363-444042474d19" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross_d28f1efd-4e66-49c7-9339-c240c27e89d9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset_c5e91369-3e7c-4705-aabf-033f10459bfb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedSubjectToMasterNettingArrangements_fef4c13d-9883-454d-b363-444042474d19" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset_c5e91369-3e7c-4705-aabf-033f10459bfb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_45ccdf19-3045-4f92-9440-0c7815c31e5a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedSubjectToMasterNettingArrangements_0440e601-2edf-4624-a2a4-56189f3dbf30" xlink:href="fnm-20211231.xsd#fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedSubjectToMasterNettingArrangements"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_45ccdf19-3045-4f92-9440-0c7815c31e5a" xlink:to="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedSubjectToMasterNettingArrangements_0440e601-2edf-4624-a2a4-56189f3dbf30" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_c17f6179-88c3-4cba-933f-94d1862b97fe" xlink:href="fnm-20211231.xsd#fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAmountOffsetAgainstCollateral_45ccdf19-3045-4f92-9440-0c7815c31e5a" xlink:to="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_c17f6179-88c3-4cba-933f-94d1862b97fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities_86d14dc3-8016-4f1a-ba1f-9cc19a9e9386" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_45ccdf19-3045-4f92-9440-0c7815c31e5a" xlink:to="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedCollateralRightToReclaimSecurities_86d14dc3-8016-4f1a-ba1f-9cc19a9e9386" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_31beee37-5167-469c-8759-1b7a8917a11d" xlink:href="fnm-20211231.xsd#fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_48905a2d-f845-4436-bbc3-94ab61f84315" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_31beee37-5167-469c-8759-1b7a8917a11d" xlink:to="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_48905a2d-f845-4436-bbc3-94ab61f84315" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_ae048462-4fc9-4381-adc3-61dcc3d22a50" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_31beee37-5167-469c-8759-1b7a8917a11d" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_ae048462-4fc9-4381-adc3-61dcc3d22a50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross_f064572d-ded6-4283-afa9-57fdc9cc9e21" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_6c576796-0e11-4725-97e6-67132c41b709" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_f064572d-ded6-4283-afa9-57fdc9cc9e21" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_6c576796-0e11-4725-97e6-67132c41b709" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_9a912f44-3b8e-4fa8-aa25-637a5224274f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_f1e43e21-d6d9-4fbb-8e17-70e509bfd419" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_9a912f44-3b8e-4fa8-aa25-637a5224274f" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_f1e43e21-d6d9-4fbb-8e17-70e509bfd419" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_cc82d9de-00c2-48a4-8a46-ebaaab9ccc77" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_DerivativeFairValueOfDerivativeAssetAmountNotOffsetAgainstCollateral_9a912f44-3b8e-4fa8-aa25-637a5224274f" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_cc82d9de-00c2-48a4-8a46-ebaaab9ccc77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_d3435a24-6858-4bec-9b41-54a598dee8a7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_5ededaa2-5edb-48de-8148-391c8026875e" xlink:href="fnm-20211231.xsd#fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_d3435a24-6858-4bec-9b41-54a598dee8a7" xlink:to="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_5ededaa2-5edb-48de-8148-391c8026875e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_41db961e-8597-408a-8c32-862d91a5a60e" xlink:href="fnm-20211231.xsd#fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_d3435a24-6858-4bec-9b41-54a598dee8a7" xlink:to="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_41db961e-8597-408a-8c32-862d91a5a60e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities_852b2478-0774-4982-8079-53892a63bb2f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_d3435a24-6858-4bec-9b41-54a598dee8a7" xlink:to="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities_852b2478-0774-4982-8079-53892a63bb2f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_695a8faf-f2ff-487c-9934-1b304eaf10b3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_226e916b-4425-4def-8c29-61ca0f348836" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_695a8faf-f2ff-487c-9934-1b304eaf10b3" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotOffsetPolicyElectionDeduction_226e916b-4425-4def-8c29-61ca0f348836" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_d5970080-818d-423c-9e3d-f5503e219647" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_695a8faf-f2ff-487c-9934-1b304eaf10b3" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_d5970080-818d-423c-9e3d-f5503e219647" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement_4193fc2f-0177-460c-b0ce-97bb9cf219e2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_695a8faf-f2ff-487c-9934-1b304eaf10b3" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellNotSubjectToMasterNettingArrangement_4193fc2f-0177-460c-b0ce-97bb9cf219e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_af2249de-6c04-4659-9994-0df1639e6b19" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_384027ce-e034-4c8f-b8ea-c05885ab8e49" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_af2249de-6c04-4659-9994-0df1639e6b19" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_384027ce-e034-4c8f-b8ea-c05885ab8e49" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellGross_626644d5-d879-41c0-be07-bb5728c208c5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_af2249de-6c04-4659-9994-0df1639e6b19" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellGross_626644d5-d879-41c0-be07-bb5728c208c5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_e5d454dd-ca37-4499-8e11-0e093a8ebb16" xlink:href="fnm-20211231.xsd#fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_50e98cb1-983f-463f-873c-3444a73be2f3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSubjectToMasterNettingArrangementNotOffsetFinancialInstruments_e5d454dd-ca37-4499-8e11-0e093a8ebb16" xlink:to="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_50e98cb1-983f-463f-873c-3444a73be2f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset_963e4be0-9ce4-44c2-95f5-6f052acbcc1e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilitySecuritiesSoldUnderAgreementsToResellSecuritiesLoanedAsset"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_506e2364-27ae-4eb7-9298-55093a58094f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_963e4be0-9ce4-44c2-95f5-6f052acbcc1e" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_506e2364-27ae-4eb7-9298-55093a58094f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities_e2c490d8-79e4-4787-93ec-b6badc0c3ffb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedCollateralObligationToReturnSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_30c92b5d-4f63-4281-913a-64869283852c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_e2c490d8-79e4-4787-93ec-b6badc0c3ffb" xlink:to="loc_us-gaap_DerivativeCollateralObligationToReturnSecurities_30c92b5d-4f63-4281-913a-64869283852c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_def9b89f-d068-4491-9e14-cc42987ade0d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_e2c490d8-79e4-4787-93ec-b6badc0c3ffb" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellCollateralObligationToReturnSecurities_def9b89f-d068-4491-9e14-cc42987ade0d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_b70b7daf-3d21-4964-bd50-0281daefc8fe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_e5ca6eff-0272-44b1-ba5f-a603f06d19e0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_b70b7daf-3d21-4964-bd50-0281daefc8fe" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_e5ca6eff-0272-44b1-ba5f-a603f06d19e0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellLiability_0c653ac9-b49f-4f0f-81c8-2fbdee3cc600" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_b70b7daf-3d21-4964-bd50-0281daefc8fe" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellLiability_0c653ac9-b49f-4f0f-81c8-2fbdee3cc600" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/NettingArrangementsDetails_1" xlink:type="simple" xlink:href="fnm-20211231.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_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_152eebc9-4c5f-4144-9540-a544e2eeca98" xlink:href="fnm-20211231.xsd#fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_82d133a0-2799-4493-af3f-36ed333cbdfa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_152eebc9-4c5f-4144-9540-a544e2eeca98" xlink:to="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedGross_82d133a0-2799-4493-af3f-36ed333cbdfa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_239fcd27-82c9-4eb9-aa83-0d97dffed059" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_fnm_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedSubjectToMasterNettingArrangement_152eebc9-4c5f-4144-9540-a544e2eeca98" xlink:to="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedLiability_239fcd27-82c9-4eb9-aa83-0d97dffed059" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral_2de35882-293b-48fb-9c85-cc8295c1777c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssetSecuritiesPurchasedUnderAgreementsToResellSecuritiesBorrowedAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_7142d887-8909-4d63-88b9-c78036196242" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_2de35882-293b-48fb-9c85-cc8295c1777c" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_7142d887-8909-4d63-88b9-c78036196242" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_e97a7d8f-7f02-489b-afd6-2580c68bdd3c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_2de35882-293b-48fb-9c85-cc8295c1777c" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResellAmountOffsetAgainstCollateral_e97a7d8f-7f02-489b-afd6-2580c68bdd3c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/FairValueRecurringChangesinFairValueDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#FairValueRecurringChangesinFairValueDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/FairValueRecurringChangesinFairValueDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_e975a2f1-815a-476c-bf27-0e4f0b5f32cd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtFairValue_fd1b707c-e2cd-47aa-802b-5f53da27de5c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e975a2f1-815a-476c-bf27-0e4f0b5f32cd" xlink:to="loc_us-gaap_LongTermDebtFairValue_fd1b707c-e2cd-47aa-802b-5f53da27de5c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_19996904-b9e2-4515-a28d-5b072d671789" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e975a2f1-815a-476c-bf27-0e4f0b5f32cd" xlink:to="loc_us-gaap_DerivativeLiabilities_19996904-b9e2-4515-a28d-5b072d671789" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShorttermDebtFairValue_33a2382d-aab3-477b-b7fc-b8c42a3c9dbf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShorttermDebtFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e975a2f1-815a-476c-bf27-0e4f0b5f32cd" xlink:to="loc_us-gaap_ShorttermDebtFairValue_33a2382d-aab3-477b-b7fc-b8c42a3c9dbf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteesFairValueDisclosure_8f606af4-af2e-455c-8369-a015e22b4baf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GuaranteesFairValueDisclosure"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_e975a2f1-815a-476c-bf27-0e4f0b5f32cd" xlink:to="loc_us-gaap_GuaranteesFairValueDisclosure_8f606af4-af2e-455c-8369-a015e22b4baf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/FairValueFinancialInstrumentsDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#FairValueFinancialInstrumentsDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/FairValueFinancialInstrumentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgagesHeldForSaleFairValueDisclosure_e096b738-309f-47e7-94c6-c57d4331bcd7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MortgagesHeldForSaleFairValueDisclosure"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_us-gaap_MortgagesHeldForSaleFairValueDisclosure_e096b738-309f-47e7-94c6-c57d4331bcd7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_GuarantyAssetsAndBuyUpsFairValueDisclosure_95918737-895f-48af-b28a-e39bcfc35dd4" xlink:href="fnm-20211231.xsd#fnm_GuarantyAssetsAndBuyUpsFairValueDisclosure"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_fnm_GuarantyAssetsAndBuyUpsFairValueDisclosure_95918737-895f-48af-b28a-e39bcfc35dd4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_dba2d762-6cb9-4934-8c95-4970aecac67f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_us-gaap_DerivativeAssets_dba2d762-6cb9-4934-8c95-4970aecac67f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_AdvancesToLendersFairValueDisclosure_cefe17eb-c02b-48ca-bc6c-1815bbcc7137" xlink:href="fnm-20211231.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_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_fnm_AdvancesToLendersFairValueDisclosure_cefe17eb-c02b-48ca-bc6c-1815bbcc7137" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansReceivableFairValueDisclosure_678e0f09-cdb1-4ef0-874e-015c54e8fb48" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LoansReceivableFairValueDisclosure"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_us-gaap_LoansReceivableFairValueDisclosure_678e0f09-cdb1-4ef0-874e-015c54e8fb48" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_00885b9c-b319-48e5-86ee-8c7685ec614a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_00885b9c-b319-48e5-86ee-8c7685ec614a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalFundsSoldAndSecuritiesBorrowedOrPurchasedUnderAgreementsToResellFairValueDisclosure_26942e28-7839-41b5-86fd-ff6a9a71c12c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.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_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_us-gaap_FederalFundsSoldAndSecuritiesBorrowedOrPurchasedUnderAgreementsToResellFairValueDisclosure_26942e28-7839-41b5-86fd-ff6a9a71c12c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_fnm_CashCashEquivalentsAndRestrictedCashFairValueDisclosure_232acba1-2291-4c67-bede-66b6cc6cdc2a" xlink:href="fnm-20211231.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_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_fnm_CashCashEquivalentsAndRestrictedCashFairValueDisclosure_232acba1-2291-4c67-bede-66b6cc6cdc2a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecurities_7f718113-1fe4-4d9e-b7d6-7934a02c268e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TradingSecurities"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_ecfee5e8-45ca-4bd3-b427-f1dd82513f6d" xlink:to="loc_us-gaap_TradingSecurities_7f718113-1fe4-4d9e-b7d6-7934a02c268e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.fanniemae.com/role/CommitmentsandContingenciesScheduleofFiscalYearMaturityDetails" xlink:type="simple" xlink:href="fnm-20211231.xsd#CommitmentsandContingenciesScheduleofFiscalYearMaturityDetails"/>
  <link:calculationLink xlink:role="http://www.fanniemae.com/role/CommitmentsandContingenciesScheduleofFiscalYearMaturityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCommitment_850d9a91-1b71-4e01-8d0e-bb036393308c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherCommitment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCommitmentDueInNextTwelveMonths_f1b5c7c5-5812-4bf5-9816-92e7279c9429" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherCommitmentDueInNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherCommitment_850d9a91-1b71-4e01-8d0e-bb036393308c" xlink:to="loc_us-gaap_OtherCommitmentDueInNextTwelveMonths_f1b5c7c5-5812-4bf5-9816-92e7279c9429" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCommitmentDueInSecondYear_b4be0b91-e030-4b50-b045-acd0c6e76f4a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherCommitmentDueInSecondYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherCommitment_850d9a91-1b71-4e01-8d0e-bb036393308c" xlink:to="loc_us-gaap_OtherCommitmentDueInSecondYear_b4be0b91-e030-4b50-b045-acd0c6e76f4a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCommitmentDueInThirdYear_a2ba84da-8472-49ae-8c9f-9f57d725be56" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherCommitmentDueInThirdYear"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherCommitment_850d9a91-1b71-4e01-8d0e-bb036393308c" xlink:to="loc_us-gaap_OtherCommitmentDueInThirdYear_a2ba84da-8472-49ae-8c9f-9f57d725be56" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCommitmentDueInFourthYear_7d5496e1-0758-48a5-9b5c-3c51ac20eada" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherCommitmentDueInFourthYear"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherCommitment_850d9a91-1b71-4e01-8d0e-bb036393308c" xlink:to="loc_us-gaap_OtherCommitmentDueInFourthYear_7d5496e1-0758-48a5-9b5c-3c51ac20eada" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCommitmentDueInFifthYear_2aad3ebd-6ef8-4cee-b39f-b8c5502b74a8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherCommitmentDueInFifthYear"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherCommitment_850d9a91-1b71-4e01-8d0e-bb036393308c" xlink:to="loc_us-gaap_OtherCommitmentDueInFifthYear_2aad3ebd-6ef8-4cee-b39f-b8c5502b74a8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherCommitmentDueAfterFifthYear_6ee1c5a3-f1d1-49b1-a8b4-a989f89e7152" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherCommitmentDueAfterFifthYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherCommitment_850d9a91-1b71-4e01-8d0e-bb036393308c" xlink:to="loc_us-gaap_OtherCommitmentDueAfterFifthYear_6ee1c5a3-f1d1-49b1-a8b4-a989f89e7152" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_36ada751-f1a7-4c80-b9ba-ef860d2a4212" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_283956e4-2762-462b-a5bc-5e91a0a44163" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_36ada751-f1a7-4c80-b9ba-ef860d2a4212" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_283956e4-2762-462b-a5bc-5e91a0a44163" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_376b1715-43bf-4bc2-8e4c-b09daa16d54c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_36ada751-f1a7-4c80-b9ba-ef860d2a4212" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_376b1715-43bf-4bc2-8e4c-b09daa16d54c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_be1292a0-cde6-477d-8e00-6e1efc8b1e64" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_36ada751-f1a7-4c80-b9ba-ef860d2a4212" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_be1292a0-cde6-477d-8e00-6e1efc8b1e64" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_772f92c9-5cfd-4556-8f92-233055f8a0e9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_36ada751-f1a7-4c80-b9ba-ef860d2a4212" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_772f92c9-5cfd-4556-8f92-233055f8a0e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_cfcb55f1-91d6-4013-9138-d6a931aa0f30" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_36ada751-f1a7-4c80-b9ba-ef860d2a4212" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_cfcb55f1-91d6-4013-9138-d6a931aa0f30" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_391f7fb6-23a3-4706-97eb-6212d9057296" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_36ada751-f1a7-4c80-b9ba-ef860d2a4212" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_391f7fb6-23a3-4706-97eb-6212d9057296" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PurchaseObligation_c286e467-66b4-4e44-bec4-650be45c09da" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PurchaseObligation"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PurchaseObligationDueInNextTwelveMonths_eb190890-41a2-40ed-b900-ab816279c9b7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PurchaseObligationDueInNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PurchaseObligation_c286e467-66b4-4e44-bec4-650be45c09da" xlink:to="loc_us-gaap_PurchaseObligationDueInNextTwelveMonths_eb190890-41a2-40ed-b900-ab816279c9b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PurchaseObligationDueInSecondYear_673dbeb6-911c-4497-ae38-b02eda9c4c63" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PurchaseObligationDueInSecondYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PurchaseObligation_c286e467-66b4-4e44-bec4-650be45c09da" xlink:to="loc_us-gaap_PurchaseObligationDueInSecondYear_673dbeb6-911c-4497-ae38-b02eda9c4c63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PurchaseObligationDueInThirdYear_f4c17f13-f1a8-4940-910f-ad16a359a5b2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PurchaseObligationDueInThirdYear"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PurchaseObligation_c286e467-66b4-4e44-bec4-650be45c09da" xlink:to="loc_us-gaap_PurchaseObligationDueInThirdYear_f4c17f13-f1a8-4940-910f-ad16a359a5b2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PurchaseObligationDueInFourthYear_fe13c512-7429-49f4-a3f4-dbb80fab9808" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PurchaseObligationDueInFourthYear"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PurchaseObligation_c286e467-66b4-4e44-bec4-650be45c09da" xlink:to="loc_us-gaap_PurchaseObligationDueInFourthYear_fe13c512-7429-49f4-a3f4-dbb80fab9808" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PurchaseObligationDueInFifthYear_6d05ea7c-e5ed-4a29-a3e6-09f9e3de7a23" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PurchaseObligationDueInFifthYear"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PurchaseObligation_c286e467-66b4-4e44-bec4-650be45c09da" xlink:to="loc_us-gaap_PurchaseObligationDueInFifthYear_6d05ea7c-e5ed-4a29-a3e6-09f9e3de7a23" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PurchaseObligationDueAfterFifthYear_0953e1b6-3b01-4ea9-b642-0d5ac49d8020" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PurchaseObligationDueAfterFifthYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PurchaseObligation_c286e467-66b4-4e44-bec4-650be45c09da" xlink:to="loc_us-gaap_PurchaseObligationDueAfterFifthYear_0953e1b6-3b01-4ea9-b642-0d5ac49d8020" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
