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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:8cdb58fd-4801-4927-8001-b7d32b49f943,g:f287e148-ef87-4472-bb01-3c8c361cfed7-->
<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.farmermac.com/role/CONSOLIDATEDBALANCESHEETSunaudited" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDBALANCESHEETSunaudited"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDBALANCESHEETSunaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtNetOfHedgingAdjustments_5667c5cc-fc8b-478d-af17-b5a3812d7b63" xlink:href="agm-20240331.xsd#agm_LongTermDebtNetOfHedgingAdjustments"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_agm_LongTermDebtNetOfHedgingAdjustments_5667c5cc-fc8b-478d-af17-b5a3812d7b63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LiabilitiesHeldInTrust_055dc238-53ae-47ef-8275-dc642cfbb3cf" xlink:href="agm-20240331.xsd#agm_LiabilitiesHeldInTrust"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_agm_LiabilitiesHeldInTrust_055dc238-53ae-47ef-8275-dc642cfbb3cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_f74f665a-208a-4362-ba42-35321c6f4ce1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_us-gaap_DerivativeLiabilities_f74f665a-208a-4362-ba42-35321c6f4ce1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_e47b581f-1e99-468d-8b43-aba070206b70" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestPayableCurrentAndNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_e47b581f-1e99-468d-8b43-aba070206b70" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuarantyLiabilities_224a1ca3-ad63-4d45-b787-8b2c5976534f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuarantyLiabilities"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_us-gaap_GuarantyLiabilities_224a1ca3-ad63-4d45-b787-8b2c5976534f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableAndOtherAccruedLiabilities_42fb870b-26cf-4956-aa83-858c88db0a61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableAndOtherAccruedLiabilities"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_us-gaap_AccountsPayableAndOtherAccruedLiabilities_42fb870b-26cf-4956-aa83-858c88db0a61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ReserveForLosses_ebc90164-bedd-482a-8300-7be9665053e4" xlink:href="agm-20240331.xsd#agm_ReserveForLosses"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_agm_ReserveForLosses_ebc90164-bedd-482a-8300-7be9665053e4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_4889e0cf-1869-4671-bb31-2b7b01339e09" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_3acc6886-c38e-475c-91a6-c99e7693b131" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_4889e0cf-1869-4671-bb31-2b7b01339e09" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_fd01122d-1ee2-4f0a-9659-5be01b1b3eac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MarketableSecurities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_b15a229c-921e-4911-8b0d-cb3e7995c378" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_fd01122d-1ee2-4f0a-9659-5be01b1b3eac" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_b15a229c-921e-4911-8b0d-cb3e7995c378" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_a0924017-609b-476a-9bf7-08cd9c8cc4ff" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MarketableSecurities_fd01122d-1ee2-4f0a-9659-5be01b1b3eac" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_a0924017-609b-476a-9bf7-08cd9c8cc4ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInvestments_ede3550e-e260-439b-8eaa-36d3c2ea9771" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherInvestments"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MarketableSecurities_fd01122d-1ee2-4f0a-9659-5be01b1b3eac" xlink:to="loc_us-gaap_OtherInvestments_ede3550e-e260-439b-8eaa-36d3c2ea9771" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecurities_49002f5e-7712-440b-bc11-266fb1de81c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TradingSecurities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_MarketableSecurities_fd01122d-1ee2-4f0a-9659-5be01b1b3eac" xlink:to="loc_us-gaap_TradingSecurities_49002f5e-7712-440b-bc11-266fb1de81c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_a20dc358-fa37-40da-87d7-f31deb31325d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_a20dc358-fa37-40da-87d7-f31deb31325d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_0a911317-e1b3-46a4-8f9b-c551dfcfc934" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MarketableSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_MarketableSecurities_0a911317-e1b3-46a4-8f9b-c551dfcfc934" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_7dd583b2-79ac-43f2-8229-c11dc6fc877d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_7dd583b2-79ac-43f2-8229-c11dc6fc877d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_8b801c50-b744-4453-b2bf-4c63465e3072" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssets"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_DerivativeAssets_8b801c50-b744-4453-b2bf-4c63465e3072" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestReceivable_40b65abb-b5b5-4e8f-a5ce-0c573662b5ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestReceivable"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_InterestReceivable_40b65abb-b5b5-4e8f-a5ce-0c573662b5ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuarantyAssets_fe218e79-2132-4431-aec7-24d0ffcddc04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuarantyAssets"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_GuarantyAssets_fe218e79-2132-4431-aec7-24d0ffcddc04" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_997c7411-7a17-43d0-a0ba-eec064250d7c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_997c7411-7a17-43d0-a0ba-eec064250d7c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssets_be92c6e5-dd2e-4152-ab85-2e6b2fca9541" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PrepaidExpenseAndOtherAssets"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_0083ae31-d574-48d8-a94a-1da482e6d367" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssets_be92c6e5-dd2e-4152-ab85-2e6b2fca9541" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_b7453987-3a13-4f38-9979-81d37b7639b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_caea2919-a038-4975-94a1-91b6cfba5d82" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_b7453987-3a13-4f38-9979-81d37b7639b8" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_caea2919-a038-4975-94a1-91b6cfba5d82" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossHeldInTrust_1e5fcdfd-d08c-404d-96c5-2a2b31e171b7" xlink:href="agm-20240331.xsd#agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossHeldInTrust"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_b7453987-3a13-4f38-9979-81d37b7639b8" xlink:to="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossHeldInTrust_1e5fcdfd-d08c-404d-96c5-2a2b31e171b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_faffb845-9b8c-43ce-bba4-16c22e1642f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_b7453987-3a13-4f38-9979-81d37b7639b8" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_faffb845-9b8c-43ce-bba4-16c22e1642f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_71a54422-366d-489f-9737-43b63fd1bf82" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_4a1b9b42-feb8-46bc-ac78-636af3ece5ce" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_71a54422-366d-489f-9737-43b63fd1bf82" xlink:to="loc_us-gaap_Liabilities_4a1b9b42-feb8-46bc-ac78-636af3ece5ce" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_ce91e1e0-670e-4974-a129-55876c306e04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_71a54422-366d-489f-9737-43b63fd1bf82" xlink:to="loc_us-gaap_StockholdersEquity_ce91e1e0-670e-4974-a129-55876c306e04" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_8f7a7bfd-bb3a-4cad-a7bd-03d6695e860d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_71a54422-366d-489f-9737-43b63fd1bf82" xlink:to="loc_us-gaap_CommitmentsAndContingencies_8f7a7bfd-bb3a-4cad-a7bd-03d6695e860d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_299bdf86-c5f6-47c2-a604-194027056c95" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_ed691480-47bf-4e01-97f3-1a730dda2d7c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_299bdf86-c5f6-47c2-a604-194027056c95" xlink:to="loc_us-gaap_PreferredStockValue_ed691480-47bf-4e01-97f3-1a730dda2d7c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_157724b9-a32d-4209-a2e3-a35833eb03d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_299bdf86-c5f6-47c2-a604-194027056c95" xlink:to="loc_us-gaap_CommonStockValue_157724b9-a32d-4209-a2e3-a35833eb03d2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_42356d4c-898a-4ae6-801f-a38e5c76f0ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_299bdf86-c5f6-47c2-a604-194027056c95" xlink:to="loc_us-gaap_AdditionalPaidInCapital_42356d4c-898a-4ae6-801f-a38e5c76f0ec" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_b6091c2e-af00-4bb2-a01b-56fe24c86605" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_299bdf86-c5f6-47c2-a604-194027056c95" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_b6091c2e-af00-4bb2-a01b-56fe24c86605" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_8271c65d-95b2-4230-ad96-a70a54d674fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_299bdf86-c5f6-47c2-a604-194027056c95" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_8271c65d-95b2-4230-ad96-a70a54d674fa" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFOPERATIONSunaudited" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDSTATEMENTSOFOPERATIONSunaudited"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFOPERATIONSunaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_27e0eb33-032b-42fe-9032-9238fade840f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_c471b74a-ae37-4a4e-bc6a-bc8e35ad4dc9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndDividendIncomeOperating"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNet_27e0eb33-032b-42fe-9032-9238fade840f" xlink:to="loc_us-gaap_InterestAndDividendIncomeOperating_c471b74a-ae37-4a4e-bc6a-bc8e35ad4dc9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_695bc921-98c7-4f1d-833a-635ff929d508" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseNet_27e0eb33-032b-42fe-9032-9238fade840f" xlink:to="loc_us-gaap_InterestExpense_695bc921-98c7-4f1d-833a-635ff929d508" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeOperating_57f5a2fb-0bc0-4986-b09a-e55f7a78be25" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndDividendIncomeOperating"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_1d270cfd-5185-4ef7-a3f4-a01ef1ea7c6b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndFeeIncomeLoansAndLeases"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_57f5a2fb-0bc0-4986-b09a-e55f7a78be25" xlink:to="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_1d270cfd-5185-4ef7-a3f4-a01ef1ea7c6b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeSecurities_822a567e-1eab-4bbc-9d95-4e4f2f0cb798" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndDividendIncomeSecurities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_57f5a2fb-0bc0-4986-b09a-e55f7a78be25" xlink:to="loc_us-gaap_InterestAndDividendIncomeSecurities_822a567e-1eab-4bbc-9d95-4e4f2f0cb798" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_0c919dbf-06e9-4f3f-91b6-97b6815f8ebd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestAndDividendIncomeOperating_57f5a2fb-0bc0-4986-b09a-e55f7a78be25" xlink:to="loc_us-gaap_InvestmentIncomeInterest_0c919dbf-06e9-4f3f-91b6-97b6815f8ebd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_3e44d471-16d3-48fa-9e9e-3076d4a1cf1c" xlink:href="agm-20240331.xsd#agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RegulatoryFees_b3d9fd9b-e9e9-496d-9a45-c104a8ae15e6" xlink:href="agm-20240331.xsd#agm_RegulatoryFees"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_3e44d471-16d3-48fa-9e9e-3076d4a1cf1c" xlink:to="loc_agm_RegulatoryFees_b3d9fd9b-e9e9-496d-9a45-c104a8ae15e6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_9d903569-31cb-493d-832f-cd00f2365099" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_3e44d471-16d3-48fa-9e9e-3076d4a1cf1c" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_9d903569-31cb-493d-832f-cd00f2365099" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_752eab73-f2b9-455b-baa8-b503fee46da0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LaborAndRelatedExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_3e44d471-16d3-48fa-9e9e-3076d4a1cf1c" xlink:to="loc_us-gaap_LaborAndRelatedExpense_752eab73-f2b9-455b-baa8-b503fee46da0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f97639a1-cd5c-4206-be29-4185420d503e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_aa05b407-31fe-486f-86e2-7ab9a295e5be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f97639a1-cd5c-4206-be29-4185420d503e" xlink:to="loc_us-gaap_NetIncomeLoss_aa05b407-31fe-486f-86e2-7ab9a295e5be" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_869943bb-1597-463d-bf9d-dfc0db8c60e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockDividendsIncomeStatementImpact"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f97639a1-cd5c-4206-be29-4185420d503e" xlink:to="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_869943bb-1597-463d-bf9d-dfc0db8c60e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_8905297a-b49e-4aac-ab5d-61eca83d13f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestIncome"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_1fb199f4-6ffc-4d6e-8571-2e6e4a7d1b24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestIncomeOtherOperatingIncome"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_8905297a-b49e-4aac-ab5d-61eca83d13f8" xlink:to="loc_us-gaap_NoninterestIncomeOtherOperatingIncome_1fb199f4-6ffc-4d6e-8571-2e6e4a7d1b24" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions_328e0da1-f26c-4737-be1c-f06eee49ac9f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_8905297a-b49e-4aac-ab5d-61eca83d13f8" xlink:to="loc_us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions_328e0da1-f26c-4737-be1c-f06eee49ac9f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDerivativeInstrumentsNetPretax_31bb24f3-96cc-477f-bc72-b59c7f32dbe4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnDerivativeInstrumentsNetPretax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_8905297a-b49e-4aac-ab5d-61eca83d13f8" xlink:to="loc_us-gaap_GainLossOnDerivativeInstrumentsNetPretax_31bb24f3-96cc-477f-bc72-b59c7f32dbe4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForOtherCreditLosses_6c80ffc1-cbc4-4f60-a114-e976e3b0eb78" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForOtherCreditLosses"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestIncome_8905297a-b49e-4aac-ab5d-61eca83d13f8" xlink:to="loc_us-gaap_ProvisionForOtherCreditLosses_6c80ffc1-cbc4-4f60-a114-e976e3b0eb78" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_bcbcbd44-3f7f-4a61-b7bb-17329f91af06" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ProvisionForLoanAndSecuritiesLosses_b0eaafb2-ab38-49c5-83a7-99fb8ba1a54a" xlink:href="agm-20240331.xsd#agm_ProvisionForLoanAndSecuritiesLosses"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_bcbcbd44-3f7f-4a61-b7bb-17329f91af06" xlink:to="loc_agm_ProvisionForLoanAndSecuritiesLosses_b0eaafb2-ab38-49c5-83a7-99fb8ba1a54a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_e19b4a0e-5b2c-48b7-a35c-1b32f5dd8946" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_bcbcbd44-3f7f-4a61-b7bb-17329f91af06" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_e19b4a0e-5b2c-48b7-a35c-1b32f5dd8946" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_b0319142-4499-4448-b9ca-1952b5584cd3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_a7444ba8-0c4d-4f3b-87e0-186f2f81728b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_b0319142-4499-4448-b9ca-1952b5584cd3" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_a7444ba8-0c4d-4f3b-87e0-186f2f81728b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_386d3edd-7017-444e-bc8d-9f4e35586970" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_b0319142-4499-4448-b9ca-1952b5584cd3" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_386d3edd-7017-444e-bc8d-9f4e35586970" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dde4ca7d-12ff-4265-b600-d59c2c9813ff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_aafc1ffc-9697-4266-a55f-a66099d54c65" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_dde4ca7d-12ff-4265-b600-d59c2c9813ff" xlink:to="loc_us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss_aafc1ffc-9697-4266-a55f-a66099d54c65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_53b4b53c-41a5-4b0e-90c1-bce333038a2d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_dde4ca7d-12ff-4265-b600-d59c2c9813ff" xlink:to="loc_us-gaap_NoninterestIncome_53b4b53c-41a5-4b0e-90c1-bce333038a2d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_79d92c3e-5b20-4708-878f-1e680d9cd549" xlink:href="agm-20240331.xsd#agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_dde4ca7d-12ff-4265-b600-d59c2c9813ff" xlink:to="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_79d92c3e-5b20-4708-878f-1e680d9cd549" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEunaudited" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEunaudited"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEunaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cc6d59fc-6a5a-4114-98dc-5aedfa0a37a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_OtherComprehensiveIncomeLossHeldToMaturitySecuritiesBeforeTax_31236041-17ca-4d6a-b753-ab51d8dec812" xlink:href="agm-20240331.xsd#agm_OtherComprehensiveIncomeLossHeldToMaturitySecuritiesBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cc6d59fc-6a5a-4114-98dc-5aedfa0a37a9" xlink:to="loc_agm_OtherComprehensiveIncomeLossHeldToMaturitySecuritiesBeforeTax_31236041-17ca-4d6a-b753-ab51d8dec812" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentBeforeTax_04a0162c-010f-45e7-b40d-d1e7c310034e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentBeforeTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cc6d59fc-6a5a-4114-98dc-5aedfa0a37a9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentBeforeTax_04a0162c-010f-45e7-b40d-d1e7c310034e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_2961e6e7-e379-4a38-af5f-c1c7dffbde76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_cc6d59fc-6a5a-4114-98dc-5aedfa0a37a9" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_2961e6e7-e379-4a38-af5f-c1c7dffbde76" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_5b547997-6f73-47a0-b980-a081ebab5af8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_e67595b1-c998-4005-87f5-ea66f64b185c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_ComprehensiveIncomeNetOfTax_5b547997-6f73-47a0-b980-a081ebab5af8" xlink:to="loc_us-gaap_ProfitLoss_e67595b1-c998-4005-87f5-ea66f64b185c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_33fcd1a5-beef-489b-85b3-5d13f7f14382" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_5b547997-6f73-47a0-b980-a081ebab5af8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_33fcd1a5-beef-489b-85b3-5d13f7f14382" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_1cb75079-081f-4b7d-a7cb-c0140f006643" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_0210c9f3-cbcb-4d60-8970-2489e4bf2969" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_1cb75079-081f-4b7d-a7cb-c0140f006643" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_0210c9f3-cbcb-4d60-8970-2489e4bf2969" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_ad6bf7da-5316-4012-9f50-dbd4b2c80608" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_1cb75079-081f-4b7d-a7cb-c0140f006643" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossTax_ad6bf7da-5316-4012-9f50-dbd4b2c80608" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWSunaudited" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWSunaudited"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWSunaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_17c63d72-0220-4c27-b722-80f58a72c04e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireLoansHeldForInvestment"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_17c63d72-0220-4c27-b722-80f58a72c04e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_029a52d3-0cdc-4ad6-9223-8c970f935251" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_029a52d3-0cdc-4ad6-9223-8c970f935251" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_7f3aa639-fc7b-4333-98c5-c2cbdf623a85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_7f3aa639-fc7b-4333-98c5-c2cbdf623a85" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_PaymentsToAcquireDebtSecuritiesAvailableForSaleAndHeldToMaturity_993fd2cf-c5ad-4a1a-b7e4-40ef5bc4330c" xlink:href="agm-20240331.xsd#agm_PaymentsToAcquireDebtSecuritiesAvailableForSaleAndHeldToMaturity"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_agm_PaymentsToAcquireDebtSecuritiesAvailableForSaleAndHeldToMaturity_993fd2cf-c5ad-4a1a-b7e4-40ef5bc4330c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ProceedsFromMaturitiesPrepaymentsAndCallsOfDebtSecuritiesAvailableForSaleAndHeldToMaturity_4290692d-a637-441d-b7c6-f1be32aeafb1" xlink:href="agm-20240331.xsd#agm_ProceedsFromMaturitiesPrepaymentsAndCallsOfDebtSecuritiesAvailableForSaleAndHeldToMaturity"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_agm_ProceedsFromMaturitiesPrepaymentsAndCallsOfDebtSecuritiesAvailableForSaleAndHeldToMaturity_4290692d-a637-441d-b7c6-f1be32aeafb1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_11f361b6-8314-4dc0-a970-9ab9bd6fdcb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_11f361b6-8314-4dc0-a970-9ab9bd6fdcb5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireOtherInvestments_480a10f8-6c99-4916-881b-f8bf38c1ac3a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireOtherInvestments"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_us-gaap_PaymentsToAcquireOtherInvestments_480a10f8-6c99-4916-881b-f8bf38c1ac3a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireProductiveAssets_b4d79431-f6c8-402b-9407-ba3839c72204" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireProductiveAssets"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_80c0981f-095a-4cf1-90d7-4711b3c20dfc" xlink:to="loc_us-gaap_PaymentsToAcquireProductiveAssets_b4d79431-f6c8-402b-9407-ba3839c72204" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromShortTermDebt_49cbe2e9-bed7-4a4e-a7cf-20f3b0e2ee9f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromShortTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_ProceedsFromShortTermDebt_49cbe2e9-bed7-4a4e-a7cf-20f3b0e2ee9f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_96bab31c-fb92-4f82-9928-cafe5d0d3e9d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_96bab31c-fb92-4f82-9928-cafe5d0d3e9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_ecbe0568-e53e-4738-8479-a93acc6fed9d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_ecbe0568-e53e-4738-8479-a93acc6fed9d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfOrdinaryDividends_6dd23548-2a72-42cb-9317-a952292a7805" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfOrdinaryDividends"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_PaymentsOfOrdinaryDividends_6dd23548-2a72-42cb-9317-a952292a7805" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfMediumTermNotes_ea293e06-400c-48d1-b9a5-ad79b547f1a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfMediumTermNotes"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfMediumTermNotes_ea293e06-400c-48d1-b9a5-ad79b547f1a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_PaymentsToThirdPartiesOnDebtSecuritiesOfConsolidatedTrusts_5217eb40-a655-4e14-9679-386ffad3b7fd" xlink:href="agm-20240331.xsd#agm_PaymentsToThirdPartiesOnDebtSecuritiesOfConsolidatedTrusts"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_agm_PaymentsToThirdPartiesOnDebtSecuritiesOfConsolidatedTrusts_5217eb40-a655-4e14-9679-386ffad3b7fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfShortTermDebt_cf62f3ca-ddc9-48ac-b1c8-9814587657ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfShortTermDebt"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_RepaymentsOfShortTermDebt_cf62f3ca-ddc9-48ac-b1c8-9814587657ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfTrustPreferredSecurities_fb069d1a-43b1-4c31-a5af-e5fd33fe03a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfTrustPreferredSecurities"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfTrustPreferredSecurities_fb069d1a-43b1-4c31-a5af-e5fd33fe03a2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_15263191-1420-4c24-94f3-3a61ac4d0789" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_15263191-1420-4c24-94f3-3a61ac4d0789" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation_750e2ab3-8320-4fbf-b84e-4e1cf4bec987" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_ed44d656-69a1-4bdc-8c06-de06c6c5e264" xlink:to="loc_us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation_750e2ab3-8320-4fbf-b84e-4e1cf4bec987" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_42374a81-c109-4d95-9b8d-a880d3c295bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_42374a81-c109-4d95-9b8d-a880d3c295bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_9bd92b29-7eae-4859-acf1-d4b6fb0251db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_ShareBasedCompensation_9bd92b29-7eae-4859-acf1-d4b6fb0251db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet_67b91c19-9e8a-4136-a605-00484eed78f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet_67b91c19-9e8a-4136-a605-00484eed78f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_a3ac1c6e-12a5-4df2-99fa-c7b4661c792e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_a3ac1c6e-12a5-4df2-99fa-c7b4661c792e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_c4eb8e20-7e15-4d1b-bc2d-2c0df87d6afc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_c4eb8e20-7e15-4d1b-bc2d-2c0df87d6afc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_3e318b8d-6a02-4243-888b-c95c9fb9a7f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_3e318b8d-6a02-4243-888b-c95c9fb9a7f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ExcessTaxBenefitsFromShareBasedCompensation_fdec3fe1-9100-4234-a7a9-3b810ca1672d" xlink:href="agm-20240331.xsd#agm_ExcessTaxBenefitsFromShareBasedCompensation"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_agm_ExcessTaxBenefitsFromShareBasedCompensation_fdec3fe1-9100-4234-a7a9-3b810ca1672d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_14856bc2-601e-4c7e-a38b-244b9ab2f003" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_ProfitLoss_14856bc2-601e-4c7e-a38b-244b9ab2f003" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_3bf97a73-fb23-4c32-aa43-a32e5f49e32d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssets"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_3bf97a73-fb23-4c32-aa43-a32e5f49e32d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherReceivables_1eae68e8-c054-47a3-a7e8-882614aa0617" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherReceivables"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherReceivables_1eae68e8-c054-47a3-a7e8-882614aa0617" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_7fe075cd-7a23-46f1-9bb7-078bdb3d1812" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_7fe075cd-7a23-46f1-9bb7-078bdb3d1812" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_b98511ba-74b2-49e5-b78e-21a8daf407f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_b98511ba-74b2-49e5-b78e-21a8daf407f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_91b718e1-80c5-4044-a3ef-a52967988c8e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:calculationArc order="13" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_91b718e1-80c5-4044-a3ef-a52967988c8e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NetChangeInFairValueTradingSecuritiesHedgedAssetsFinancialDerivativesAndLoansHeldForSale_eb86eb83-e808-4d74-ac02-58f253e21c6f" xlink:href="agm-20240331.xsd#agm_NetChangeInFairValueTradingSecuritiesHedgedAssetsFinancialDerivativesAndLoansHeldForSale"/>
    <link:calculationArc order="14" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_agm_NetChangeInFairValueTradingSecuritiesHedgedAssetsFinancialDerivativesAndLoansHeldForSale_eb86eb83-e808-4d74-ac02-58f253e21c6f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromCollectionOfLoansHeldForSale_c5bce7ae-82a5-4010-9477-9919bf18a8c4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromCollectionOfLoansHeldForSale"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_70094b46-2714-4f84-a381-959e541f0953" xlink:to="loc_us-gaap_ProceedsFromCollectionOfLoansHeldForSale_c5bce7ae-82a5-4010-9477-9919bf18a8c4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a01ad50a-06a0-4c95-aed7-cfb39d21838a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f223764a-1837-48ea-942f-bf039d4f751e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a01ad50a-06a0-4c95-aed7-cfb39d21838a" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_f223764a-1837-48ea-942f-bf039d4f751e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_98342be5-b421-4644-8896-ebf34c513173" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a01ad50a-06a0-4c95-aed7-cfb39d21838a" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_98342be5-b421-4644-8896-ebf34c513173" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_4b2190c4-fa3c-4676-a40f-65f65944a869" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a01ad50a-06a0-4c95-aed7-cfb39d21838a" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_4b2190c4-fa3c-4676-a40f-65f65944a869" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESEarningsPerCommonShareDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESEarningsPerCommonShareDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESEarningsPerCommonShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_d6a92819-829b-445a-90db-814bb049f2fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_7a3697b4-3d26-4f9d-8b78-72d5f34ca2ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_d6a92819-829b-445a-90db-814bb049f2fc" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_7a3697b4-3d26-4f9d-8b78-72d5f34ca2ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_0acbd73e-42e3-4397-8a71-da7ce4fb011b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_d6a92819-829b-445a-90db-814bb049f2fc" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_0acbd73e-42e3-4397-8a71-da7ce4fb011b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDiluted_7ab55bf5-3831-4b2b-9dec-bcc11fcef90d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasic_2d8cf2e0-cc5d-4480-8baf-bc1f23369e00" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EarningsPerShareDiluted_7ab55bf5-3831-4b2b-9dec-bcc11fcef90d" xlink:to="loc_us-gaap_EarningsPerShareBasic_2d8cf2e0-cc5d-4480-8baf-bc1f23369e00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_EarningsPerShareOnIncrementalCommonSharesAttributableToShareBasedPaymentArrangements_7b73c4fa-6807-4a08-be63-7fb770c6c3ca" xlink:href="agm-20240331.xsd#agm_EarningsPerShareOnIncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EarningsPerShareDiluted_7ab55bf5-3831-4b2b-9dec-bcc11fcef90d" xlink:to="loc_agm_EarningsPerShareOnIncrementalCommonSharesAttributableToShareBasedPaymentArrangements_7b73c4fa-6807-4a08-be63-7fb770c6c3ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_cf38fe84-f513-482a-afec-9eda74a9d3ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f16f29eb-5478-4c1e-ac88-acccc6e79729" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_cf38fe84-f513-482a-afec-9eda74a9d3ea" xlink:to="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_f16f29eb-5478-4c1e-ac88-acccc6e79729" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofAccumulatedOtherComprehensiveIncomeNetofTaxDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofAccumulatedOtherComprehensiveIncomeNetofTaxDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofAccumulatedOtherComprehensiveIncomeNetofTaxDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0d9d6e27-2c0b-49ad-987c-6f21a8f233a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_dcf5585d-a7ec-447e-80ff-a517bada5c64" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0d9d6e27-2c0b-49ad-987c-6f21a8f233a1" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_dcf5585d-a7ec-447e-80ff-a517bada5c64" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_2273416f-90d6-417e-854c-2652afaacefa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_0d9d6e27-2c0b-49ad-987c-6f21a8f233a1" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_2273416f-90d6-417e-854c-2652afaacefa" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofReclassificationoutofAccumulatedOtherComprehensiveIncomeDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofReclassificationoutofAccumulatedOtherComprehensiveIncomeDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofReclassificationoutofAccumulatedOtherComprehensiveIncomeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_4986f95e-a03a-4d69-a4ef-6ac1e152d8c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_9e48a7c4-a168-4ef1-9aac-877111f2e1fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAociCurrentPeriodTax"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_4986f95e-a03a-4d69-a4ef-6ac1e152d8c5" xlink:to="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_9e48a7c4-a168-4ef1-9aac-877111f2e1fa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax_4f90ca5b-eeef-4141-9cb4-13f4b1620d9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTax_4986f95e-a03a-4d69-a4ef-6ac1e152d8c5" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax_4f90ca5b-eeef-4141-9cb4-13f4b1620d9a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_677e0447-3924-48c0-8ea6-e2710b555356" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_1723fde6-c37e-47f2-aca9-1a5bcd97304c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_677e0447-3924-48c0-8ea6-e2710b555356" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_1723fde6-c37e-47f2-aca9-1a5bcd97304c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_7ffed647-9281-4578-a7f3-8565ee9a8e04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAociCurrentPeriodTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_677e0447-3924-48c0-8ea6-e2710b555356" xlink:to="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_7ffed647-9281-4578-a7f3-8565ee9a8e04" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_31c5b006-4636-4a24-a3eb-64673592e3ce" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax_a911d7b9-86c8-4d74-bc7d-bdf16d80f432" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_31c5b006-4636-4a24-a3eb-64673592e3ce" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax_a911d7b9-86c8-4d74-bc7d-bdf16d80f432" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_7ce2e47b-7367-458c-9e13-7d8d6387b65e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_31c5b006-4636-4a24-a3eb-64673592e3ce" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_7ce2e47b-7367-458c-9e13-7d8d6387b65e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_e19614d4-865c-48d2-b09f-07fc13814926" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax_072c25d4-6215-49d0-bb2b-b6790c34abda" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_e19614d4-865c-48d2-b09f-07fc13814926" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax_072c25d4-6215-49d0-bb2b-b6790c34abda" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax_3271adf2-4316-49f0-a7dc-5642213ab827" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_e19614d4-865c-48d2-b09f-07fc13814926" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax_3271adf2-4316-49f0-a7dc-5642213ab827" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/INVESTMENTSECURITIESDebtMaturitiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#INVESTMENTSECURITIESDebtMaturitiesDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/INVESTMENTSECURITIESDebtMaturitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_429c0f8c-e628-4b93-a53c-9421d7f54d6d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_ab5be909-9adb-4072-b545-995e4b8263c0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_429c0f8c-e628-4b93-a53c-9421d7f54d6d" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_ab5be909-9adb-4072-b545-995e4b8263c0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_124c6a49-16bd-4f51-b6d2-8de1d7600042" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_429c0f8c-e628-4b93-a53c-9421d7f54d6d" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_124c6a49-16bd-4f51-b6d2-8de1d7600042" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_7cbd71af-0527-468f-a4d4-6b232c08ff19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_429c0f8c-e628-4b93-a53c-9421d7f54d6d" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_7cbd71af-0527-468f-a4d4-6b232c08ff19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_c2ae2d76-4c93-4784-95a9-194d3971f8f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_429c0f8c-e628-4b93-a53c-9421d7f54d6d" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_c2ae2d76-4c93-4784-95a9-194d3971f8f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_f99c5942-d7a3-422f-80e8-b75ccf50c47c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_ba047585-a549-4bcf-8770-b96a78a8e952" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_f99c5942-d7a3-422f-80e8-b75ccf50c47c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_ba047585-a549-4bcf-8770-b96a78a8e952" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_08c46012-0c7f-40f7-99cc-7ec3e68efccc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_f99c5942-d7a3-422f-80e8-b75ccf50c47c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_08c46012-0c7f-40f7-99cc-7ec3e68efccc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_fa70d144-899b-4de7-bae1-0e9d3df65ca8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_f99c5942-d7a3-422f-80e8-b75ccf50c47c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_fa70d144-899b-4de7-bae1-0e9d3df65ca8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_5e478f1a-ee1c-47d9-9369-ac86abdeacca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_f99c5942-d7a3-422f-80e8-b75ccf50c47c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_5e478f1a-ee1c-47d9-9369-ac86abdeacca" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofHeldtoMaturitySecuritiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofHeldtoMaturitySecuritiesDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofHeldtoMaturitySecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_79799671-9016-4ab4-a9e1-b47c87e1f4dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue_e602a28a-2008-4610-a86d-32499476273c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_79799671-9016-4ab4-a9e1-b47c87e1f4dd" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue_e602a28a-2008-4610-a86d-32499476273c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_720bb7d7-7188-4492-bfc0-f7af5d08b8d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_79799671-9016-4ab4-a9e1-b47c87e1f4dd" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_720bb7d7-7188-4492-bfc0-f7af5d08b8d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_b72f5581-151c-4cfe-8448-417d4232d9a3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_79799671-9016-4ab4-a9e1-b47c87e1f4dd" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_b72f5581-151c-4cfe-8448-417d4232d9a3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_bf30eaf3-24c6-4ba4-93d7-6ab49bc31e5f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_79799671-9016-4ab4-a9e1-b47c87e1f4dd" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_bf30eaf3-24c6-4ba4-93d7-6ab49bc31e5f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_41b86a72-ad43-4d03-a7f2-d341cf46ca84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_efd9b1bc-580b-46c7-b053-3b9857666952" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_41b86a72-ad43-4d03-a7f2-d341cf46ca84" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_efd9b1bc-580b-46c7-b053-3b9857666952" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10_053f5394-5705-4ad4-ab15-ee60e813a452" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_41b86a72-ad43-4d03-a7f2-d341cf46ca84" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10_053f5394-5705-4ad4-ab15-ee60e813a452" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_ab0674ca-7b6f-4f65-bd1e-d71b3a19b0c4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_41b86a72-ad43-4d03-a7f2-d341cf46ca84" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_ab0674ca-7b6f-4f65-bd1e-d71b3a19b0c4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_e8d005cc-3108-4c69-9729-2f907bcd29a6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_41b86a72-ad43-4d03-a7f2-d341cf46ca84" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_e8d005cc-3108-4c69-9729-2f907bcd29a6" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofNetIncomeExpenseRecognizedDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FINANCIALDERIVATIVESScheduleofNetIncomeExpenseRecognizedDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofNetIncomeExpenseRecognizedDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_4b657ed9-01ce-4e6d-9f5b-564b644c6389" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeNetHedgeIneffectivenessGainLossComponentRecognizedOnHedgedItem_0d305132-6497-4355-bda7-1edd3aab8e1d" xlink:href="agm-20240331.xsd#agm_DerivativeNetHedgeIneffectivenessGainLossComponentRecognizedOnHedgedItem"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_4b657ed9-01ce-4e6d-9f5b-564b644c6389" xlink:to="loc_agm_DerivativeNetHedgeIneffectivenessGainLossComponentRecognizedOnHedgedItem_0d305132-6497-4355-bda7-1edd3aab8e1d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_PremiumDiscountRecognizedOnHedgedInstrument_50688b90-c1e7-44b8-ae85-8754565f499e" xlink:href="agm-20240331.xsd#agm_PremiumDiscountRecognizedOnHedgedInstrument"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_4b657ed9-01ce-4e6d-9f5b-564b644c6389" xlink:to="loc_agm_PremiumDiscountRecognizedOnHedgedInstrument_50688b90-c1e7-44b8-ae85-8754565f499e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_f45b6e1c-abea-488a-9e00-1a951f59b038" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_4b657ed9-01ce-4e6d-9f5b-564b644c6389" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_f45b6e1c-abea-488a-9e00-1a951f59b038" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_IncomeExpenseInterestSettlementsFairValueHedges_c0cb73af-45ac-4ee6-9a8e-7975a9f6605e" xlink:href="agm-20240331.xsd#agm_IncomeExpenseInterestSettlementsFairValueHedges"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeNetInterestSettlements_17da93d8-0a1b-4b2c-b1be-7d23ffc6577f" xlink:href="agm-20240331.xsd#agm_DerivativeNetInterestSettlements"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_IncomeExpenseInterestSettlementsFairValueHedges_c0cb73af-45ac-4ee6-9a8e-7975a9f6605e" xlink:to="loc_agm_DerivativeNetInterestSettlements_17da93d8-0a1b-4b2c-b1be-7d23ffc6577f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HedgedItemNetInterestSettlements_5310ae5c-6f88-4718-9a5c-0e3370e99fc6" xlink:href="agm-20240331.xsd#agm_HedgedItemNetInterestSettlements"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_IncomeExpenseInterestSettlementsFairValueHedges_c0cb73af-45ac-4ee6-9a8e-7975a9f6605e" xlink:to="loc_agm_HedgedItemNetInterestSettlements_5310ae5c-6f88-4718-9a5c-0e3370e99fc6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_PremiumDiscountRecognizedOnHedgedInstrument_a68d56ce-d4ac-45ca-8ff7-039ebe2d9840" xlink:href="agm-20240331.xsd#agm_PremiumDiscountRecognizedOnHedgedInstrument"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_IncomeExpenseInterestSettlementsFairValueHedges_c0cb73af-45ac-4ee6-9a8e-7975a9f6605e" xlink:to="loc_agm_PremiumDiscountRecognizedOnHedgedInstrument_a68d56ce-d4ac-45ca-8ff7-039ebe2d9840" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_8a6876da-2cdd-4f7c-95ed-901da0ea5c91" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_61d4d6cc-bad7-489f-add9-3ab9485b6f86" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_8a6876da-2cdd-4f7c-95ed-901da0ea5c91" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_61d4d6cc-bad7-489f-add9-3ab9485b6f86" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_bb75ae5f-d858-4019-b61b-f0dc4f338f35" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_8a6876da-2cdd-4f7c-95ed-901da0ea5c91" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_bb75ae5f-d858-4019-b61b-f0dc4f338f35" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofFairValueofFinancialAssetsandLiabilitiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FINANCIALDERIVATIVESScheduleofFairValueofFinancialAssetsandLiabilitiesDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofFairValueofFinancialAssetsandLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_d5c18f3c-8139-4a14-b194-909856465a0b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_17b34539-a802-42d8-a621-7cdc3300a9c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_d5c18f3c-8139-4a14-b194-909856465a0b" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_17b34539-a802-42d8-a621-7cdc3300a9c2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_be1787ff-5a5b-4ea0-a56f-b56590a2e5cb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossAsset"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_d5c18f3c-8139-4a14-b194-909856465a0b" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_be1787ff-5a5b-4ea0-a56f-b56590a2e5cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_0a795330-d393-4552-a426-f3d32a71b2ad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_6e0d0d51-383e-485b-8f2e-3b89944f191f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossLiability"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_0a795330-d393-4552-a426-f3d32a71b2ad" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_6e0d0d51-383e-485b-8f2e-3b89944f191f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_6e526962-529e-455d-b2ea-a0fed46579a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAsset"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_0a795330-d393-4552-a426-f3d32a71b2ad" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_6e526962-529e-455d-b2ea-a0fed46579a1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount_427bf68b-b9c5-4ab4-930f-9cc479c059f6" xlink:href="agm-20240331.xsd#agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_6a0d9882-4483-44db-9635-cc674067dcbc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralRightToReclaimSecurities"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount_427bf68b-b9c5-4ab4-930f-9cc479c059f6" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_6a0d9882-4483-44db-9635-cc674067dcbc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimCash_5ff511b4-6bc5-48c0-a2ca-46852d5f3deb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralRightToReclaimCash"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount_427bf68b-b9c5-4ab4-930f-9cc479c059f6" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimCash_5ff511b4-6bc5-48c0-a2ca-46852d5f3deb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_e41e44d9-34aa-4285-a86d-7357b9f3f008" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount_427bf68b-b9c5-4ab4-930f-9cc479c059f6" xlink:to="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_e41e44d9-34aa-4285-a86d-7357b9f3f008" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_b8c6886a-a35d-4291-a774-5fb2a62ac111" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount_427bf68b-b9c5-4ab4-930f-9cc479c059f6" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_b8c6886a-a35d-4291-a774-5fb2a62ac111" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_2f3d83ef-4fff-44e6-a0f6-19195deabf45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralObligationToReturnCash_d85c0985-17a0-44d1-b495-1fdb2b729128" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralObligationToReturnCash"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_2f3d83ef-4fff-44e6-a0f6-19195deabf45" xlink:to="loc_us-gaap_DerivativeCollateralObligationToReturnCash_d85c0985-17a0-44d1-b495-1fdb2b729128" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_bf5ab651-7e07-488d-99b6-8a853bb6d5d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_2f3d83ef-4fff-44e6-a0f6-19195deabf45" xlink:to="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_bf5ab651-7e07-488d-99b6-8a853bb6d5d9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeAssetSubjectToMasterNettingArrangementCollateralObligationToReturnSecurityNotOffsetNet_ab6cebe1-3748-4e85-8d6c-cd0c38ab8bc7" xlink:href="agm-20240331.xsd#agm_DerivativeAssetSubjectToMasterNettingArrangementCollateralObligationToReturnSecurityNotOffsetNet"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_2f3d83ef-4fff-44e6-a0f6-19195deabf45" xlink:to="loc_agm_DerivativeAssetSubjectToMasterNettingArrangementCollateralObligationToReturnSecurityNotOffsetNet_ab6cebe1-3748-4e85-8d6c-cd0c38ab8bc7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_42dbd0a4-72e9-41e8-b127-e8faf0f5b5e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_2f3d83ef-4fff-44e6-a0f6-19195deabf45" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_42dbd0a4-72e9-41e8-b127-e8faf0f5b5e8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSScheduleofCompositionofLoanBalancesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSScheduleofCompositionofLoanBalancesDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/LOANSScheduleofCompositionofLoanBalancesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_c0441cd8-dc39-4fa7-9ce3-e6800757a4b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_0a28b483-0b1d-4667-a463-6779e9d26c43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_c0441cd8-dc39-4fa7-9ce3-e6800757a4b0" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_0a28b483-0b1d-4667-a463-6779e9d26c43" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure_585f5030-ef2f-4109-8c30-115199df46b0" xlink:href="agm-20240331.xsd#agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_c0441cd8-dc39-4fa7-9ce3-e6800757a4b0" xlink:to="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure_585f5030-ef2f-4109-8c30-115199df46b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure_28682caf-1f9b-4791-8006-233433929fde" xlink:href="agm-20240331.xsd#agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess_a72e0898-18b4-4da0-a930-beb2709fe908" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure_28682caf-1f9b-4791-8006-233433929fde" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess_a72e0898-18b4-4da0-a930-beb2709fe908" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableUnamortizedLoanCommitmentOriginationFeeAndPremiumDiscount_37fa885e-bb24-4054-9af3-da152000f8d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableUnamortizedLoanCommitmentOriginationFeeAndPremiumDiscount"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure_28682caf-1f9b-4791-8006-233433929fde" xlink:to="loc_us-gaap_FinancingReceivableUnamortizedLoanCommitmentOriginationFeeAndPremiumDiscount_37fa885e-bb24-4054-9af3-da152000f8d8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSScheduleofFinancingReceivablesCreditQualityIndicatorsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSScheduleofFinancingReceivablesCreditQualityIndicatorsDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/LOANSScheduleofFinancingReceivablesCreditQualityIndicatorsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_657acddd-616b-4f40-8a75-5d155a67f9dc" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:to="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_657acddd-616b-4f40-8a75-5d155a67f9dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_e870b690-0d1d-4862-940b-ae968cba9328" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:to="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_e870b690-0d1d-4862-940b-ae968cba9328" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_dce611e8-e489-4472-8094-37bee2764f40" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:to="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_dce611e8-e489-4472-8094-37bee2764f40" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff_f290b0c7-ae60-46d9-9ece-d3c9a0e9f977" xlink:href="agm-20240331.xsd#agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:to="loc_agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff_f290b0c7-ae60-46d9-9ece-d3c9a0e9f977" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_972c6c4f-624d-4aa4-8aeb-d7b6bb8e0f24" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:to="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_972c6c4f-624d-4aa4-8aeb-d7b6bb8e0f24" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_bf17ba78-eab1-48da-95d1-c401cefae225" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:to="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_bf17ba78-eab1-48da-95d1-c401cefae225" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_8b0fa40c-088c-4867-b09d-5ed80396b317" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_eeff8d9b-8877-4889-bb9c-73ca991eb7aa" xlink:to="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_8b0fa40c-088c-4867-b09d-5ed80396b317" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear_92c9ab43-06ce-41b7-b0cb-c7a88b68a5ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear_92c9ab43-06ce-41b7-b0cb-c7a88b68a5ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear_d13d828f-2561-4d64-a768-c7790c5f022c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear_d13d828f-2561-4d64-a768-c7790c5f022c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolving_6f439d9a-b3cd-4bcc-9271-0f20b41c25f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestRevolving"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolving_6f439d9a-b3cd-4bcc-9271-0f20b41c25f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear_9c2305a8-f6a1-4a38-85cc-448e28878efc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear_9c2305a8-f6a1-4a38-85cc-448e28878efc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear_4b5c5ec5-8aa3-4ac0-9eaa-c12f9f9ef921" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear_4b5c5ec5-8aa3-4ac0-9eaa-c12f9f9ef921" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear_2667faf9-5708-424e-be94-b961ea75ac3d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear_2667faf9-5708-424e-be94-b961ea75ac3d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear_9d155049-f912-4593-aefc-4bd4b4187116" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_ad1a9b2a-ecf6-47b6-8f83-c060e52152e0" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear_9d155049-f912-4593-aefc-4bd4b4187116" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/NOTESPAYABLEBorrowingsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#NOTESPAYABLEBorrowingsDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/NOTESPAYABLEBorrowingsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_af585e77-ad04-4e84-be5a-9dd5124db571" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_f81d4c5a-5e7f-4925-a992-000f6179f7b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtNoncurrent_af585e77-ad04-4e84-be5a-9dd5124db571" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_f81d4c5a-5e7f-4925-a992-000f6179f7b0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_9af3651c-e744-4b7d-bb31-4357a817178d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtNoncurrent_af585e77-ad04-4e84-be5a-9dd5124db571" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_9af3651c-e744-4b7d-bb31-4357a817178d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_f9c42436-6980-45c6-be4b-bc30c9e54be3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtNoncurrent_af585e77-ad04-4e84-be5a-9dd5124db571" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_f9c42436-6980-45c6-be4b-bc30c9e54be3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_fb814444-9db7-4e57-9076-500ba52f573c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtNoncurrent_af585e77-ad04-4e84-be5a-9dd5124db571" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_fb814444-9db7-4e57-9076-500ba52f573c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_b5a59ee9-8850-40ca-81de-c4056c35fe6d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtNoncurrent_af585e77-ad04-4e84-be5a-9dd5124db571" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_b5a59ee9-8850-40ca-81de-c4056c35fe6d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_bb809513-cb3f-4aff-85ea-3094a523ecd9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_44d7cb95-2a89-489c-bfe1-307b813d86f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_bb809513-cb3f-4aff-85ea-3094a523ecd9" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_44d7cb95-2a89-489c-bfe1-307b813d86f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_c5db40b6-0f65-4653-848e-01c0d6766d65" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_bb809513-cb3f-4aff-85ea-3094a523ecd9" xlink:to="loc_us-gaap_LongTermDebtCurrent_c5db40b6-0f65-4653-848e-01c0d6766d65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtNetOfHedgingAdjustments_9301f9fa-979c-4634-8509-0efa16f45147" xlink:href="agm-20240331.xsd#agm_LongTermDebtNetOfHedgingAdjustments"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtHedgingAdjustments_b103e633-58c4-4b0e-942f-9293f32692bc" xlink:href="agm-20240331.xsd#agm_LongTermDebtHedgingAdjustments"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtNetOfHedgingAdjustments_9301f9fa-979c-4634-8509-0efa16f45147" xlink:to="loc_agm_LongTermDebtHedgingAdjustments_b103e633-58c4-4b0e-942f-9293f32692bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_2ae19326-caef-4d01-b4b0-786c3bb159d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtNetOfHedgingAdjustments_9301f9fa-979c-4634-8509-0efa16f45147" xlink:to="loc_us-gaap_LongTermDebt_2ae19326-caef-4d01-b4b0-786c3bb159d8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/NOTESPAYABLECallableMediumTermNotesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#NOTESPAYABLECallableMediumTermNotesDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/NOTESPAYABLECallableMediumTermNotesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_b0cb74b9-fa00-4a86-9128-a6d7ddab97d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_c7e7c3ca-9ea8-4ecc-ae7b-c6036abdebd5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_b0cb74b9-fa00-4a86-9128-a6d7ddab97d1" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_c7e7c3ca-9ea8-4ecc-ae7b-c6036abdebd5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtMaturityAfterYearFour_1ad32d06-1186-4bb0-bd78-6131ed673073" xlink:href="agm-20240331.xsd#agm_LongTermDebtMaturityAfterYearFour"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_b0cb74b9-fa00-4a86-9128-a6d7ddab97d1" xlink:to="loc_agm_LongTermDebtMaturityAfterYearFour_1ad32d06-1186-4bb0-bd78-6131ed673073" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_81316f18-45e8-4c30-acdf-4e00fbc9eca0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_b0cb74b9-fa00-4a86-9128-a6d7ddab97d1" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_81316f18-45e8-4c30-acdf-4e00fbc9eca0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_d7070d21-d89e-4f2c-a087-d3d688080163" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_b0cb74b9-fa00-4a86-9128-a6d7ddab97d1" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_d7070d21-d89e-4f2c-a087-d3d688080163" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_5d7a21c9-7ebc-4cca-9920-50af24609bb9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_b0cb74b9-fa00-4a86-9128-a6d7ddab97d1" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_5d7a21c9-7ebc-4cca-9920-50af24609bb9" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/NOTESPAYABLEEarliestInterestResetDateofBorrowingOutstandingDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#NOTESPAYABLEEarliestInterestResetDateofBorrowingOutstandingDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/NOTESPAYABLEEarliestInterestResetDateofBorrowingOutstandingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateReset_4042107e-ae11-477b-b67b-cd158b6c2b18" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateReset"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityAfterYearFour_1bdb2511-eb34-49a9-ac45-998985cc3c4f" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityAfterYearFour"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtWithInterestRateReset_4042107e-ae11-477b-b67b-cd158b6c2b18" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityAfterYearFour_1bdb2511-eb34-49a9-ac45-998985cc3c4f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearFour_f9a7453e-5180-4f7c-816f-8559f7b31122" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearFour"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtWithInterestRateReset_4042107e-ae11-477b-b67b-cd158b6c2b18" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearFour_f9a7453e-5180-4f7c-816f-8559f7b31122" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearThree_6d2163cb-a70a-44a0-85b8-057710ad88a9" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtWithInterestRateReset_4042107e-ae11-477b-b67b-cd158b6c2b18" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearThree_6d2163cb-a70a-44a0-85b8-057710ad88a9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearOne_5e2cd7c6-ff8a-4a8e-9c6e-87427511a6bc" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearOne"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtWithInterestRateReset_4042107e-ae11-477b-b67b-cd158b6c2b18" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearOne_5e2cd7c6-ff8a-4a8e-9c6e-87427511a6bc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearTwo_b480a9c4-a5e9-48a9-b0f1-f1aa678506dd" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearTwo"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtWithInterestRateReset_4042107e-ae11-477b-b67b-cd158b6c2b18" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearTwo_b480a9c4-a5e9-48a9-b0f1-f1aa678506dd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityReminderOfTheFiscalYear_90dc0c0c-1c17-49b9-a3ed-6429ad2a764d" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityReminderOfTheFiscalYear"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_LongTermDebtWithInterestRateReset_4042107e-ae11-477b-b67b-cd158b6c2b18" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityReminderOfTheFiscalYear_90dc0c0c-1c17-49b9-a3ed-6429ad2a764d" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESScheduleofFairValueMeasurementsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FAIRVALUEDISCLOSURESScheduleofFairValueMeasurementsDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESScheduleofFairValueMeasurementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_a2733484-7a3c-4258-99bc-1747b5d82a8a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_ef802294-fe6d-4c29-a27b-134d9ba1ce0d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_AssetsFairValueDisclosure_a2733484-7a3c-4258-99bc-1747b5d82a8a" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_ef802294-fe6d-4c29-a27b-134d9ba1ce0d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecuritiesDebt_1a6a5dec-a0fc-463a-9d67-fc09f14455b3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_AssetsFairValueDisclosure_a2733484-7a3c-4258-99bc-1747b5d82a8a" xlink:to="loc_us-gaap_TradingSecuritiesDebt_1a6a5dec-a0fc-463a-9d67-fc09f14455b3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_5a9f9fee-ac41-4ff5-9eca-0a316e2f3f19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.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_a2733484-7a3c-4258-99bc-1747b5d82a8a" xlink:to="loc_us-gaap_DerivativeAssets_5a9f9fee-ac41-4ff5-9eca-0a316e2f3f19" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_GuaranteeAsset_b02d9631-f2eb-4ca3-88d0-c96b2e65fe87" xlink:href="agm-20240331.xsd#agm_GuaranteeAsset"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsFairValueDisclosure_a2733484-7a3c-4258-99bc-1747b5d82a8a" xlink:to="loc_agm_GuaranteeAsset_b02d9631-f2eb-4ca3-88d0-c96b2e65fe87" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_aaed7711-ab03-4e22-ba67-766850e46a45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_640d67e2-3aed-4b16-a3a3-a343532c7168" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosure_aaed7711-ab03-4e22-ba67-766850e46a45" xlink:to="loc_us-gaap_DerivativeLiabilities_640d67e2-3aed-4b16-a3a3-a343532c7168" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/BUSINESSSEGMENTREPORTINGDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#BUSINESSSEGMENTREPORTINGDetails"/>
  <link:calculationLink xlink:role="http://www.farmermac.com/role/BUSINESSSEGMENTREPORTINGDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_agm_NetEffectiveSpread_fa48eb9e-f0ff-4303-a527-645590330939" xlink:href="agm-20240331.xsd#agm_NetEffectiveSpread"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ReconcilingAdjustmentsFromNetInterestIncomeToNetEffectiveSpreadNet_d8a62557-1ddc-4252-a1a4-e7eed9199d14" xlink:href="agm-20240331.xsd#agm_ReconcilingAdjustmentsFromNetInterestIncomeToNetEffectiveSpreadNet"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NetEffectiveSpread_fa48eb9e-f0ff-4303-a527-645590330939" xlink:to="loc_agm_ReconcilingAdjustmentsFromNetInterestIncomeToNetEffectiveSpreadNet_d8a62557-1ddc-4252-a1a4-e7eed9199d14" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_de551ebf-c7be-41e5-8ed6-4a70ad648fe1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NetEffectiveSpread_fa48eb9e-f0ff-4303-a527-645590330939" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_de551ebf-c7be-41e5-8ed6-4a70ad648fe1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_8183b214-9beb-4101-b55c-e0226ca5a437" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForOtherCreditLosses_f96ba409-3f78-4282-b63b-296ec8fe372e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForOtherCreditLosses"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_8183b214-9beb-4101-b55c-e0226ca5a437" xlink:to="loc_us-gaap_ProvisionForOtherCreditLosses_f96ba409-3f78-4282-b63b-296ec8fe372e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_58465be3-d4ef-4adf-b51a-34bc1dd0fa99" xlink:href="agm-20240331.xsd#agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NoninterestExpense_8183b214-9beb-4101-b55c-e0226ca5a437" xlink:to="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_58465be3-d4ef-4adf-b51a-34bc1dd0fa99" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_ed6995fe-0cbe-49cb-bfa2-8df08601958e" xlink:href="agm-20240331.xsd#agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NetEffectiveSpread_efb29c49-14ec-45ff-8f28-ca1304a566e8" xlink:href="agm-20240331.xsd#agm_NetEffectiveSpread"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_ed6995fe-0cbe-49cb-bfa2-8df08601958e" xlink:to="loc_agm_NetEffectiveSpread_efb29c49-14ec-45ff-8f28-ca1304a566e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions_b62df59a-b370-4cf2-a84a-79f5af1831bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_ed6995fe-0cbe-49cb-bfa2-8df08601958e" xlink:to="loc_us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions_b62df59a-b370-4cf2-a84a-79f5af1831bd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_OtherNonInterestIncomeExpenseExcludingGuaranteeAndCommitmentFees_f29ffac9-bea1-45c5-a0a7-8df739e583d3" xlink:href="agm-20240331.xsd#agm_OtherNonInterestIncomeExpenseExcludingGuaranteeAndCommitmentFees"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_ed6995fe-0cbe-49cb-bfa2-8df08601958e" xlink:to="loc_agm_OtherNonInterestIncomeExpenseExcludingGuaranteeAndCommitmentFees_f29ffac9-bea1-45c5-a0a7-8df739e583d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_45418453-f761-4b39-bdd8-13b424d1e4c1" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarningsBeforeIncomeTaxes"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ProvisionForLoanAndSecuritiesLosses_5593084f-42d9-4259-905c-c52906cbdcfd" xlink:href="agm-20240331.xsd#agm_ProvisionForLoanAndSecuritiesLosses"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_45418453-f761-4b39-bdd8-13b424d1e4c1" xlink:to="loc_agm_ProvisionForLoanAndSecuritiesLosses_5593084f-42d9-4259-905c-c52906cbdcfd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_c77d66df-a698-474f-af38-6d49b8d6332d" xlink:href="agm-20240331.xsd#agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_45418453-f761-4b39-bdd8-13b424d1e4c1" xlink:to="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_c77d66df-a698-474f-af38-6d49b8d6332d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_f89748e5-f237-4130-96fd-fb4e672c8f61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_45418453-f761-4b39-bdd8-13b424d1e4c1" xlink:to="loc_us-gaap_NoninterestExpense_f89748e5-f237-4130-96fd-fb4e672c8f61" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends_34f8200a-4879-4e7d-b54c-9bd8a6eb0472" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_243bcc1a-9b08-47c2-80d8-64cea01381f1" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarningsBeforeIncomeTaxes"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends_34f8200a-4879-4e7d-b54c-9bd8a6eb0472" xlink:to="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_243bcc1a-9b08-47c2-80d8-64cea01381f1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_f0e47d81-5246-4c5e-85c7-7e452e3955ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends_34f8200a-4879-4e7d-b54c-9bd8a6eb0472" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_f0e47d81-5246-4c5e-85c7-7e452e3955ee" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarnings_a78c7b70-d48f-47a3-ae53-a094fd801d12" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarnings"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_b5d08fe3-9372-4694-b19a-28906d6d1e92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockDividendsIncomeStatementImpact"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_SegmentCoreEarnings_a78c7b70-d48f-47a3-ae53-a094fd801d12" xlink:to="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_b5d08fe3-9372-4694-b19a-28906d6d1e92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends_ed79d325-25f5-4bf9-a1c6-5ad0485d13ac" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_agm_SegmentCoreEarnings_a78c7b70-d48f-47a3-ae53-a094fd801d12" xlink:to="loc_agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends_ed79d325-25f5-4bf9-a1c6-5ad0485d13ac" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
