<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:agm="http://farmermac.com/20221231"
  xmlns:dei="http://xbrl.sec.gov/dei/2022q4"
  xmlns:ecd="http://xbrl.sec.gov/ecd/2022q4"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:us-gaap="http://fasb.org/us-gaap/2022"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <link:schemaRef xlink:href="agm-20221231.xsd" xlink:type="simple"/>
    <context id="From2022-01-01to2022-12-31">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_custom_Peo1Member">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:IndividualAxis">agm:Peo1Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_CumulativeDeductionsFromSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeDeductionsFromSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_CumulativeAdditionsToSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeAdditionsToSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_custom_Peo1Member">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:IndividualAxis">agm:Peo1Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_CumulativeDeductionsFromSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeDeductionsFromSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_CumulativeAdditionsToSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeAdditionsToSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_custom_Peo1Member">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:IndividualAxis">agm:Peo1Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_CumulativeDeductionsFromSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeDeductionsFromSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_CumulativeAdditionsToSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeAdditionsToSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_CumulativeDeductionsFromSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeDeductionsFromSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_CumulativeAdditionsToSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeAdditionsToSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_CumulativeDeductionsFromSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeDeductionsFromSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_CumulativeAdditionsToSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeAdditionsToSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_CumulativeDeductionsFromSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeDeductionsFromSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_CumulativeAdditionsToSCTTotalMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:CumulativeAdditionsToSCTTotalMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_ServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_ServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_ServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_ServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_ServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_ServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_PriorServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:PriorServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_PriorServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:PriorServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_PriorServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:PriorServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_PriorServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:PriorServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_PriorServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:PriorServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_PriorServiceCostForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:PriorServiceCostForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_PeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_PeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_PeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:PeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:explicitMember dimension="ecd:AdjToCompAxis">agm:DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="ecd:ExecutiveCategoryAxis">ecd:NonPeoNeoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2020-01-01</startDate>
            <endDate>2020-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:MeasureAxis">
                    <ecd:MeasureAxis.domain>1</ecd:MeasureAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_2">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:MeasureAxis">
                    <ecd:MeasureAxis.domain>2</ecd:MeasureAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_3">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:MeasureAxis">
                    <ecd:MeasureAxis.domain>3</ecd:MeasureAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_4">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:MeasureAxis">
                    <ecd:MeasureAxis.domain>4</ecd:MeasureAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_5">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:MeasureAxis">
                    <ecd:MeasureAxis.domain>5</ecd:MeasureAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_6">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:MeasureAxis">
                    <ecd:MeasureAxis.domain>6</ecd:MeasureAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="From2022-01-012022-12-31_7">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000845877</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:MeasureAxis">
                    <ecd:MeasureAxis.domain>7</ecd:MeasureAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <unit id="USD">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="Shares">
        <measure>shares</measure>
    </unit>
    <unit id="USDPShares">
        <divide>
            <unitNumerator>
                <measure>iso4217:USD</measure>
            </unitNumerator>
            <unitDenominator>
                <measure>shares</measure>
            </unitDenominator>
        </divide>
    </unit>
    <unit id="Pure">
        <measure>pure</measure>
    </unit>
    <dei:EntityCentralIndexKey contextRef="From2022-01-01to2022-12-31">0000845877</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag contextRef="From2022-01-01to2022-12-31">false</dei:AmendmentFlag>
    <dei:DocumentType contextRef="From2022-01-01to2022-12-31" id="xdx2ixbrl0010">DEF 14A</dei:DocumentType>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember"
      id="xdx2ixbrl0081"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember"
      id="xdx2ixbrl0082"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember"
      id="xdx2ixbrl0083"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember"
      id="xdx2ixbrl0084"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember"
      id="xdx2ixbrl0085"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_AggregateChangeInActuarialPresentValueIncludedInSctAmountsForCoveredFiscalYearMember"
      id="xdx2ixbrl0086"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_ServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0088"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_ServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0089"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_ServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0090"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_ServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0091"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_ServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0092"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_ServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0093"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_PriorServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0095"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_PriorServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0096"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_PriorServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0097"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_PriorServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0098"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_PriorServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0099"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_PriorServiceCostForCoveredFiscalYearMember"
      id="xdx2ixbrl0100"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0124"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0125"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0126"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0127"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0128"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0137"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0138"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0139"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0140"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0141"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_FairValueAtEndOfPriorFiscalYearOfAwardsGrantedInAnyPriorFiscalYearThatFailedToMeetApplicableVestingConditionsDuringCoveredFiscalYearMember"
      id="xdx2ixbrl0142"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember"
      id="xdx2ixbrl0144"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember"
      id="xdx2ixbrl0145"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember"
      id="xdx2ixbrl0146"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember"
      id="xdx2ixbrl0147"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember"
      id="xdx2ixbrl0148"
      unitRef="USD"
      xsi:nil="true"/>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_DividendsOrOtherEarningsPaidOnStockOrOptionAwardsInCoveredFiscalYearPriorToVestingIfNotOtherwiseIncludedInTotalCompensationForCoveredFiscalYearMember"
      id="xdx2ixbrl0149"
      unitRef="USD"
      xsi:nil="true"/>
    <dei:EntityRegistrantName contextRef="From2022-01-01to2022-12-31">FEDERAL AGRICULTURAL MORTGAGE CORPORATION</dei:EntityRegistrantName>
    <ecd:PvpTableTextBlock contextRef="From2022-01-01to2022-12-31">&lt;table cellpadding="0" cellspacing="0" id="xdx_88D_eecd--PvpTableTextBlock_ztAPx3Nf50ob" style="font: 8pt Arial, Helvetica, Sans-Serif; width: 100%; border-collapse: collapse" summary="xdx: Disclosure - Pay vs Performance Disclosure"&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: #EBE9E9"&gt;
    &lt;td style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"/&gt;
    &lt;td id="xdx_489_eecd--PeoTotalCompAmt_zLvPN1J4bjk8" style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;sup id="xdx_F5D_ztmlzK8ouxsg" style="display: none"&gt;1&lt;/sup&gt;&lt;/td&gt;
    &lt;td id="xdx_48E_eecd--PeoActuallyPaidCompAmt_zUijhJCAKwWf" style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;sup id="xdx_F54_znvho0ukF3y2" style="display: none"&gt;1,2&lt;/sup&gt;&lt;/td&gt;
    &lt;td id="xdx_483_eecd--NonPeoNeoAvgTotalCompAmt_z45xXuKb8xsl" style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;sup id="xdx_F59_zVxlLbEf38Ah" style="display: none"&gt;1&lt;/sup&gt;&lt;/td&gt;
    &lt;td id="xdx_48E_eecd--NonPeoNeoAvgCompActuallyPaidAmt_z7nYnSXYSBvh" style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;sup id="xdx_F56_zPfvBcyf3nXj" style="display: none"&gt;1,2&lt;/sup&gt;&lt;/td&gt;
    &lt;td id="xdx_48E_eecd--TotalShareholderRtnAmt_z5JYdk40SVck" style="border-bottom: rgb(102,96,81) 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: top"&gt;&lt;sup id="xdx_F50_zjj1UAFNOSvh" style="display: none"&gt;3&lt;/sup&gt;&lt;/td&gt;
    &lt;td id="xdx_487_eecd--PeerGroupTotalShareholderRtnAmt_zh0m62113prl" style="border-bottom: rgb(102,96,81) 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: top"&gt;&lt;sup id="xdx_F53_zmdt7Pyfuegh" style="display: none"&gt;4&lt;/sup&gt;&lt;/td&gt;
    &lt;td id="xdx_48E_eus-gaap--NetIncomeLoss_zHMo7V6pVFkl" style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"/&gt;
    &lt;td id="xdx_482_eecd--CoSelectedMeasureAmt_uUSD_zmffspIL6Sb7" style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;sup id="xdx_F55_z82EN8d0LC4c" style="display: none"&gt;5&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: #EBE9E9"&gt;
    &lt;td colspan="5" style="border-right: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt"&gt;&#160;&lt;/span&gt;&lt;/td&gt;
    &lt;td colspan="2" style="border-right: #726A5C 1pt dotted; border-bottom: #666051 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: top"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Value
    of Initial Fixed $100 &lt;br/&gt;
    Investment Based On:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td colspan="2" style="font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt"&gt;&#160;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: #EBE9E9"&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; padding-left: 4pt; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: left; width: 6%; vertical-align: top; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Year&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; vertical-align: top; width: 12%; text-align: center; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Summary&lt;br/&gt;
    Compensation&lt;br/&gt;
    Table Total for&lt;br/&gt;
    PEO&lt;sup&gt;1&lt;/sup&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; vertical-align: top; width: 12%; text-align: center; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Compensation&lt;br/&gt;
    Actually Paid&lt;br/&gt;
    to PEO&lt;sup&gt;1,2&lt;/sup&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; vertical-align: top; width: 13%; text-align: center; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Average
    Summary&lt;br/&gt;
    Compensation&lt;br/&gt;
    Table Total for&lt;br/&gt;
    Non-PEO NEOs&lt;sup&gt;1&lt;/sup&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; vertical-align: top; width: 18%; text-align: center; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Average&lt;br/&gt;
    Compensation&lt;br/&gt;
    Actually Paid to&lt;br/&gt;
    non-PEO NEOs&lt;sup&gt;1,2&lt;/sup&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; width: 10%; vertical-align: top; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Farmer&lt;br/&gt;
    Mac&#x2019;s&lt;br/&gt;
    TSR&lt;sup&gt;3&lt;/sup&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-top: #666051 1pt dotted; border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; width: 9%; vertical-align: top; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Peer
    Group&lt;br/&gt;
    TSR&lt;sup&gt;4&lt;/sup&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; width: 10%; vertical-align: top; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Net
    Income&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; width: 10%; vertical-align: top; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #4B6A8A"&gt;&lt;b&gt;Earnings&lt;sup&gt;5&lt;/sup&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr id="xdx_410_20220101__20221231_zxkiqC3slqF7" style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top"&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; padding-left: 4pt; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: left; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;2022&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$3,532,666&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$3,094,824&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$1,136,013&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$1,033,285&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; vertical-align: bottom; padding-top: 2pt; text-align: center"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$152&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$134&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$178,144,000&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$125,598,000&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr id="xdx_419_20210101__20211231_zetm2pTFyk3c" style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top"&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; padding-left: 4pt; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: left; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;2021&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$3,211,156&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$5,060,035&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$1,045,533&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$1,465,036&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; vertical-align: bottom; padding-top: 2pt; text-align: center"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$161&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$151&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$136,089,000&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$111,842,000&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr id="xdx_418_20200101__20201231_zZ5JPJ9DFiqe" style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top"&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; padding-left: 4pt; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: left; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;2020&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-top: 2pt; text-align: center; vertical-align: bottom; padding-bottom: 2pt"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$2,680,795&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$2,445,320&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$1,117,787&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$1,022,015&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; vertical-align: bottom; padding-top: 2pt; text-align: center"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$&lt;/span&gt;&lt;span style="font-size: 5pt; color: #58595B"&gt;&#160;
    &lt;/span&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;93&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$111&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-right: #726A5C 1pt dotted; border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$114,376,000&lt;/span&gt;&lt;/td&gt;
    &lt;td style="border-bottom: #726A5C 1pt dotted; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; text-align: center; padding-top: 2pt; vertical-align: bottom"&gt;&lt;span style="font-size: 7pt; color: #58595B"&gt;$106,639,000&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;</ecd:PvpTableTextBlock>
    <ecd:PeoTotalCompAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      id="Fact000014"
      unitRef="USD">3532666</ecd:PeoTotalCompAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      id="Fact000015"
      unitRef="USD">3094824</ecd:PeoActuallyPaidCompAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      id="Fact000016"
      unitRef="USD">1136013</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      id="Fact000017"
      unitRef="USD">1033285</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:TotalShareholderRtnAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      id="Fact000018"
      unitRef="USD">152</ecd:TotalShareholderRtnAmt>
    <ecd:PeerGroupTotalShareholderRtnAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      id="Fact000019"
      unitRef="USD">134</ecd:PeerGroupTotalShareholderRtnAmt>
    <us-gaap:NetIncomeLoss
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      unitRef="USD">178144000</us-gaap:NetIncomeLoss>
    <ecd:CoSelectedMeasureAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="INF"
      id="Fact000021"
      unitRef="USD">125598000</ecd:CoSelectedMeasureAmt>
    <ecd:PeoTotalCompAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      id="Fact000022"
      unitRef="USD">3211156</ecd:PeoTotalCompAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      id="Fact000023"
      unitRef="USD">5060035</ecd:PeoActuallyPaidCompAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      id="Fact000024"
      unitRef="USD">1045533</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      id="Fact000025"
      unitRef="USD">1465036</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:TotalShareholderRtnAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      id="Fact000026"
      unitRef="USD">161</ecd:TotalShareholderRtnAmt>
    <ecd:PeerGroupTotalShareholderRtnAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      id="Fact000027"
      unitRef="USD">151</ecd:PeerGroupTotalShareholderRtnAmt>
    <us-gaap:NetIncomeLoss
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      unitRef="USD">136089000</us-gaap:NetIncomeLoss>
    <ecd:CoSelectedMeasureAmt
      contextRef="From2021-01-012021-12-31"
      decimals="INF"
      id="Fact000029"
      unitRef="USD">111842000</ecd:CoSelectedMeasureAmt>
    <ecd:PeoTotalCompAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      id="Fact000030"
      unitRef="USD">2680795</ecd:PeoTotalCompAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      id="Fact000031"
      unitRef="USD">2445320</ecd:PeoActuallyPaidCompAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      id="Fact000032"
      unitRef="USD">1117787</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      id="Fact000033"
      unitRef="USD">1022015</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:TotalShareholderRtnAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      id="Fact000034"
      unitRef="USD">93</ecd:TotalShareholderRtnAmt>
    <ecd:PeerGroupTotalShareholderRtnAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      id="Fact000035"
      unitRef="USD">111</ecd:PeerGroupTotalShareholderRtnAmt>
    <us-gaap:NetIncomeLoss
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      unitRef="USD">114376000</us-gaap:NetIncomeLoss>
    <ecd:CoSelectedMeasureAmt
      contextRef="From2020-01-012020-12-31"
      decimals="INF"
      id="Fact000037"
      unitRef="USD">106639000</ecd:CoSelectedMeasureAmt>
    <ecd:NamedExecutiveOfficersFnTextBlock contextRef="From2022-01-01to2022-12-31">
    &lt;span id="xdx_90F_eecd--PeoName_c20220101__20221231_z20YUwOGq9fb"&gt;Mr.
    Nordholm&lt;/span&gt; served as the PEO in all three years presented.</ecd:NamedExecutiveOfficersFnTextBlock>
    <ecd:PeoName contextRef="From2022-01-01to2022-12-31">Mr.     Nordholm</ecd:PeoName>
    <ecd:AdjToNonPeoNeoCompFnTextBlock contextRef="From2022-01-01to2022-12-31">The Non-PEO NEOs included for 2021 and 2022 consisted of Ms. Ramesh, Mr.
    Carpenter, Mr. Crady, and Mr. Mullery. The Non-PEO NEOs included for 2020 consisted of Ms. Ramesh, Mr. Carpenter, Mr. Mullery, and
    former executive officer John C. Covington.</ecd:AdjToNonPeoNeoCompFnTextBlock>
    <ecd:PeoTotalCompAmt
      contextRef="From2022-01-012022-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">3532666</ecd:PeoTotalCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_CumulativeDeductionsFromSCTTotalMember"
      decimals="0"
      id="Fact000047"
      unitRef="USD">1574299</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_CumulativeAdditionsToSCTTotalMember"
      decimals="0"
      id="Fact000048"
      unitRef="USD">1136457</ecd:AdjToCompAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2022-01-012022-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">3094824</ecd:PeoActuallyPaidCompAmt>
    <ecd:PeoTotalCompAmt
      contextRef="From2021-01-012021-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">3211156</ecd:PeoTotalCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_CumulativeDeductionsFromSCTTotalMember"
      decimals="0"
      id="Fact000051"
      unitRef="USD">1095102</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_CumulativeAdditionsToSCTTotalMember"
      decimals="0"
      id="Fact000052"
      unitRef="USD">2943981</ecd:AdjToCompAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2021-01-012021-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">5060035</ecd:PeoActuallyPaidCompAmt>
    <ecd:PeoTotalCompAmt
      contextRef="From2020-01-012020-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">2680795</ecd:PeoTotalCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_CumulativeDeductionsFromSCTTotalMember"
      decimals="0"
      id="Fact000055"
      unitRef="USD">1093672</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_CumulativeAdditionsToSCTTotalMember"
      decimals="0"
      id="Fact000056"
      unitRef="USD">858197</ecd:AdjToCompAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2020-01-012020-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">2445320</ecd:PeoActuallyPaidCompAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2022-01-012022-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">1136013</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_CumulativeDeductionsFromSCTTotalMember"
      decimals="0"
      id="Fact000061"
      unitRef="USD">368737</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_CumulativeAdditionsToSCTTotalMember"
      decimals="0"
      id="Fact000062"
      unitRef="USD">266009</ecd:AdjToCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2022-01-012022-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">1033285</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2021-01-012021-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">1045533</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_CumulativeDeductionsFromSCTTotalMember"
      decimals="0"
      id="Fact000065"
      unitRef="USD">291803</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_CumulativeAdditionsToSCTTotalMember"
      decimals="0"
      id="Fact000066"
      unitRef="USD">711306</ecd:AdjToCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2021-01-012021-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">1465036</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2020-01-012020-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">1117787</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_CumulativeDeductionsFromSCTTotalMember"
      decimals="0"
      id="Fact000069"
      unitRef="USD">385762</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_CumulativeAdditionsToSCTTotalMember"
      decimals="0"
      id="Fact000070"
      unitRef="USD">289990</ecd:AdjToCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2020-01-012020-12-31_custom_Peo1Member"
      decimals="0"
      unitRef="USD">1022015</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:PeoTotalCompAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      unitRef="USD">3532666</ecd:PeoTotalCompAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      unitRef="USD">1136013</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:PeoTotalCompAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      unitRef="USD">3211156</ecd:PeoTotalCompAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      unitRef="USD">1045533</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:PeoTotalCompAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      unitRef="USD">2680795</ecd:PeoTotalCompAmt>
    <ecd:NonPeoNeoAvgTotalCompAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      unitRef="USD">1117787</ecd:NonPeoNeoAvgTotalCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-1175634</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-277089</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-1095102</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-291803</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-852948</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_AggregateValueForStockAwardsAndOptionAwardsIncludedInSctAmountsForCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-285622</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">940719</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">266009</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">1716391</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">457320</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">858197</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_FairValueAtYearEndOfAwardsGrantedDuringCoveredFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">289990</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">-149823</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">-41443</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">892796</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">200666</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">-139027</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_YearOverYearChangeInFairValueAtCoveredFiscalYearEndOfAwardsGrantedInAnyPriorFiscalYearThatWereOutstandingAndUnvestedAtCoveredFiscalYearEndMember"
      decimals="0"
      unitRef="USD">-28588</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_VestingDateFairValueOfAwardsGrantedAndVestedDuringCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">195738</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_PeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-248843</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2022-01-012022-12-31_ecd_NonPeoNeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-50205</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_PeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">334795</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2021-01-012021-12-31_ecd_NonPeoNeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">53320</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_PeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-101697</ecd:AdjToCompAmt>
    <ecd:AdjToCompAmt
      contextRef="From2020-01-012020-12-31_ecd_NonPeoNeoMember_custom_ChangeAsOfVestingDateFromEndOfPriorFiscalYearInFairValueOfAwardsGrantedInAnyPriorFiscalYearForWhichVestingConditionsWereSatisfiedDuringCoveredFiscalYearMember"
      decimals="0"
      unitRef="USD">-71553</ecd:AdjToCompAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      unitRef="USD">3094824</ecd:PeoActuallyPaidCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2022-01-01to2022-12-31"
      decimals="0"
      unitRef="USD">1033285</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      unitRef="USD">5060035</ecd:PeoActuallyPaidCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2021-01-012021-12-31"
      decimals="0"
      unitRef="USD">1465036</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:PeoActuallyPaidCompAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      unitRef="USD">2445320</ecd:PeoActuallyPaidCompAmt>
    <ecd:NonPeoNeoAvgCompActuallyPaidAmt
      contextRef="From2020-01-012020-12-31"
      decimals="0"
      unitRef="USD">1022015</ecd:NonPeoNeoAvgCompActuallyPaidAmt>
    <ecd:TabularListTableTextBlock contextRef="From2022-01-01to2022-12-31">&lt;p id="xdx_804_eecd--TabularListTableTextBlock_dU_z5yCANXLglSj" style="font: 8pt Arial, Helvetica, Sans-Serif; margin: 0 0 10pt; text-align: justify; color: #58595B"&gt;&lt;span style="font-size: 8pt"&gt;&lt;b&gt;&lt;i&gt;Most
Important Measures to Determine 2022 CAP&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="font: 8pt Arial, Helvetica, Sans-Serif; margin: 0 0 0pt; text-align: justify; color: #58595B"&gt;&lt;span style="font-size: 8pt"&gt;In
Farmer Mac&#x2019;s assessment, the seven metrics listed below represent the most important financial performance measures that Farmer
Mac used to link each NEO&#x2019;s compensation to Farmer Mac&#x2019;s performance in 2022. Each of the listed financial measures was either
used in the balanced &#x201c;scorecard&#x201d; to determine annual short-term incentive compensation awards for performance in 2022 or
to determine the vesting of long-term performance-based RSUs that vested in 2022:&lt;/span&gt;&lt;/p&gt;

&lt;p style="font: 8pt Arial, Helvetica, Sans-Serif; margin: 0 0 0pt"&gt;&lt;span style="font-size: 8pt"&gt;&#160;&lt;/span&gt;&lt;/p&gt;

&lt;table cellpadding="0" cellspacing="0" style="font: 8pt Arial, Helvetica, Sans-Serif; width: 100%; border-collapse: collapse; margin-bottom: 10pt"&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: #F9F9F9"&gt;
    &lt;td class="xdx_phnt_RGlzY2xvc3VyZSAtIFBheSB2cyBQZXJmb3JtYW5jZSBEaXNjbG9zdXJlAA__" id="xdx_984_eecd--MeasureName_c20220101__20221231__ecd--MeasureAxis__1_zOQUqs1aVNce" style="border: #666051 1pt solid; padding-bottom: 2pt; font: 8pt Arial, Helvetica, Sans-Serif; width: 100%; padding-top: 2pt; padding-left: 4pt"&gt;&lt;span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; color: #58595B"&gt;Earnings
    (Core Earnings before Credit)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: rgb(230,233,239)"&gt;
    &lt;td class="xdx_phnt_RGlzY2xvc3VyZSAtIFBheSB2cyBQZXJmb3JtYW5jZSBEaXNjbG9zdXJlAA__" id="xdx_982_eecd--MeasureName_c20220101__20221231__ecd--MeasureAxis__2_zvHNrwJzIY15" style="border-right: #666051 1pt solid; border-bottom: #666051 1pt solid; border-left: #666051 1pt solid; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; padding-top: 2pt; padding-left: 4pt"&gt;&lt;span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; color: #58595B"&gt;Total
    Revenues&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: #F9F9F9"&gt;
    &lt;td class="xdx_phnt_RGlzY2xvc3VyZSAtIFBheSB2cyBQZXJmb3JtYW5jZSBEaXNjbG9zdXJlAA__" id="xdx_98C_eecd--MeasureName_c20220101__20221231__ecd--MeasureAxis__3_zX6nYtTF5QE7" style="border-right: #666051 1pt solid; border-bottom: #666051 1pt solid; border-left: #666051 1pt solid; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; padding-top: 2pt; padding-left: 4pt"&gt;&lt;span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; color: #58595B"&gt;Business
    Volume&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: rgb(230,233,239)"&gt;
    &lt;td class="xdx_phnt_RGlzY2xvc3VyZSAtIFBheSB2cyBQZXJmb3JtYW5jZSBEaXNjbG9zdXJlAA__" id="xdx_98F_eecd--MeasureName_c20220101__20221231__ecd--MeasureAxis__4_zLmeAx82ZMgk" style="border-right: #666051 1pt solid; border-bottom: #666051 1pt solid; border-left: #666051 1pt solid; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; padding-top: 2pt; padding-left: 4pt"&gt;&lt;span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; color: #58595B"&gt;Ratio
    of Substandard Assets to Regulatory Capital&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: #F9F9F9"&gt;
    &lt;td class="xdx_phnt_RGlzY2xvc3VyZSAtIFBheSB2cyBQZXJmb3JtYW5jZSBEaXNjbG9zdXJlAA__" id="xdx_980_eecd--MeasureName_c20220101__20221231__ecd--MeasureAxis__5_zoMg1zAjpVad" style="border-right: #666051 1pt solid; border-bottom: #666051 1pt solid; border-left: #666051 1pt solid; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; padding-top: 2pt; padding-left: 4pt"&gt;&lt;span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; color: #58595B"&gt;Compliance
    with applicable capital requirements&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: rgb(230,233,239)"&gt;
    &lt;td class="xdx_phnt_RGlzY2xvc3VyZSAtIFBheSB2cyBQZXJmb3JtYW5jZSBEaXNjbG9zdXJlAA__" id="xdx_982_eecd--MeasureName_c20220101__20221231__ecd--MeasureAxis__6_zLHNLCq8Hnt6" style="border-right: #666051 1pt solid; border-bottom: #666051 1pt solid; border-left: #666051 1pt solid; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; padding-top: 2pt; padding-left: 4pt"&gt;&lt;span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; color: #58595B"&gt;Net
    charge-offs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="font: 8pt Arial, Helvetica, Sans-Serif; vertical-align: top; background-color: #F9F9F9"&gt;
    &lt;td class="xdx_phnt_RGlzY2xvc3VyZSAtIFBheSB2cyBQZXJmb3JtYW5jZSBEaXNjbG9zdXJlAA__" id="xdx_981_eecd--MeasureName_c20220101__20221231__ecd--MeasureAxis__7_zBWMDtbhEBIb" style="border-right: #666051 1pt solid; border-bottom: #666051 1pt solid; border-left: #666051 1pt solid; font: 8pt Arial, Helvetica, Sans-Serif; padding-bottom: 2pt; padding-top: 2pt; padding-left: 4pt"&gt;&lt;span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; color: #58595B"&gt;90-day
    delinquencies&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
&lt;p style="font: 8pt Arial, Helvetica, Sans-Serif; margin: 0 0 0pt; text-align: justify; color: #58595B"&gt;&lt;span style="font-size: 8pt"&gt;These
measures are not listed or ranked in any particular order and are further described above in &#x201c;Compensation Discussion and Analysis&#x2014;Approach
to Incentive Compensation,&#x201d; &#x201c;&#x2014;Total Compensation Elements&#x2014;Annual Cash Incentive Compensation&#x201d; and &#x201c;&#x2014;Total
Compensation Elements&#x2014;Long-Term Incentive Compensation.&#x201d; Although it is always a challenge to narrow down to a few measures, the Compensation Committee chose these measures because they most closely represent the business goals established by the Board
and management for 2022 and balance the need for business volume growth, earnings, disciplined underwriting, high credit quality, and
continued financial stability with the enhancement of stockholder value. Farmer Mac believes that Earnings (sometimes referred to as
Core Earnings before Credit) is the most important financial performance measure tied to executive compensation. Earnings is used to
determine 25% of annual short-term incentive compensation awards and most appropriately reflects Farmer Mac&#x2019;s overall performance
over the short-term. Cumulative three-year Earnings is also the primary measure used to determine the vesting of performance-based
RSUs granted to the NEOs in 2022 and 2023.&lt;/span&gt;&lt;/p&gt;

</ecd:TabularListTableTextBlock>
    <ecd:MeasureName contextRef="From2022-01-012022-12-31_1">Earnings     (Core Earnings before Credit)</ecd:MeasureName>
    <ecd:MeasureName contextRef="From2022-01-012022-12-31_2">Total     Revenues</ecd:MeasureName>
    <ecd:MeasureName contextRef="From2022-01-012022-12-31_3">Business     Volume</ecd:MeasureName>
    <ecd:MeasureName contextRef="From2022-01-012022-12-31_4">Ratio     of Substandard Assets to Regulatory Capital</ecd:MeasureName>
    <ecd:MeasureName contextRef="From2022-01-012022-12-31_5">Compliance     with applicable capital requirements</ecd:MeasureName>
    <ecd:MeasureName contextRef="From2022-01-012022-12-31_6">Net     charge-offs</ecd:MeasureName>
    <ecd:MeasureName contextRef="From2022-01-012022-12-31_7">90-day     delinquencies</ecd:MeasureName>
    <link:footnoteLink
      xlink:role="http://www.xbrl.org/2003/role/link"
      xlink:type="extended">
        <link:loc
          xlink:href="#Fact000014"
          xlink:label="Fact000014"
          xlink:type="locator"/>
        <link:footnote id="Footnote000038" xlink:label="Footnote000038" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US"><xhtml:span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 7pt; color: #58595B"><xhtml:span id="xdx_90C_eecd--NamedExecutiveOfficersFnTextBlock_c20220101__20221231_znM0VAwhcLb6"><xhtml:span id="xdx_90F_eecd--PeoName_c20220101__20221231_z20YUwOGq9fb">Mr.
    Nordholm</xhtml:span> served as the PEO in all three years presented.</xhtml:span><xhtml:span id="xdx_903_eecd--AdjToNonPeoNeoCompFnTextBlock_c20220101__20221231_zqnA34e5OGc">The Non-PEO NEOs included for 2021 and 2022 consisted of Ms. Ramesh, Mr.
    Carpenter, Mr. Crady, and Mr. Mullery. The Non-PEO NEOs included for 2020 consisted of Ms. Ramesh, Mr. Carpenter, Mr. Mullery, and
    former executive officer John C. Covington.</xhtml:span></xhtml:span></link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000014"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000015"
          xlink:label="Fact000015"
          xlink:type="locator"/>
        <link:footnote id="Footnote000042" xlink:label="Footnote000042" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">To
    calculate CAP, the amounts shown below were deducted from and added to total compensation shown in the SCT. Farmer Mac has no pension
    plans or other defined benefit programs that affect the recalculation of the compensation disclosed under the SCT. Dividend equivalents
    paid in cash on vested RSUs are already included in the SCT totals for the PEO and the other NEOs.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000015"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000015"
          xlink:to="Footnote000042"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000016"
          xlink:label="Fact000016"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000016"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000017"
          xlink:label="Fact000017"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000017"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000017"
          xlink:to="Footnote000042"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000022"
          xlink:label="Fact000022"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000022"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000023"
          xlink:label="Fact000023"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000023"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000023"
          xlink:to="Footnote000042"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000024"
          xlink:label="Fact000024"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000024"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000025"
          xlink:label="Fact000025"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000025"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000025"
          xlink:to="Footnote000042"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000030"
          xlink:label="Fact000030"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000030"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000031"
          xlink:label="Fact000031"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000031"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000031"
          xlink:to="Footnote000042"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000032"
          xlink:label="Fact000032"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000032"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000033"
          xlink:label="Fact000033"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000033"
          xlink:to="Footnote000038"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000033"
          xlink:to="Footnote000042"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000018"
          xlink:label="Fact000018"
          xlink:type="locator"/>
        <link:footnote id="Footnote000043" xlink:label="Footnote000043" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Farmer
    Mac&#x2019;s TSR is based on the performance of its Class C Non-Voting Common Stock.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000018"
          xlink:to="Footnote000043"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000026"
          xlink:label="Fact000026"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000026"
          xlink:to="Footnote000043"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000034"
          xlink:label="Fact000034"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000034"
          xlink:to="Footnote000043"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000019"
          xlink:label="Fact000019"
          xlink:type="locator"/>
        <link:footnote id="Footnote000044" xlink:label="Footnote000044" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Farmer
    Mac selected the companies included in the S&amp;P 500 Diversified Financials Index as the peer group to show a peer group TSR compared
    to Farmer Mac&#x2019;s TSR. Farmer Mac has presented the performance of the S&amp;P 500 Diversified Financials Index in the performance
    graphs included in its annual reports to stockholders since 2007. Farmer Mac&#x2019;s relative performance against the S&amp;P 500
    Diversified Financials Index is also one of the metrics used in the March 9, 2023 award of performance-based RSUs to Mr. Nordholm
    designed to retain him as Farmer Mac&#x2019;s PEO through early 2026 and to reward performance.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000019"
          xlink:to="Footnote000044"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000027"
          xlink:label="Fact000027"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000027"
          xlink:to="Footnote000044"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000035"
          xlink:label="Fact000035"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000035"
          xlink:to="Footnote000044"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000021"
          xlink:label="Fact000021"
          xlink:type="locator"/>
        <link:footnote id="Footnote000045" xlink:label="Footnote000045" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">As
    described in more detail in the CD&amp;A, &#x201c;Earnings&#x201d; (sometimes referred to as &#x201c;Core Earnings Before Credit&#x201d;)
    is the non-GAAP financial measure of &#x201c;core earnings&#x201d; reported by Farmer Mac, excluding the after-tax effects of provisions
    for losses, gains or losses on fair value, or sale of REO property. See &#x201c;Compensation Discussion and Analysis&#x2014;Approach
    to Incentive Compensation&#x2014;Short-Term Incentive Compensation.&#x201d; For a reconciliation of Farmer Mac&#x2019;s GAAP net income
    attributable to common stockholders to non-GAAP core earnings, see &#x201c;Management&#x2019;s Discussion and Analysis of Financial
    Condition and Results of Operations&#x2014;Results of Operations&#x201d; in Farmer Mac&#x2019;s Annual Report on Form 10-K for the year
    ended December 31, 2022.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000021"
          xlink:to="Footnote000045"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000029"
          xlink:label="Fact000029"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000029"
          xlink:to="Footnote000045"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000037"
          xlink:label="Fact000037"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000037"
          xlink:to="Footnote000045"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000047"
          xlink:label="Fact000047"
          xlink:type="locator"/>
        <link:footnote id="Footnote000058" xlink:label="Footnote000058" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Represents
    the grant date fair value of equity-based awards granted each year. No change in pension value is reported for any of the years reflected
    in this table. More detail about the specific deductions and additions to the SCT totals to arrive at the CAP totals is presented
    in the separate &#x201c;Adjustments&#x201d; table below.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000047"
          xlink:to="Footnote000058"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000051"
          xlink:label="Fact000051"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000051"
          xlink:to="Footnote000058"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000055"
          xlink:label="Fact000055"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000055"
          xlink:to="Footnote000058"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000048"
          xlink:label="Fact000048"
          xlink:type="locator"/>
        <link:footnote id="Footnote000059" xlink:label="Footnote000059" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Reflects
    the value of equity calculated in accordance with SEC methodology for determining CAP for each year shown. More detail about the
    specific deductions and additions to the SCT totals to arrive at the CAP totals is presented in the separate &#x201c;Adjustments&#x201d;
    table below.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000048"
          xlink:to="Footnote000059"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000052"
          xlink:label="Fact000052"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000052"
          xlink:to="Footnote000059"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000056"
          xlink:label="Fact000056"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000056"
          xlink:to="Footnote000059"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000061"
          xlink:label="Fact000061"
          xlink:type="locator"/>
        <link:footnote id="Footnote000072" xlink:label="Footnote000072" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Represents
    the grant date fair value of equity-based awards granted each year. No change in pension value is reported for any of the years reflected
    in this table. More detail about the specific deductions and additions to the SCT totals to arrive at the CAP totals is presented
    in the separate &#x201c;Adjustments&#x201d; table below.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000061"
          xlink:to="Footnote000072"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000065"
          xlink:label="Fact000065"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000065"
          xlink:to="Footnote000072"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000069"
          xlink:label="Fact000069"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000069"
          xlink:to="Footnote000072"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000062"
          xlink:label="Fact000062"
          xlink:type="locator"/>
        <link:footnote id="Footnote000073" xlink:label="Footnote000073" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Reflects
    the value of equity calculated in accordance with SEC methodology for determining CAP for each year shown. More detail about the
    specific deductions and additions to the SCT totals to arrive at the CAP totals is presented in the separate &#x201c;Adjustments&#x201d;
    table below.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000062"
          xlink:to="Footnote000073"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000066"
          xlink:label="Fact000066"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000066"
          xlink:to="Footnote000073"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact000070"
          xlink:label="Fact000070"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact000070"
          xlink:to="Footnote000073"
          xlink:type="arc"/>
    </link:footnoteLink>
</xbrl>
