v3.20.1

Derivative Financial Instruments (Tables) | 12 Months Ended
--- | ---
Dec. 31, 2019
Derivative Instruments and Hedging Activities Disclosure [Abstract] |
Schedule Of NYMEX Contracts And Butane Price Swap Purchase Agreements | ur open futures contracts at December 31, 2019 were as follows:
Type of Contract/Accounting Methodology |  | Product Represented by the Contract and Associated Barrels |  | Maturity Dates
Futures - Economic Hedges |  | 3.2 million barrels of refined products and crude oil |  | Between January and May 2020
Futures - Economic Hedges |  | 0.7 million barrels of gas liquids |  | Between January and April 2020
Derivatives and Offset Amounts | December 31, 2018 and 2019 (in thousands):
|  | Gross Amounts of Recognized Assets (Liabilities) |  | Gross Amounts of Assets (Liabilities) Offset in the Consolidated Balance Sheets |  | Net Amounts of Assets (Liabilities) Presented in the Consolidated Balance Sheets |  | Margin Deposit Amounts Not Offset in the Consolidated Balance Sheets |  | Net Asset Amount(1)
As of December 31, 2018 |  | $ | 62,166 |  |  | $ | (7,155 | ) |  | $ | 55,011 |  |  | $ | (37,328 | ) |  | $ | 17,683 |
As of December 31, 2019 |  | $ | (11,033 | ) |  | $ | 811 |  |  | $ | (10,222 | ) |  | $ | 27,415 |  |  | $ | 17,193 |
Schedule of Derivative Instruments, Effect on Other Comprehensive Income (Loss) | The changes in derivative activity included in AOCL for the years ended December 31, 2017, 2018 and 2019 were as follows (in thousands):
|  | Year Ended December 31,
Derivative Gains (Losses) Included in AOCL |  | 2017 |  | 2018 |  | 2019
Beginning balance |  | $ | (34,776 | ) |  | $ | (33,755 | ) |  | $ | (26,480 | )
Net gain (loss) on interest rate contract cash flow hedges |  | (1,937 | ) |  | 4,317 |  |  | (25,216 | )
Reclassification of net loss on cash flow hedges to income |  | 2,958 |  |  | 2,958 |  |  | 2,736 |
Ending balance |  | $ | (33,755 | ) |  | $ | (26,480 | ) |  | $ | (48,960 | )
Schedule of Cash Flow Hedges Included in Accumulated Other Comprehensive Income (Loss) | The following is a summary of the effect on our consolidated statements of income for the years ended December 31, 2017, 2018 and 2019 of derivatives that were designated as cash flow hedges (in thousands):
|  | Interest Rate Contracts
|  | Amount of Gain (Loss) Recognized in AOCL on Derivatives |  | Location of Loss Reclassified from AOCL into Income |  | Amount of Loss Reclassified from AOCL into Income |
Year Ended December 31, 2017 |  |  | $ | (1,937 | ) |  |  | Interest expense |  |  | $ | (2,958 | ) |  |
Year Ended December 31, 2018 |  |  | $ | 4,317 |  |  |  | Interest expense |  |  | $ | (2,958 | ) |  |
Year Ended December 31, 2019 |  |  | $ | (25,216 | ) |  |  | Interest expense |  |  | $ | (2,736 | ) |  |
Schedule of Derivatives and Hedging-Overall-Subsequent Measurement | The following table provides a summary of the effect on our consolidated statements of income for the years ended December 31, 2017, 2018 and 2019 of derivatives that were not designated as hedging instruments (in thousands):
|  |  |  | Amount of Gain (Loss) Recognized on Derivative
|  |  |  | Year Ended December 31,
Derivative Instrument |  | Location of Gain (Loss) Recognized on Derivatives |  | 2017 |  | 2018 |  | 2019
Futures contracts |  | Product sales revenue |  | $ | (56,338 | ) |  | $ | 85,012 |  |  | $ | (72,562 | )
Futures contracts |  | Cost of product sales |  | 25,566 |  |  | (15,947 | ) |  | (1,931 | )
Futures contracts |  | Operating expenses |  | 3,002 |  |  | — |  |  | — |
Basis derivative agreement |  | Other operating income (expense) |  | — |  |  | — |  |  | (10,252 | )
|  | Total |  | $ | (27,770 | ) |  | $ | 69,065 |  |  | $ | (84,745 | )
Schedule of Derivative Instruments in Statement of Financial Position, Fair Value | The following table provides a summary of the fair value of derivatives, which are presented on a net basis in our consolidated balance sheets, that were designated as hedging instruments as of December 31, 2018 (in thousands). There were no derivatives designated as hedging instruments as of December 31, 2019.
|  | December 31, 2018
|  | Asset Derivatives |  | Liability Derivatives
Derivative Instrument |  | Balance Sheet Location |  | Fair Value |  | Balance Sheet Location |  | Fair Value
Futures contracts |  | Commodity derivatives contracts, net |  | $ | 462 |  |  | Commodity derivatives contracts, net |  | $ | — |
Interest rate contracts |  | Other noncurrent assets |  | 312 |  |  | Other noncurrent liabilities |  | 8,438 |
|  | Total |  | $ | 774 |  |  | Total |  | $ | 8,438 |
The following tables provide a summary of the fair value of derivatives, which are presented on a net basis in our consolidated balance sheets, that were not designated as hedging instruments as of December 31, 2018 and 2019 (in thousands):
|  | December 31, 2018
|  | Asset Derivatives |  | Liability Derivatives
Derivative Instrument |  | Balance Sheet Location |  | Fair Value |  | Balance Sheet Location |  | Fair Value
Futures contracts |  | Commodity derivatives contracts, net |  | $ | 61,704 |  |  | Commodity derivatives contracts, net |  | $ | 7,155 |
|  | December 31, 2019
|  | Asset Derivatives |  | Liability Derivatives
Derivative Instrument |  | Balance Sheet Location |  | Fair Value |  | Balance Sheet Location |  | Fair Value
Futures contracts |  | Commodity derivatives contracts, net |  | $ | 811 |  |  | Commodity derivatives contracts, net |  | $ | 11,033 |
Basis derivative agreement |  | Other current assets |  | — |  |  | Other current liabilities |  | 8,457 |
Basis derivative agreement |  | Other noncurrent assets |  | — |  |  | Other noncurrent liabilities |  | 8,847 |
|  | Total |  | $ | 811 |  |  | Total |  | $ | 28,337 |

X
- Definition Derivatives and Offset Amounts [Table Text Block] + References No definition available. + Details
Name: | mmp_DerivativesAndOffsetAmountsTableTextBlock
Namespace Prefix: | mmp_
Data Type: | nonnum:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure for other derivative instruments not designated as hedging instruments of the location and amount of gains and losses reported in the statement of financial performance. + References No definition available. + Details
Name: | mmp_ScheduleOfDerivativesAndHedgingOverallSubsequentMeasurementTableTextBlock
Namespace Prefix: | mmp_
Data Type: | nonnum:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Schedule Of NYMEX Contracts And Butane Price Swap Purchase Agreements [Table Text Block] + References No definition available. + Details
Name: | mmp_ScheduleOfNymexContractsAndButanePriceSwapPurchaseAgreementsTableTextBlock
Namespace Prefix: | mmp_
Data Type: | nonnum:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- References No definition available. + Details
Name: | us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of gain (loss) on derivative and nonderivative instruments designated and qualifying as cash flow hedge recorded in accumulated other comprehensive income (AOCI) and reclassified into earnings. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 815 -SubTopic 10 -Section 50 -Paragraph 4C -Subparagraph (c) -URI http://asc.fasb.org/extlink&oid=109980867&loc=SL5624171-113959 + Details
Name: | us-gaap_ScheduleOfCashFlowHedgesIncludedInAccumulatedOtherComprehensiveIncomeLossTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | nonnum:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of the effective portion of the gains and losses on derivative instruments designated (and non-derivative instruments) designated and qualifying in cash flow hedges and net investment hedges that was recognized in other comprehensive income (loss) during the current period. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 815 -SubTopic 10 -Section 50 -Paragraph 4C -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=109980867&loc=SL5624171-113959 + Details
Name: | us-gaap_ScheduleOfDerivativeInstrumentsEffectOnOtherComprehensiveIncomeLossTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | nonnum:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of the location and fair value amounts of derivative instruments (and nonderivative instruments that are designated and qualify as hedging instruments) reported in the statement of financial position. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 815 -SubTopic 10 -Section 50 -Paragraph 4B -URI http://asc.fasb.org/extlink&oid=109980867&loc=SL5624163-113959 + Details
Name: | us-gaap_ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock
Namespace Prefix: | us-gaap_
Data Type: | nonnum:textBlockItemType
Balance Type: | na
Period Type: | duration