XML 103 R77.htm IDEA: XBRL DOCUMENT
v3.25.0.1

EQUITY - Schedule of SARs and Non-Vested Restricted Stock Outstanding (Details) - $ / shares | 12 Months Ended |
--- | --- | ---
Dec. 31, 2024 | Dec. 31, 2023 | Dec. 31, 2022 | Dec. 31, 2021
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
SARs exercise price, lower range limit (in dollars per share) | $ 198.54 | $ 135.12 | $ 120.38 |
Weighted-average grant-date fair value (in dollars per share) | $ 156.37 | $ 120.13 | $ 91.84 | $ 78.55
Outstanding, non-vested restricted stock (in shares) | 96,939 | 114,353 | 100,025 | 103,891
Expected to vest, non-vested restricted stock (in shares) | 96,939 |  |  |
SARs |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, SARs (in shares) | 106,689 | 125,952 | 132,163 | 130,409
Exercisable, SARs (in shares) | 73,906 | 87,378 | 83,054 |
Vested or expected to vest, SARs (in shares) | 106,689 |  |  |
$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) | 4,000 |  |  |
Outstanding, weighted-average remaining contractual life | 2 months 12 days |  |  |
Exercisable, SARs (in shares) | 4,000 |  |  |
Exercisable, weighted-average remaining contractual life | 2 months 12 days |  |  |
Vested or expected to vest, SARs (in shares) | 4,000 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 2 months 12 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 | 2 years 2 months 12 days |  |  |
Exercisable, SARs (in shares) | 3,381 |  |  |
Exercisable, weighted-average remaining contractual life | 2 years 2 months 12 days |  |  |
Vested or expected to vest, SARs (in shares) | 3,381 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 2 years 2 months 12 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) | 30,942 |  |  |
Outstanding, weighted-average remaining contractual life | 4 years 9 months 18 days |  |  |
Exercisable, SARs (in shares) | 30,942 |  |  |
Exercisable, weighted-average remaining contractual life | 4 years 9 months 18 days |  |  |
Vested or expected to vest, SARs (in shares) | 30,942 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 4 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) | 21,162 |  |  |
Outstanding, weighted-average remaining contractual life | 5 years 9 months 18 days |  |  |
Exercisable, SARs (in shares) | 21,162 |  |  |
Exercisable, weighted-average remaining contractual life | 5 years 9 months 18 days |  |  |
Vested or expected to vest, SARs (in shares) | 21,162 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 5 years 9 months 18 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) | 14,978 |  |  |
Outstanding, weighted-average remaining contractual life | 7 years 2 months 12 days |  |  |
Exercisable, SARs (in shares) | 8,834 |  |  |
Exercisable, weighted-average remaining contractual life | 7 years 2 months 12 days |  |  |
Vested or expected to vest, SARs (in shares) | 14,978 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 7 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 | 8 years 3 months 18 days |  |  |
Exercisable, SARs (in shares) | 5,587 |  |  |
Exercisable, weighted-average remaining contractual life | 8 years 3 months 18 days |  |  |
Vested or expected to vest, SARs (in shares) | 16,761 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 8 years 3 months 18 days |  |  |
145.00 - 159.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) | $ 145.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 159.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 |  |  |
160.00 - 174.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) | $ 160.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 174.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 |  |  |
175.00 - 189.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) | $ 175.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 189.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 |  |  |
190.00 - 204.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) | $ 190.00 |  |  |
SARs exercise price, upper range limit (in dollars per share) | $ 204.99 |  |  |
Outstanding, SARs (in shares) | 15,465 |  |  |
Outstanding, weighted-average remaining contractual life | 2 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) | 15,465 |  |  |
Vested or expected to vest, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
$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) | 20,087 |  |  |
Outstanding, weighted-average remaining contractual life | 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 20,087 |  |  |
Expected to vest, weighted-average remaining contractual life | 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) | 38,272 |  |  |
Outstanding, weighted-average remaining contractual life | 1 year 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 38,272 |  |  |
Expected to vest, weighted-average remaining contractual life | 1 year 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) | 1,860 |  |  |
Outstanding, weighted-average remaining contractual life | 1 year 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 1,860 |  |  |
Expected to vest, weighted-average remaining contractual life | 1 year 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 |  |  |
155.00 - 169.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 0 |  |  |
Outstanding, weighted-average remaining contractual life | 0 years |  |  |
Expected to vest, non-vested restricted stock (in shares) | 0 |  |  |
Expected to vest, weighted-average remaining contractual life | 0 years |  |  |
155.00 - 169.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) | $ 155.00 |  |  |
155.00 - 169.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) | $ 169.99 |  |  |
170.00 - 184.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 610 |  |  |
Outstanding, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 610 |  |  |
Expected to vest, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
170.00 - 184.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) | $ 170.00 |  |  |
170.00 - 184.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) | $ 184.99 |  |  |
185.00 - 199.99 |  |  |  |
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range [Line Items] |  |  |  |
Outstanding, non-vested restricted stock (in shares) | 36,110 |  |  |
Outstanding, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
Expected to vest, non-vested restricted stock (in shares) | 36,110 |  |  |
Expected to vest, weighted-average remaining contractual life | 2 years 3 months 18 days |  |  |
185.00 - 199.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) | $ 185.00 |  |  |
185.00 - 199.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) | $ 199.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_A145.00To159.99Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

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

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

X
- Details
Name: | us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis=agm_A190.00To204.99Member
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: | 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_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: |

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

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

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