XML 110 R75.htm IDEA: XBRL DOCUMENT
v3.24.0.1

EQUITY - Schedule of SARs and Non-Vested Restricted Stock Outstanding (Details) - $ / shares | 12 Months Ended |
--- | --- | ---
Dec. 31, 2023 | Dec. 31, 2022 | Dec. 31, 2021 | Dec. 31, 2020
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 135.12 | $ 120.38 | $ 88.68 |
Weighted-average grant-date fair value (in dollars per share) | $ 120.13 | $ 91.84 | $ 78.55 | $ 71.76
Outstanding, non-vested restricted stock (in shares) | 114,353 | 100,025 | 103,891 | 83,956
Expected to vest, non-vested restricted stock (in shares) | 114,621 |  |  |
SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, SARs (in shares) | 125,952 | 132,163 | 130,409 | 116,417
Exercisable, SARs (in shares) | 87,378 | 83,054 | 72,106 |
Vested or expected to vest, SARs (in shares) | 125,952 |  |  |
$25.00 - $39.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 25.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 39.99 |  |  |
Outstanding, SARs (in shares) | 18,735 |  |  |
Outstanding, weighted-average remaining contractual life | 1 year 7 months 6 days |  |  |
Exercisable, SARs (in shares) | 18,735 |  |  |
Exercisable, weighted-average remaining contractual life | 1 year 7 months 6 days |  |  |
Vested or expected to vest, SARs (in shares) | 18,735 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 1 year 7 months 6 days |  |  |
40.00 - 54.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 40.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 54.99 |  |  |
Outstanding, SARs (in shares) | 0 |  |  |
Outstanding, weighted-average remaining contractual life | 0 years |  |  |
Exercisable, SARs (in shares) | 0 |  |  |
Exercisable, weighted-average remaining contractual life | 0 years |  |  |
Vested or expected to vest, SARs (in shares) | 0 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 0 years |  |  |
55.00 - 69.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 55.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 69.99 |  |  |
Outstanding, SARs (in shares) | 3,381 |  |  |
Outstanding, weighted-average remaining contractual life | 3 years 3 months 18 days |  |  |
Exercisable, SARs (in shares) | 3,381 |  |  |
Exercisable, weighted-average remaining contractual life | 3 years 3 months 18 days |  |  |
Vested or expected to vest, SARs (in shares) | 3,381 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 3 years 3 months 18 days |  |  |
70.00 - 84.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 70.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 84.99 |  |  |
Outstanding, SARs (in shares) | 39,642 |  |  |
Outstanding, weighted-average remaining contractual life | 5 years 9 months 18 days |  |  |
Exercisable, SARs (in shares) | 39,642 |  |  |
Exercisable, weighted-average remaining contractual life | 5 years 9 months 18 days |  |  |
Vested or expected to vest, SARs (in shares) | 39,642 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 5 years 9 months 18 days |  |  |
85.00 - 99.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 85.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 99.99 |  |  |
Outstanding, SARs (in shares) | 29,001 |  |  |
Outstanding, weighted-average remaining contractual life | 6 years 7 months 6 days |  |  |
Exercisable, SARs (in shares) | 19,476 |  |  |
Exercisable, weighted-average remaining contractual life | 6 years 3 months 18 days |  |  |
Vested or expected to vest, SARs (in shares) | 29,001 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 6 years 7 months 6 days |  |  |
100.00 - 114.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 100.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 114.99 |  |  |
Outstanding, SARs (in shares) | 0 |  |  |
Outstanding, weighted-average remaining contractual life | 0 years |  |  |
Exercisable, SARs (in shares) | 0 |  |  |
Exercisable, weighted-average remaining contractual life | 0 years |  |  |
Vested or expected to vest, SARs (in shares) | 0 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 0 years |  |  |
115.00 - 129.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 115.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 129.99 |  |  |
Outstanding, SARs (in shares) | 18,432 |  |  |
Outstanding, weighted-average remaining contractual life | 8 years 2 months 12 days |  |  |
Exercisable, SARs (in shares) | 6,144 |  |  |
Exercisable, weighted-average remaining contractual life | 8 years 2 months 12 days |  |  |
Vested or expected to vest, SARs (in shares) | 18,432 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 8 years 2 months 12 days |  |  |
130.00 - 144.99 | SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 130.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 144.99 |  |  |
Outstanding, SARs (in shares) | 16,761 |  |  |
Outstanding, weighted-average remaining contractual life | 9 years 3 months 18 days |  |  |
Exercisable, SARs (in shares) | 0 |  |  |
Exercisable, weighted-average remaining contractual life | 0 years |  |  |
Vested or expected to vest, SARs (in shares) | 16,761 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 9 years 3 months 18 days |  |  |
$80.00 - $94.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 30,182 |  |  |
Outstanding, weighted-average remaining contractual life | 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 30,450 |  |  |
Expected to vest, weighted-average remaining contractual life | 1 month 6 days |  |  |
$80.00 - $94.99 | Minimum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 80.00 |  |  |
$80.00 - $94.99 | Maximum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 94.99 |  |  |
95.00 - 109.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 219 |  |  |
Outstanding, weighted-average remaining contractual life | 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 219 |  |  |
Expected to vest, weighted-average remaining contractual life | 3 months 18 days |  |  |
95.00 - 109.99 | Minimum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 95.00 |  |  |
95.00 - 109.99 | Maximum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 109.99 |  |  |
110.00 - 124.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 24,779 |  |  |
Outstanding, weighted-average remaining contractual life | 1 year 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 24,779 |  |  |
Expected to vest, weighted-average remaining contractual life | 1 year 3 months 18 days |  |  |
110.00 - 124.99 | Minimum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 110.00 |  |  |
110.00 - 124.99 | Maximum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 124.99 |  |  |
125.00 - 139.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 56,194 |  |  |
Outstanding, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 56,194 |  |  |
Expected to vest, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
125.00 - 139.99 | Minimum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 125.00 |  |  |
125.00 - 139.99 | Maximum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 139.99 |  |  |
140.00 - 154.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 2,979 |  |  |
Outstanding, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 2,979 |  |  |
Expected to vest, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
140.00 - 154.99 | Minimum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 140.00 |  |  |
140.00 - 154.99 | Maximum |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Weighted-average grant-date fair value (in dollars per share) | $ 154.99 |  |  |

X
- Definition Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Expected to Vest, Number + References No definition available. + Details
Name: | agm_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsExpectedToVestNumber
Namespace Prefix: | agm_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Share-Based Compensation Arrangement By Share-Based Payment Award, Other Than Options, Vested And Expected To Vest, Outstanding, Weighted Average Contractual Life Term + References No definition available. + Details
Name: | agm_ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsVestedAndExpectedToVestOutstandingWeightedAverageContractualLifeTerm
Namespace Prefix: | agm_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition The number of non-vested equity-based payment instruments, excluding stock (or unit) options, that validly exist and are outstanding as of the balance sheet date. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(i) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(ii) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Per share or unit weighted-average fair value of nonvested award under share-based payment arrangement. Excludes share and unit options. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(i) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(ii) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:perShareItemType
Balance Type: | na
Period Type: | instant

X
- Definition Weighted average remaining contractual term for equity-based awards excluding options, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 718 -SubTopic 10 -Subparagraph (e)(1) -Name Accounting Standards Codification -Paragraph 2 -Section 50 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition The number of shares into which fully or partially vested stock options outstanding as of the balance sheet date can be currently converted under the option plan. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iii) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Number of options outstanding, including both vested and non-vested options. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(i) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(ii) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Number of fully vested and expected to vest options outstanding that can be converted into shares under option plan. Includes, but is not limited to, unvested options for which requisite service period has not been rendered but that are expected to vest based on achievement of performance condition, if forfeitures are recognized when they occur. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (e)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingNumber
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References No definition available. + Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition The floor of a customized range of exercise prices for purposes of disclosing shares potentially issuable under outstanding stock option awards on all stock option plans and other required information pertaining to awards in the customized range. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (g) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:perShareItemType
Balance Type: | na
Period Type: | duration

X
- Definition The ceiling of a customized range of exercise prices for purposes of disclosing shares potentially issuable under outstanding stock option awards on all stock option plans and other required information pertaining to awards in the customized range. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (g) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:perShareItemType
Balance Type: | na
Period Type: | duration

X
- Definition Weighted average remaining contractual term for vested portions of options outstanding and currently exercisable or convertible, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition Weighted average remaining contractual term for option awards outstanding, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 718 -SubTopic 10 -Subparagraph (e)(1) -Name Accounting Standards Codification -Paragraph 2 -Section 50 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition Weighted average remaining contractual term for fully vested and expected to vest options outstanding, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. Includes, but is not limited to, unvested options for which requisite service period has not been rendered but that are expected to vest based on achievement of performance condition, if forfeitures are recognized when they occur. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (e)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingWeightedAverageRemainingContractualTerm1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_StockAppreciationRightsSARSMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A25.00to39.99Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A40.0054.99Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A55.00to69.99Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A70.00to84.99Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A85.00to99.99Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A10000To11499Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A11500To12999Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A13000To14499Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A80.00to94.99Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MinimumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MaximumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A9500To10999Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A11000To12499Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A12500To13999Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A14000To15499Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |