Property, Plant and Equipment [Abstract] Summary Of Property, Plant And Equipment Property, Plant and Equipment [Table Text Block] Segment Reporting [Abstract] Schedule of Segment Reporting Information, by Segment [Table] Schedule of Segment Reporting Information, by Segment [Table] Segments [Axis] Segments [Axis] Segments [Domain] Segments [Domain] Refining & Marketing Refining And Marketing [Member] MPC's Refining and Marketing operating segment refines crude oil and other feedstocks at our refineries in the Gulf Coast and Midwest regions of the United States and distributes refined products through various means, including barges, terminals and trucks that we own or operate. We sell refined products to wholesale marketing customers domestically and internationally, to buyers on the spot market, to our Speedway segment and to dealers and jobbers who operate Marathon-branded retail outlets. Retail Retail Segment [Member] Retail Segment [Member] Midstream Midstream [Member] MPC's Midstream operating segment transports crude oil and other feedstocks to our refineries and other locations and delivers refined products to wholesale and retail market areas, and owns, among other transportation-related assets, a majority interest in LOOP LLC, which is owner and operator of the only U.S. deepwater oil port. The segment was previously called the Pipeline Transportation segment, but was renamed with the MarkWest merger to reflect the expanded business activity in natural gas and natural gas liquids markets. Reportable Segment Reportable Segment [Member] Reportable Segment [Member] Consolidation Items [Axis] Consolidation Items [Axis] Consolidation Items [Domain] Consolidation Items [Domain] Intersegment Eliminations Intersegment Eliminations [Member] Operating Segments Operating Segments [Member] Segment Reporting Information [Line Items] Segment Reporting Information [Line Items] Sales and other operating revenues Revenue from Contract with Customer, Excluding Assessed Tax Income from operations Operating Income (Loss) Depreciation and amortization Depreciation, Depletion and Amortization Capital expenditures and investments Capital Expenditures And Investments Capital expenditures (including payments to acquire property, plant and equipment; payments to acquire businesses excluding inventories and liabilities assumed; and change in capital accruals) and investments. Fair Value Disclosures [Abstract] Fair Value, Recurring and Nonrecurring [Table] Fair Value, Recurring and Nonrecurring [Table] Measurement Frequency [Axis] Measurement Frequency [Axis] Measurement Frequency [Domain] Measurement Frequency [Domain] Fair Value, Measurements, Recurring Fair Value, Recurring [Member] Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] The amount of total losses for the period included in earnings attributable to the change in unrealized losses relating to assets still held at the end of period: Fair Value, Liability, Recurring Basis, Still Held, Unrealized Gain (Loss) Debt Disclosure [Abstract] Schedule of Long-term Debt Instruments [Table] Schedule of Long-term Debt Instruments [Table] Debt Instrument [Axis] Debt Instrument [Axis] Debt Instrument, Name [Domain] Debt Instrument, Name [Domain] MPC 364-day bank revolving credit facility MPC 364-Day Revolver due September 2019 [Member] MPC 364-Day Revolver due September 2019 MPC bank revolving credit facility New MPC Five-Year Revolver [Member] New MPC Five-Year Revolver [Member] MPC trade receivables securitization facility Trade Receivables Securitization Facility due July 2019 [Member] Trade Receivables Securitization Facility due July 2019 MPLX bank revolving credit facility MPLX Revolving Credit Facility due July 2022 [Member] MPLX Revolving Credit Facility due July 2022 MPLX term loan facility MPLX Term Loan [Member] MPLX Term Loan [Member] Debt Instrument [Line Items] Debt Instrument [Line Items] Total Capacity Line of Credit Facility, Current Borrowing Capacity Outstanding Borrowings Long-term Line of Credit Outstanding Letters of Credit Letters of Credit Outstanding, Amount Available Capacity Line of Credit Facility, Remaining Borrowing Capacity Weighted Average Interest Rate Debt, Weighted Average Interest Rate Statement of Comprehensive Income [Abstract] Actuarial changes, tax Other Comprehensive Income (Loss), Pension and Other Postretirement Benefit Plans, Net Unamortized Gain (Loss) Adjustment, Tax Amount of tax expense (benefit), after reclassification adjustments, of increase (decrease) in accumulated other comprehensive income (loss) related to the net actuarial gain (loss) pension and other postretirement defined benefit plans. Prior service credit, tax Other Comprehensive (Income) Loss, Pension and Other Postretirement Benefit Plans, Net Prior Service Cost (Credit) Adjustment, Tax Amount of tax (expense) benefit, after reclassification adjustments, of (increase) decrease in accumulated other comprehensive (income) loss related to net prior service cost (credit) pension and other postretirement defined benefit plans. Other, tax Other Comprehensive Income, Other, Tax Other Comprehensive Income, Other, Tax Assets and Liabilities Accounted for at Fair Value on Recurring Basis Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis [Table Text Block] Reconciliation of Net Beginning and Ending Balances Recorded for Net Assets and Liabilities Classified as Level 3 Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Table Text Block] Business Combinations [Abstract] Schedule of Business Acquisitions, by Acquisition [Table] Schedule of Business Acquisitions, by Acquisition [Table] Business Acquisition [Axis] Business Acquisition [Axis] Business Acquisition, Acquiree [Domain] Business Acquisition, Acquiree [Domain] Andeavor Andeavor [Member] Andeavor [Member] Business Acquisition [Line Items] Business Acquisition [Line Items] Total fair value of consideration transferred Business Combination, Consideration Transferred, Including Equity Interest in Acquiree Held Prior to Combination Fair value of MPC shares issued Business Combination, Consideration Transferred, Equity Interests Issued and Issuable Cash payment to Andeavor stockholders Payments to Acquire Businesses, Gross Goodwill Goodwill Goodwill, expected tax deductible amount Business Acquisition, Goodwill, Expected Tax Deductible Amount Noncontrolling Interest [Abstract] Statement [Table] Statement [Table] Legal Entity [Axis] Legal Entity [Axis] Entity [Domain] Entity [Domain] MPLX MPLX LP [Member] MPLX LP [Member] ANDX Andeavor Logistics [Member] Andeavor Logistics [Member] Public or Nonpublic Designator [Axis] Public or Nonpublic Designator [Axis] Public or NonPublic Designator [Axis] Public or Non-Public Designator [Domain] Public or Non-Public Designator [Domain] [Domain] for Public or Non-Public Designator [Axis] Public Public [Member] Public [Member] Nonpublic Nonpublic [Member] Nonpublic [Member] Equity Components [Axis] Equity Components [Axis] Equity Component [Domain] Equity Component [Domain] Additional Paid-in Capital Additional Paid-in Capital [Member] Partner Type [Axis] Partner Type [Axis] Partner Type of Partners' Capital Account, Name [Domain] Partner Type of Partners' Capital Account, Name [Domain] Preferred Partner Preferred Partner [Member] Class of Stock [Axis] Class of Stock [Axis] Class of Stock [Domain] Class of Stock [Domain] Series B Preferred Stock Series B Preferred Stock [Member] Preferred Class B Preferred Class B [Member] Statement [Line Items] Statement [Line Items] MPC's partnership interest in MLP (in percentage) Noncontrolling Interest, Ownership Percentage by Parent Common units conversion ratio Common Units Conversion Ratio - ANDX to MPLX Ratio applied to the conversion of ANDX common units to MPLX common units Preferred units, outstanding Preferred Units, Outstanding Distribution declared, per unit Distribution Made to Limited Partner, Distributions Declared, Per Unit Equity transactions of MPLX & ANDX Impact of Subsidiary Equity Transactions Impact of Subsidiary Equity Transactions Deferred income tax impact from changes in equity Deferred income tax impact from changes in equity Deferred income tax impact from changes in equity Segment Information Segment Reporting Disclosure [Text Block] Statement of Stockholders' Equity [Abstract] Common Stock Common Stock [Member] Treasury Stock Treasury Stock [Member] Retained Earnings Retained Earnings [Member] Accumulated Other Comprehensive Loss AOCI Attributable to Parent [Member] Non-controlling Interests Noncontrolling Interest [Member] Increase (Decrease) in Stockholders' Equity [Roll Forward] Increase (Decrease) in Stockholders' Equity [Roll Forward] Beginning balance Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest Cumulative effect of new accounting principle in period of adoption Cumulative Effect of New Accounting Principle in Period of Adoption Net income (loss) Net Income (Loss), Including Portion Attributable to Nonredeemable Noncontrolling Interest Dividends declared on common stock Dividends, Common Stock, Cash Distributions to noncontrolling interests Noncontrolling Interest, Decrease from Distributions to Noncontrolling Interest Holders Contributions from noncontrolling interests Noncontrolling Interest, Increase from Subsidiary Equity Issuance Other comprehensive income (loss) Other Comprehensive Income (Loss), Net of Tax Shares repurchased Treasury Stock, Value, Acquired, Cost Method Shares returned - stock based compensation Shares Issued, Value, Share-based Payment Arrangement, Forfeited Shares issued - stock based compensation Shares Issued, Value, Share-based Payment Arrangement, before Forfeiture Net shares issued - stock based compensation Shares Issued, Value, Share-based Payment Arrangement, after Forfeiture Other Stockholders' Equity, Other Ending balance Restatement [Axis] Restatement [Axis] Restatement [Domain] Restatement [Domain] As originally reported Previously Reported [Member] Adjustments Restatement Adjustment [Member] Cash and cash equivalents Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Cash and Equivalents Receivables Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Current Assets, Receivables Inventories Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Inventory Other current assets Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Current Assets, Other Equity method investments Business Combination, Recognized Identifiable Assets Acquired, Equity Method Investments Business Combination, Recognized Identifiable Assets Acquired, Equity Method Investments Property, plant and equipment, net Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Property, Plant, and Equipment Other noncurrent assets Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Other Noncurrent Assets Total assets acquired Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Assets Accounts payable Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Current Liabilities, Accounts Payable Payroll and benefits payable Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Current Liabilities, Payroll and Benefits Payable Amount of liabilities incurred for payroll and benefits assumed at the acquisition date. Accrued taxes Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Accrued Taxes Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Accrued Taxes Debt due within one year Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Current Liabilities, Long-term Debt Other current liabilities Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Current Liabilities, Other Long-term debt Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Noncurrent Liabilities, Long-term Debt Deferred income taxes Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Deferred Tax Liabilities Noncurrent Defined benefit postretirement plan obligations Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Defined Benefit Postretirement Plan Obligations Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Defined Benefit Postretirement Plan Obligations Deferred credit and other liabilities Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Noncurrent Liabilities, Other Noncontrolling interests Business Combination, Acquisition of Less than 100 Percent, Noncontrolling Interest, Fair Value Total liabilities and noncontrolling interest assumed Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Liabilities Net assets acquired excluding goodwill Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Net Net assets acquired Business Combination, Recognized Identifiable Assets Acquired, Goodwill, and Liabilities Assumed, Less Noncontrolling Interest Temporary Equity [Abstract] Beginning balance Redeemable Noncontrolling Interest, Equity, Carrying Amount Net income attributable to redeemable noncontrolling interest Net Income (Loss) Attributable to Redeemable Noncontrolling Interest Distributions to noncontrolling interests Temporary Equity, Other Changes Equity transactions of MPLX & ANDX Stock Redeemed or Called During Period, Value Ending balance Commitments and Contingencies Disclosure [Abstract] Loss Contingencies [Table] Loss Contingencies [Table] Litigation Status [Axis] Litigation Status [Axis] Litigation Status [Domain] Litigation Status [Domain] Pending Litigation Pending Litigation [Member] Loss Contingencies [Line Items] Loss Contingencies [Line Items] Loss contingency, inestimable loss Loss Contingency, Inestimable Loss Related Party Transactions [Abstract] Sales to related parties Revenue from Related Parties Purchases from related parties Costs and Expenses, Related Party Income Tax Disclosure [Abstract] Combined federal, state and foreign income tax rate Effective Income Tax Rate Reconciliation, Percent Federal statutory income tax rate, percent Effective Income Tax Rate Reconciliation, at Federal Statutory Income Tax Rate, Percent Unrecognized benefits Unrecognized Tax Benefits Related Party [Axis] Related Party [Axis] Related Party [Domain] Related Party [Domain] Marathon Oil Companies Marathon Oil Companies [Member] Marathon Oil Companies [Member] Ownership Type [Axis] Ownership Type [Axis] Direct or Indirect Ownership Interest Ownership Type [Domain] Ownership Type [Domain] [Domain] for Direct or Indirect Ownership Interest Indirect Ownership Interest Indirect Ownership Interest [Member] Indirect Ownership Interest Investment, Name [Axis] Investment, Name [Axis] Investment, Name [Domain] Investment, Name [Domain] LOOP and LOCAP LLC Loop And Locap Llc [Member] LOOP and LOCAP LLC [Member] Gray Oak Pipeline Gray Oak Pipeline LLC [Member] Gray Oak Pipeline LLC [Member] Bakken Pipeline System Bakken Pipeline System [Member] Bakken Pipeline System [Member] Crowley Ocean Partners Crowley Ocean Partners LLC [Member] Crowley Ocean Partners LLC [Member] Crowley Blue Water Partners Crowley Blue Water Partners LLC [Member] Crowley Blue Water Partners LLC [Member] Financial Support to Nonconsolidated Legal Entity [Axis] Financial Support to Nonconsolidated Legal Entity [Axis] Financial Support to Nonconsolidated Legal Entity [Domain] Financial Support to Nonconsolidated Legal Entity [Domain] Guarantee of Indebtedness of Others Guarantee of Indebtedness of Others [Member] Guarantor Obligations, Nature [Axis] Guarantor Obligations, Nature [Axis] Guarantor Obligations, Nature [Domain] Guarantor Obligations, Nature [Domain] Financial Guarantee Financial Guarantee [Member] Indemnification Agreement Indemnification Agreement [Member] Other Guarantees Guarantee Type, Other [Member] Crowley Term Loan Crowley Term Loan [Member] Crowley Term Loan [Member] Maximum potential undiscounted payments Guarantor Obligations, Maximum Exposure, Undiscounted Equity method investments, ownership percentage Equity Method Investment, Ownership Percentage Maximum borrowing capacity Line of Credit Facility, Maximum Borrowing Capacity Guarantee obligation current carrying value Guarantor Obligations, Current Carrying Value Statement of Financial Position [Abstract] Assets Assets [Abstract] Current assets: Assets, Current [Abstract] Cash and cash equivalents Cash and Cash Equivalents, at Carrying Value Receivables, less allowance for doubtful accounts of $21 and $9, respectively Accounts Receivable, after Allowance for Credit Loss, Current Inventories Inventory, Net Other current assets Other Assets, Current Total current assets Assets, Current Equity method investments Equity Method Investments Property, plant and equipment, net Property, Plant and Equipment, Net Goodwill Right of use assets Operating Lease, Right-of-Use Asset Other noncurrent assets Other Assets, Noncurrent Total assets Assets Liabilities Liabilities [Abstract] Current liabilities: Liabilities, Current [Abstract] Accounts payable Accounts Payable, Current Payroll and benefits payable Employee-related Liabilities, Current Accrued taxes Accrued Income Taxes, Current Debt due within one year Debt, Current Operating lease liabilities Operating Lease, Liability, Current Other current liabilities Other Liabilities, Current Total current liabilities Liabilities, Current Long-term debt Long-term Debt and Lease Obligation Deferred income taxes Deferred Income Tax Liabilities, Net Defined benefit postretirement plan obligations Liability, Defined Benefit Plan, Noncurrent Long-term operating lease liabilities Operating Lease, Liability, Noncurrent Deferred credits and other liabilities Deferred Credits and Other Liabilities, Noncurrent Total liabilities Liabilities Commitments and contingencies (see Note 23) Commitments and Contingencies Redeemable noncontrolling interest Equity Equity [Abstract] MPC stockholders’ equity: Stockholders' Equity Attributable to Parent [Abstract] Preferred stock, no shares issued and outstanding (par value $0.01 per share, 30 million shares authorized) Preferred Stock, Value, Issued Common stock: Common Stock, Number of Shares, Par Value and Other Disclosures [Abstract] Issued – 978 million and 975 million shares (par value $0.01 per share, 2 billion shares authorized) Common Stock, Value, Issued Held in treasury, at cost – 328 million and 295 million shares Treasury Stock, Value Additional paid-in capital Additional Paid in Capital, Common Stock Retained earnings Retained Earnings (Accumulated Deficit) Accumulated other comprehensive loss Accumulated Other Comprehensive Income (Loss), Net of Tax Total MPC stockholders’ equity Stockholders' Equity Attributable to Parent Noncontrolling interests Stockholders' Equity Attributable to Noncontrolling Interest Total equity Total liabilities, redeemable noncontrolling interest and equity Liabilities and Equity Noncontrolling Interest [Table] Noncontrolling Interest [Table] Limited Partner Limited Partner [Member] General Partner General Partner [Member] Balance Sheet Location [Axis] Balance Sheet Location [Axis] Balance Sheet Location [Domain] Balance Sheet Location [Domain] Cash and Cash Equivalents Cash and Cash Equivalents [Member] MPLX 364-day term loan MPLX 364-Day Term Loan [Member] MPLX 364-Day Term Loan Noncontrolling Interest [Line Items] Noncontrolling Interest [Line Items] Cash consideration Units issued, number of units Business Acquisition, Equity Interest Issued or Issuable, Number of Shares Debt instrument, term Debt Instrument, Term Conversion of stock, units issued Conversion of Stock, Shares Issued Leases [Abstract] Major Property Class [Axis] Major Property Class [Axis] Major Property Class [Domain] Major Property Class [Domain] Natural gas gathering and NGL transportation pipelines and facilities Natural Gas Gathering and NGL Transportation and Facilities [Member] Natural Gas Gathering and NGL Transportation and Facilities [Member] Natural gas processing facilities Natural Gas Processing Plant [Member] Terminal and related assets Terminals and related assets [Member] Terminals and related assets Land, building, office equipment and other Land Building Office Equipment And Other [Member] Represents real estate held for productive use, long-lived structures used in the conduct of business, including office, production, storage, building improvements and distribution facilities and includes long-lived, depreciable assets not directly used in the production process for inventories or facilities. Property, plant and equipment Property Subject to or Available for Operating Lease, Gross Less accumulated depreciation Property Subject to or Available for Operating Lease, Accumulated Depreciation Property, plant and equipment, net Property Subject to or Available for Operating Lease, Net Sales and other operating revenues Net income attributable to MPC Net Income (Loss) Attributable to Parent Litigation Case [Axis] Litigation Case [Axis] Litigation Case [Domain] Litigation Case [Domain] Emergency Pricing And Consumer Protection Laws Emergency Pricing And Consumer Protection Laws [Member] Emergency Pricing And Consumer Protection Laws [Member] Settled Litigation Settled Litigation [Member] Name of plaintiff Loss Contingency, Name of Plaintiff Damages sought, value Loss Contingency, Damages Sought, Value Period of occurrence Loss Contingency, Period of Occurrence Master Limited Partnership Noncontrolling Interest Disclosure [Text Block] Increase due to the issuance of MPLX common units and general partner units to MPC Consolidation, Less than Wholly Owned Subsidiary, Parent Ownership Interest, Changes, Additional Interest Issued to Parent Increase due to GP/IDR Exchange Consolidation, Less that Wholly Owned Subsidiary, Parent Ownership Interest, Changes, GP IDR Buy-In Consolidation, Less that Wholly Owned Subsidiary, Parent Ownership Interest, Changes, GP IDR Buy-In Increase (decrease) due to the issuance of MPLX & ANDX common units Consolidation, Less than Wholly Owned Subsidiary, Parent Ownership Interest, Changes, Issuance of Equity by Subsidiary to Noncontrolling Interests Increase (decrease) in MPC's additional paid-in capital Consolidation, Less than Wholly Owned Subsidiary, Parent Ownership Interest, Changes, Net Tax impact Increase (decrease) in MPC's additional paid-in capital, net of tax Schedule of Segment Related Capital Expenditures to Total Capital Expenditures Reconciliation of Other Significant Reconciling Items from Segments to Consolidated [Table] Corporate and Other Corporate, Non-Segment [Member] Reconciliation Of Segment Capital Expenditures And Investments To Total Capital Expenditures [Line Items] Segment Reporting, Other Significant Reconciling Item [Line Items] Less investments in equity method investees Payments to Acquire Equity Method Investments Plus items not allocated to segments: Items Not Allocated To Segments [Abstract] Items Not Allocated To Segments [Abstract] Corporate Capital Expenditures Excluding Capitalized Interest Capital Expenditures Excluding Capitalized Interest Capitalized interest Interest Paid, Capitalized, Investing Activities Capital expenditures Capital Expenditure Capital expenditures Derivative Instruments and Hedging Activities Disclosure [Abstract] Derivatives Derivative Instruments and Hedging Activities Disclosure [Text Block] Supplemental Cash Flow Elements [Abstract] Additions to property, plant and equipment per the consolidated statements of cash flows Payments to Acquire Property, Plant, and Equipment Asset retirement expenditures Retirement Expenditures Expenditures incurred through the retirement of assets. Increase (decrease) in capital accruals Increase (Decrease) In Accrual For Capital Expenditures Increase (decrease) during the period in the accrual for capital expenditures Capital expenditures Property, Plant and Equipment Property, Plant and Equipment Disclosure [Text Block] Earnings Per Share [Abstract] Basic earnings per share: Earnings Per Share, Basic [Abstract] Net income attributable to MPC Income allocated to participating securities Undistributed Earnings (Loss) Allocated to Participating Securities, Basic Income available to common stockholders – basic Net Income (Loss) Available to Common Stockholders, Basic Weighted average common shares outstanding (in shares) Weighted Average Number of Shares Outstanding, Basic Basic earnings per share Earnings Per Share, Basic Diluted earnings per share: Earnings Per Share, Diluted [Abstract] Income allocated to participating securities Undistributed Earnings (Loss) Allocated to Participating Securities, Diluted Income available to common stockholders – diluted Net Income (Loss) Available to Common Stockholders, Diluted Effect of dilutive securities (in shares) Weighted Average Number Diluted Shares Outstanding Adjustment Weighted average common shares, including dilutive effect (in shares) Weighted Average Number of Shares Outstanding, Diluted Diluted earnings per share Earnings Per Share, Diluted Number of shares repurchased Treasury Stock, Shares, Acquired Cash paid for shares repurchased Payments for Repurchase of Common Stock Average cost per share Treasury Stock Acquired, Average Cost Per Share Beginning balance Common Stock, Shares, Issued Number of common shares issued - stock compensation Shares Issued, Shares, Share-based Payment Arrangement, after Forfeiture Ending balance Revenue from Contract with Customer [Abstract] Revenue Revenue from Contract with Customer [Text Block] Variable Interest Entity, Consolidated, Carrying Amount, Assets and Liabilities, Net [Abstract] Variable Interest Entities Variable Interest Entity Disclosure [Text Block] Consolidated Entities [Axis] Consolidated Entities [Axis] Consolidated Entities [Domain] Consolidated Entities [Domain] MPLX LP Subsidiaries [Member] Long-term Debt, Type [Axis] Long-term Debt, Type [Axis] Long-term Debt, Type [Domain] Long-term Debt, Type [Domain] Senior notes Senior Notes [Member] Floating Rate Senior Notes Due September 2021 Floating Rate Senior Notes Due September 2021 [Member] Floating Rate Senior Notes Due September 2021 [Member] Floating Rate Senior Notes Due September 2022 Floating Rate Senior Notes Due September 2022 [Member] Floating Rate Senior Notes Due September 2022 [Member] Long-term debt, gross Long-term Debt, Gross Other Income and Expenses [Abstract] Net Interest and Other Financial Costs Interest and Other Income [Text Block] Income Taxes Income Tax Disclosure [Text Block] Product and Service [Axis] Product and Service [Axis] Product and Service [Domain] Product and Service [Domain] Refined products Refined Products [Member] Refined Products [Member] Merchandise Merchandise [Member] Merchandise [Member] Crude oil and refinery feedstocks Crude Oil And Refinery Feedstocks [Member] Crude Oil And Refinery Feedstocks [Member] Midstream services and other Midstream Services And Other [Member] Midstream Services And Other [Member] Fair Value Measurements Fair Value Disclosures [Text Block] Number of reportable segments Number of Reportable Segments Number of refineries Number of Refineries Number of Refineries New Accounting Pronouncements and Changes in Accounting Principles [Abstract] Operating Lease Right Of Use Asset Operating Lease Right Of Use Asset [Member] Operating Lease Right Of Use Asset [Member] Operating Lease Liability Operating Lease Liability [Member] Operating Lease Liability [Member] Adjustments for New Accounting Pronouncements [Axis] Adjustments for New Accounting Pronouncements [Axis] Type of Adoption [Domain] Type of Adoption [Domain] Accounting Standards Update 2016-02 Accounting Standards Update 2016-02 [Member] New accounting pronouncement or change in accounting principle, effect of adoption, quantification New Accounting Pronouncement or Change in Accounting Principle, Effect of Adoption, Quantification Allowance for doubtful accounts Accounts Receivable, Allowance for Credit Loss, Current Preferred stock: Preferred Stock, Number of Shares, Par Value and Other Disclosures [Abstract] Shares issued Preferred Stock, Shares Issued Shares outstanding Preferred Stock, Shares Outstanding Par value Preferred Stock, Par or Stated Value Per Share Shares authorized Preferred Stock, Shares Authorized Shares issued Par value Common Stock, Par or Stated Value Per Share Shares authorized Common Stock, Shares Authorized Treasury stock Treasury Stock, Shares Net Interest And Other Financial Income (Costs) Interest and Other Income [Table Text Block] Accumulated Other Comprehensive Loss Comprehensive Income (Loss) Note [Text Block] Trade receivables securitization facility due July 2021 [Member] Trade Receivables Securitization due July 2021 [Member] Trade Receivables Securitization due July 2021 [Member] Current borrowing capacity MPLX revolving credit facility due July 2024 MPLX Revolving Credit Facility due July 2024 [Member] MPLX Revolving Credit Facility due July 2024 [Member] Mt. Airy Terminal Mt. Airy Terminal [Member] Mt. Airy Terminal [Member] Storage capacity Storage Capacity Storage Capacity Barrels handled Barrels Handled Barrels Handled Summary of Supplemental Cash Flow Information Schedule of Cash Flow, Supplemental Disclosures [Table Text Block] Schedule of Cash and Cash Equivalents Schedule of Cash and Cash Equivalents [Table Text Block] Reconciliation of Additions to Property, Plant and Equipment to Total Capital Expenditures Schedule Of Reconciliation Of Additions To Property Plant And Equipment To Total Capital Expenditures [Table Text Block] Schedule of Reconciliation of Additions to Property, Plant And Equipment to Total Capital Expenditures [Table Text Block] Document And Entity Information [Abstract] Document and Entity Information [Abstract] Entity Central Index Key Entity Central Index Key Current Fiscal Year End Date Current Fiscal Year End Date Document Fiscal Year Focus Document Fiscal Year Focus Document Fiscal Period Focus (Q1,Q2,Q3,FY) Document Fiscal Period Focus Amendment Flag Amendment Flag Document Type Document Type Document Quarterly Report Document Quarterly Report Document Period End Date Document Period End Date Document Transition Report Document Transition Report Entity File Number Entity File Number Entity Registrant Name Entity Registrant Name Entity Incorporation, State or Country Code Entity Incorporation, State or Country Code Entity Tax Identification Number Entity Tax Identification Number Entity Address, Address Line One Entity Address, Address Line One Entity Address, City or Town Entity Address, City or Town Entity Address, State or Province Entity Address, State or Province Entity Address, Postal Zip Code Entity Address, Postal Zip Code City Area Code City Area Code Local Phone Number Local Phone Number Title of 12(b) Security Title of 12(b) Security Trading Symbol Trading Symbol Security Exchange Name Security Exchange Name Entity Current Reporting Status Entity Current Reporting Status Entity Interactive Data Current Entity Interactive Data Current Entity Filer Category Entity Filer Category Entity Small Business Entity Small Business Entity Emerging Growth Company Entity Emerging Growth Company Entity Shell Company Entity Shell Company Entity Common Stock, Shares Outstanding Entity Common Stock, Shares Outstanding Schedule of Variable Interest Entities [Table] Schedule of Variable Interest Entities [Table] Variable Interest Entities [Axis] Variable Interest Entities [Axis] Variable Interest Entity, Classification [Domain] Variable Interest Entity, Classification [Domain] Variable Interest Entity, Primary Beneficiary [Member] Variable Interest Entity, Primary Beneficiary [Member] Variable Interest Entity [Line Items] Variable Interest Entity [Line Items] Receivables, less allowance for doubtful accounts Other noncurrent assets Deferred income taxes Deferred Tax Liabilities, Net, Noncurrent Organization, Consolidation and Presentation of Financial Statements [Abstract] Use of estimates Use of Estimates, Policy [Policy Text Block] Inventories Inventory, Policy [Policy Text Block] Derivative instruments Derivatives, Policy [Policy Text Block] Schedule of Short-term Debt [Table] Schedule of Short-term Debt [Table] MPC 364-day revolver due September 2020 MPC 364-Day Revolver due September 2020 [Member] MPC 364-Day Revolver due September 2020 [Member] MPC 364-day revolver due September 2019 Subsequent Events [Abstract] Subsequent Event Subsequent Events [Text Block] Consolidation, Less than Wholly Owned Subsidiary, Parent Ownership Interest, Effects of Changes, Net Consolidation, Less than Wholly Owned Subsidiary, Parent Ownership Interest, Effects of Changes, Net [Table Text Block] Express Mart Express Mart [Member] Express Mart [Member] Number of stores Number of Stores Finite-lived intangibles Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Finite-Lived Intangibles Cash and cash equivalents Restricted cash Restricted Cash, Current Cash, cash equivalents and restricted cash Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents Statistical Measurement [Axis] Statistical Measurement [Axis] Statistical Measurement [Domain] Statistical Measurement [Domain] Minimum Minimum [Member] Maximum Maximum [Member] Term of agreements Term Of Agreements Term Of Agreements Renewal term options Renewal Term Agreement Renewal Term Agreement Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table] Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table] Antidilutive Securities [Axis] Antidilutive Securities [Axis] Antidilutive Securities, Name [Domain] Antidilutive Securities, Name [Domain] Stock Based Compensation Expense [Member] Share-based Payment Arrangement [Member] Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] Shares issuable under stock-based compensation plans Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount Fair Value Hierarchy and NAV [Axis] Fair Value Hierarchy and NAV [Axis] Fair Value Hierarchy and NAV [Domain] Fair Value Hierarchy and NAV [Domain] Level 3 Fair Value, Inputs, Level 3 [Member] Derivative Instrument [Axis] Derivative Instrument [Axis] Derivative Contract [Domain] Derivative Contract [Domain] Commodity derivatives Commodity Contract [Member] Embedded derivatives in commodity contracts Embedded Derivative Financial Instruments [Member] Forward commodity price Fair Value Inputs Forward Commodity Price Represents the forward commodity price used as an input to measure fair value. Embedded derivative renewal term Embedded Derivative Renewal Term Represents the term for which the counterparty has the option to renew a purchase agreement related to an embedded derivative. Probability of renewal first term Fair Value Inputs Probability of Renewal Represents the percentage of likelihood of renewal of the commodity contract with embedded derivative. Probability of renewal second term Fair Value Inputs Probability of Renewal Second Term Represents the percentage of likelihood of renewal of the commodity contract with embedded derivative for the second term of the contract. Sales to Related Parties Schedule of Related Party Transactions [Table Text Block] Reconciliation of Operating Profit (Loss) from Segments to Consolidated [Table] Reconciliation of Operating Profit (Loss) from Segments to Consolidated [Table] Segment Reconciling Items Segment Reconciling Items [Member] Segment Reporting, Reconciling Item for Operating Profit (Loss) from Segment to Consolidated [Line Items] Segment Reporting, Reconciling Item for Operating Profit (Loss) from Segment to Consolidated [Line Items] Capline restructuring gain Gain on Exchange of Undivided Joint Interest for Equity Ownership Gain on exchange of undivided joint interest for equity ownership Transaction-related costs(c) Business Combination, Acquisition Related Costs Litigation Litigation Settlement, Expense Impairments Impairment of Ongoing Project Net interest and other financial costs Interest and Debt Expense Income before income taxes Income (Loss) from Continuing Operations before Income Taxes, Noncontrolling Interest Lease revenue Operating Leases, Income Statement, Lease Revenue Operating leases Lessee, Operating Lease, Liability, Payment, Due [Abstract] 2019 Operating Leases, Future Minimum Payments Due, Next Twelve Months 2020 Lessee, Operating Lease, Liability, Payments, Due Year Two 2021 Lessee, Operating Lease, Liability, Payments, Due Year Three 2022 Lessee, Operating Lease, Liability, Payments, Due Year Four 2023 Lessee, Operating Lease, Liability, Payments, Due Year Five 2024 and thereafter Lessee, Operating Lease, Liability, Payments, Due after Year Five Gross lease payments Lessee, Operating Lease, Liability, Payments, Due Less: imputed interest Lessee, Operating Lease, Liability, Undiscounted Excess Amount Total operating lease liabilities Operating Lease, Liability Finance leases Finance Lease, Liability, Payment, Due [Abstract] 2019 Finance Lease, Liability, Payments, Due Next Twelve Months 2020 Finance Lease, Liability, Payments, Due Year Two 2021 Finance Lease, Liability, Payments, Due Year Three 2022 Finance Lease, Liability, Payments, Due Year Four 2023 Finance Lease, Liability, Payments, Due Year Five 2024 and thereafter Finance Lease, Liability, Payments, Due after Year Five Gross lease payments Finance Lease, Liability, Payment, Due Less: imputed interest Finance Lease, Liability, Undiscounted Excess Amount Total finance lease liabilities Finance Lease, Liability Income Statement [Abstract] Revenues and other income: Revenues [Abstract] Income from equity method investments Income (Loss) from Equity Method Investments Net gain on disposal of assets Gain (Loss) on Disposition of Property Plant Equipment, Excluding Oil and Gas Property and Timber Property Other income Other Operating Income Total revenues and other income Revenues And Other Income Total revenues and other income is the sum of sales and other operating revenues (including consumer excise taxes), income from equity method investments, net gain on disposal of assets, and other income. Costs and expenses: Costs and Expenses [Abstract] Cost of revenues (excludes items below) Cost of Goods and Services Sold Selling, general and administrative expenses Selling, General and Administrative Expense Other taxes Taxes, Miscellaneous Total costs and expenses Costs and Expenses Income from operations Income before income taxes Provision for income taxes Income Tax Expense (Benefit) Net income Net Income (Loss), Including Portion Attributable to Noncontrolling Interest Less net income attributable to: Net Income (Loss) Attributable to Noncontrolling Interest [Abstract] Redeemable noncontrolling interest Noncontrolling interests Net Income (Loss) Attributable to Nonredeemable Noncontrolling Interest Net income attributable to MPC Per Share Data (See Note 7) Basic: Net income attributable to MPC per share Weighted average shares outstanding (in shares) Diluted: Net income attributable to MPC per share Weighted average shares outstanding (in shares) Share Repurchases Class of Treasury Stock [Table Text Block] Lease Arrangement, Type [Axis] Lease Arrangement, Type [Axis] Lease Arrangement, Type [Domain] Lease Arrangement, Type [Domain] Finance Lease Finance Lease [Member] Finance Lease [Member] Total operating lease liabilities Weighted average remaining lease term (in years) Operating Lease, Weighted Average Remaining Lease Term Weighted average discount rate Operating Lease, Weighted Average Discount Rate, Percent Finance leases Capital Leases, Lessee Balance Sheet [Abstract] Property, plant and equipment, gross Property, Plant and Equipment, Gross Less accumulated depreciation Accumulated Depreciation, Depletion and Amortization, Property, Plant, and Equipment Total finance lease liabilities Weighted average remaining lease term (in years) Finance Lease, Weighted Average Remaining Lease Term Weighted average discount rate Finance Lease, Weighted Average Discount Rate, Percent Finance lease cost: Lease, Cost [Abstract] Amortization of right of use assets Finance Lease, Right-of-Use Asset, Amortization Interest on lease liabilities Finance Lease, Interest Expense Operating lease cost Operating Lease, Cost Variable lease cost Variable Lease, Cost Short-term lease cost Short-term Lease, Cost Total lease cost Lease, Cost Description of variable rate basis Debt Instrument, Description of Variable Rate Basis Maturity date Debt Instrument, Maturity Date Number of prior quarterly reporting periods covenant Number Of Prior Quarterly Reporting Periods Covenant Number Of Prior Quarterly Reporting Periods Covenant Covenant ratio debt to Ebitda Covenant Ratio Debt To Ebitda Covenant Ratio Debt To Ebitda Covenant ratio debt to Ebitda post acquisition Covenant Ratio Debt To Ebitda Post Acquisition Covenant Ratio Debt To Ebitda Post Acquisition Acquisitions Business Combination Disclosure [Text Block] Inventory Disclosure [Abstract] Impact on income as a result of LIFO liquidations Effect of LIFO Inventory Liquidation on Income Supplemental Cash Flow Information Cash Flow, Supplemental Disclosures [Text Block] Property, Plant and Equipment [Table] Property, Plant and Equipment [Table] Property, Plant and Equipment [Line Items] Property, Plant and Equipment [Line Items] Property, plant and equipment, net Statement of Cash Flows [Abstract] Operating activities: Net Cash Provided by (Used in) Operating Activities [Abstract] Net income Adjustments to reconcile net income to net cash provided by operating activities: Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract] Amortization of deferred financing costs and debt discount Amortization of Debt Issuance Costs Pension and other postretirement benefits, net Pension and Other Postretirement Benefit, Net The amount of pension and other postretirement costs recognized during the period, net of cash contributed during the period by the entity to fund its pension and other postretirement benefit plans. Deferred income taxes Deferred Income Tax Expense (Benefit) Net gain on disposal of assets Income from equity method investments Distributions from equity method investments Proceeds from Equity Method Investment, Distribution Changes in the fair value of derivative instruments Unrealized Gain (Loss) on Derivatives Changes in operating assets and liabilities, net of effects of businesses acquired: Increase (Decrease) in Operating Capital [Abstract] Current receivables Increase (Decrease) in Accounts Receivable Inventories Increase (Decrease) in Inventories Current accounts payable and accrued liabilities Increase (Decrease) in Accounts Payable and Accrued Liabilities Right of use assets and operating lease liabilities, net Increase (Decrease) in Other Operating Assets and Liabilities, Net All other, net Other Operating Activities, Cash Flow Statement Net cash provided by operating activities Net Cash Provided by (Used in) Operating Activities Investing activities: Net Cash Provided by (Used in) Investing Activities [Abstract] Additions to property, plant and equipment Acquisitions, net of cash acquired Payments to Acquire Businesses, Net of Cash Acquired Disposal of assets Proceeds from Sales of Business, Affiliate and Productive Assets Investments – acquisitions, loans and contributions Payments to Fund Long-term Loans to Related Parties Investments - redemptions, repayments and return of capital Proceeds from Collection of Long-term Loans to Related Parties All other, net Payments for (Proceeds from) Other Investing Activities Net cash used in investing activities Net Cash Provided by (Used in) Investing Activities Financing activities: Net Cash Provided by (Used in) Financing Activities [Abstract] Long-term debt – borrowings Proceeds from Issuance of Long-term Debt and Capital Securities, Net Long-term debt – repayments Repayment of Long-term Debt, Long-term Lease Obligation, and Capital Security Debt issuance costs Payments of Debt Issuance Costs Issuance of common stock Proceeds from Issuance of Common Stock Common stock repurchased Dividends paid Payments of Ordinary Dividends, Common Stock Distributions to noncontrolling interests Payments to Noncontrolling Interests Contributions from noncontrolling interests Proceeds from Noncontrolling Interests All other, net Proceeds from (Payments for) Other Financing Activities Net cash provided by (used in) financing activities Net Cash Provided by (Used in) Financing Activities Net increase (decrease) in cash, cash equivalents and restricted cash Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Period Increase (Decrease), Excluding Exchange Rate Effect Cash, cash equivalents and restricted cash at beginning of period Cash, cash equivalents and restricted cash at end of period Derivative [Table] Derivative [Table] Other current assets Other Current Assets [Member] Other current liabilities(a) Other Current Liabilities [Member] Deferred credits and other liabilities Other Noncurrent Liabilities [Member] Derivatives, Fair Value [Line Items] Derivatives, Fair Value [Line Items] Asset Derivative Asset, Fair Value, Gross Asset Liability Derivative Asset, Fair Value, Gross Liability Income Statement Location [Axis] Income Statement Location [Axis] Income Statement Location [Domain] Income Statement Location [Domain] Sales and other operating revenues Sales [Member] Cost of revenues Cost of Sales [Member] Derivative Instruments, Gain (Loss) [Line Items] Derivative Instruments, Gain (Loss) [Line Items] Loss Derivative, Gain (Loss) on Derivative, Net Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward] Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward] Beginning balance Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability Value Unrealized and realized losses included in net income Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Gain (Loss) Included in Earnings Settlements of derivative instruments Fair Value, Net Derivative Asset (Liability) Measured on Recurring Basis, Unobservable Inputs Reconciliation, Settlements Ending balance Lessee, Finance and Operating Lease Lessee, Finance and Operating Leases [Text Block] The entire disclosure for finance and operating leases of lessee. Leases of Lessor Disclosure Leases of Lessor Disclosure [Text Block] ANDX ANDX LP [Member] ANDX LP [Member] Senior Notes Due October 2019 Senior Notes Due October 2019 [Member] Senior Notes Due October 2019 [Member] Repayments of debt Repayments of Debt Interest paid Interest Costs Incurred Summary of Earnings Per Common Share Schedule of Earnings Per Share, Basic and Diluted [Table Text Block] Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block] Schedule of Recognized Identified Assets Acquired and Liabilities Assumed [Table Text Block] Schedule of Recognized Identified Assets Acquired and Liabilities Assumed [Table Text Block] Business Acquisition, Pro Forma Information [Table Text Block] Business Acquisition, Pro Forma Information [Table Text Block] Matching buy/sell receivables Matching Buy/Sell Receivables Carrying amounts due as of the balance sheet date of the amounts receivable from matching buy/sell transactions. Interest income Investment Income, Interest Interest expense Interest Expense, Debt Interest capitalized Interest Costs Capitalized Adjustment Pension and other postretirement non-service costs Non-Service Pension and Postretirement Costs Non-Service Pension and Postretirement Costs Loss on extinguishment of debt Gain (Loss) on Extinguishment of Debt Other financial costs Interest Expense, Other Net interest and other financial costs Equity Method Investments and Joint Ventures [Abstract] Equity Method Investments Equity Method Investments and Joint Ventures Disclosure [Text Block] Other comprehensive income (loss): Other Comprehensive Income (Loss), Net of Tax [Abstract] Defined benefit plans: Defined Benefit Plan, Amounts Recognized in Other Comprehensive Income (Loss) [Abstract] Actuarial changes, net of tax of ($14), $24, ($8) and $29, respectively Other Comprehensive Income (Loss), Pension and Other Postretirement Benefit Plans, Net Unamortized Gain (Loss) Adjustment, Net of Tax Amount after tax and reclassification adjustments, of increase (decrease) in accumulated other comprehensive income (loss) related to the net actuarial gain (loss) of pension and other postretirement defined benefit plans. Prior service credit, net of tax of ($3), ($3), ($14) and ($7), respectively Other Comprehensive (Income) Loss, Pension and Other Postretirement Benefit Plans, Net Prior Service Cost (Credit) Adjustment, Net of Tax Amount after tax and reclassification adjustments, of (increase) decrease in accumulated other comprehensive (income) loss related to net prior service cost (credit) of pension and other postretirement defined benefit plans. Other, net of tax of $0, ($1), ($1) and ($2), respectively Other Comprehensive Income, Other, Net of Tax Other comprehensive income (loss) Comprehensive income Comprehensive Income (Loss), Net of Tax, Including Portion Attributable to Noncontrolling Interest Less comprehensive income attributable to: Comprehensive Income (Loss), Net of Tax, Attributable to Noncontrolling Interest [Abstract] Redeemable noncontrolling interest Comprehensive Income (Loss), Net of Tax, Attributable to Redeemable Noncontrolling Interest Comprehensive Income (Loss), Net of Tax, Attributable to Redeemable Noncontrolling Interest Noncontrolling interests Comprehensive Income (Loss), Net of Tax, Attributable to Nonredeemable Noncontrolling Interest Comprehensive Income (Loss), Net of Tax, Attributable to Nonredeemable Noncontrolling Interest Comprehensive income attributable to MPC Comprehensive Income (Loss), Net of Tax, Attributable to Parent Recently Adopted New Accounting Pronouncements and Changes in Accounting Principles [Text Block] Not Yet Adopted Description of New Accounting Pronouncements Not yet Adopted [Text Block] Description of the Business and Basis of Presentation Business Description and Basis of Presentation [Text Block] Schedule of Variable Interest Entities [Table Text Block] Schedule of Variable Interest Entities [Table Text Block] Inventories Inventory Disclosure [Text Block] Contractual commitments to acquire property, plant and equipment and advance funds to equity method investees Long-term Purchase Commitment, Amount Equity Stockholders' Equity Note Disclosure [Text Block] Revenue from External Customers by Products and Services [Table Text Block] Revenue from External Customers by Products and Services [Table Text Block] Income From Operations Attributable To Operating Segments Schedule of Segment Reporting Information, by Segment [Table Text Block] Reconciliation Of Segment Income From Operations To Income Before Income Taxes Reconciliation of Operating Profit (Loss) from Segments to Consolidated [Table Text Block] Reconciliation Of Segment Capital Expenditures And Investments To Total Capital Expenditures Reconciliation of Other Significant Reconciling Items from Segments to Consolidated [Table Text Block] Retirement Benefits [Abstract] Pension and Other Postretirement Plans Pension and Other Postretirement Benefits Disclosure [Text Block] Beginning balance Number of shares repurchased Number of shares returned - stock compensation Shares Issued, Shares, Share-based Payment Arrangement, Forfeited Ending balance Summary Of Inventories Schedule of Inventory, Current [Table Text Block] Classification of Fair Values of Derivative Instruments, Excluding Cash Collateral Schedule of Derivative Instruments in Statement of Financial Position, Fair Value [Table Text Block] Open Commodity Derivative Contracts Schedule of Derivative Instruments [Table Text Block] Effect of Commodity Derivative Instruments in Statements of Income Derivative Instruments, Gain (Loss) [Table Text Block] Transaction Type [Axis] Transaction Type [Axis] Transaction [Domain] Transaction [Domain] Exchange Traded Exchange Traded [Member] Over the Counter Over the Counter [Member] Energy [Axis] Energy [Axis] Energy [Domain] Energy [Domain] Crude oil Crude Oil [Member] Blending products Blending products [Member] Blending products [Member] Position [Axis] Position [Axis] Position [Domain] Position [Domain] Long Long [Member] Short Short [Member] Spread Contracts Other Contract [Member] Derivative [Line Items] Derivative [Line Items] Percentage of derivative contracts expiring in the period Derivative Instruments Percentage Of Derivative Contracts Expiration1 Percentage Of Derivative Contracts Expiring in the following quarter. Notional contracts (in thousands of Total Barrels) Derivative, Nonmonetary Notional Amount Fair Values Derivatives, Balance Sheet Location, by Derivative Contract Type [Table] Fair Values Derivatives, Balance Sheet Location, by Derivative Contract Type [Table] Measurement Basis [Axis] Measurement Basis [Axis] Fair Value Measurement [Domain] Fair Value Measurement [Domain] Portion at Fair Value Measurement [Member] Portion at Fair Value Measurement [Member] Fair Value Estimate of Fair Value Measurement [Member] Carrying Value Reported Value Measurement [Member] Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] Long-term debt Long-term Debt, Fair Value Crude oil and refinery feedstocks Energy Related Inventory, Crude Oil and Natural Gas Liquids Refined products Energy Related Inventory Refined Products Balance includes refined products. Inventories are carried at the lower of cost or market value. The cost of inventories of refined products is determined primarily under the last-in, first-out ("LIFO") method. Materials and supplies Other Inventory, Supplies, Gross Merchandise Retail Related Inventory, Merchandise Total NOCO NOCO [Member] NOCO [Member] Debt Debt Disclosure [Text Block] Schedule of Error Corrections and Prior Period Adjustment Restatement [Table] Schedule of Error Corrections and Prior Period Adjustment Restatement [Table] Error Corrections and Prior Period Adjustments Restatement [Line Items] Error Corrections and Prior Period Adjustments Restatement [Line Items] Deferred tax liabilities Deferred Tax Liabilities, Gross Accumulated Other Comprehensive Income (Loss) [Table] Accumulated Other Comprehensive Income (Loss) [Table] Accumulated Defined Benefit Plans Adjustment Accumulated Defined Benefit Plans Adjustment Attributable to Parent [Member] Gain on Cash Flow Hedge Accumulated Gain (Loss), Net, Cash Flow Hedge, Parent [Member] Workers Compensation Workers Compensation [Member] Workers Compensation [Member] Retirement Plan Type [Axis] Retirement Plan Type [Axis] Retirement Plan Type [Domain] Retirement Plan Type [Domain] Pension Benefits Pension Plan [Member] Other Benefits Other Postretirement Benefits Plan [Member] Accumulated Other Comprehensive Income (Loss) [Line Items] Accumulated Other Comprehensive Income (Loss) [Line Items] Beginning balance Other comprehensive income (loss), before reclassifications, net of tax Other Comprehensive Income (Loss), before Reclassifications, Net of Tax Amounts reclassified from accumulated other comprehensive loss: Other Comprehensive (Income) Loss, Defined Benefit Plan, Reclassification Adjustment from AOCI, before Tax [Abstract] Amortization - prior service credit Other Comprehensive (Income) Loss, Defined Benefit Plan, Prior Service Cost (Credit), Reclassification Adjustment from AOCI, before Tax Amortization - actuarial loss Other Comprehensive Income (Loss), Defined Benefit Plan, Gain (Loss), Reclassification Adjustment from AOCI, before Tax Amortization - settlement loss Other Comprehensive Income Loss Reclassification Adjustment From Aoci Pension And Other Postretirement Benefit Plans For Settlement Gain Loss Before Tax Other Comprehensive Income Loss Reclassification Adjustment From AOCI Pension And Other Postretirement Benefit Plans For Settlement Gain Loss Before Tax Other Other Comprehensive Income Loss Reclassification Adjustment From AOCI For Workers Compensation Other Comprehensive Income Loss Reclassification Adjustment From AOCI For Workers Compensation Tax effect Other Comprehensive (Income) Loss, Defined Benefit Plan, Reclassification Adjustment from AOCI, Tax Ending balance Other comprehensive income (loss) before reclassifications, tax Other Comprehensive Income (Loss) before Reclassifications, Tax Earnings per Share Earnings Per Share [Text Block] Schedule of Defined Benefit Plans Disclosures [Table] Schedule of Defined Benefit Plans Disclosures [Table] Defined Benefit Plan Disclosure [Line Items] Defined Benefit Plan Disclosure [Line Items] Components of net periodic benefit cost: Defined Benefit Plan, Net Periodic Benefit Cost (Credit) [Abstract] Service cost Defined Benefit Plan, Service Cost Interest cost Defined Benefit Plan, Interest Cost Expected return on plan assets Defined Benefit Plan, Expected Return (Loss) on Plan Assets Amortization – prior service credit Defined Benefit Plan, Amortization of Prior Service Cost (Credit) Amortization – actuarial loss Defined Benefit Plan, Amortization of Gain (Loss) Amortization - settlement loss Defined Benefit Plan, Net Periodic Benefit Cost (Credit), Gain (Loss) Due to Settlement Net periodic benefit cost Defined Benefit Plan, Net Periodic Benefit Cost (Credit) Level 1 Fair Value, Inputs, Level 1 [Member] Level 2 Fair Value, Inputs, Level 2 [Member] Commodity derivative instruments, assets - gross Commodity derivative instruments, assets - netting and collateral Derivative Asset, Fair Value, Gross Liability and Obligation to Return Cash, Offset Commodity derivative instruments, assets - net carrying value on balance sheet Derivative Asset, Fair Value, Amount Not Offset Against Collateral Commodity derivative instruments, assets - collateral pledged not offset Derivative, Collateral, Obligation to Return Cash Commodity derivative instruments, liabilities - gross Derivative Liability, Fair Value, Gross Liability Commodity derivative instruments, liabilities - netting and collateral Derivative Liability, Fair Value, Gross Asset and Right to Reclaim Cash, Offset Commodity derivative instruments, liabilities - net carrying value on balance sheet Derivative Liability, Fair Value, Amount Not Offset Against Collateral Commodity derivative instruments, liabilities - collateral pledged not offset Derivative, Collateral, Right to Reclaim Cash Cash collateral netted with derivative liabilities Derivative Liability, Collateral, Right to Reclaim Cash, Offset Cash collateral netted with derivatives assets Derivative Asset, Collateral, Obligation to Return Cash, Offset Marathon Petroleum Corporation Parent Company [Member] ANDX New MLP [Member] New MLP [Member] ANDX revolver ANDX Revolver [Member] ANDX Revolver [Member] Total debt Debt and Lease Obligation Unamortized debt issuance costs Debt Issuance Costs, Net Unamortized discount Debt Instrument, Unamortized Discount (Premium), Net Amounts due within one year Total long-term debt due after one year Capital lease obligations Capital Lease Obligations Outstanding Borrowings Schedule of Long-term Debt Instruments [Table Text Block] Schedule of Line of Credit Facilities [Table Text Block] Schedule of Line of Credit Facilities [Table Text Block] Other Pension Plan Other Pension Plan [Member] Employer contributions Defined Benefit Plan, Plan Assets, Contributions by Employer Benefits paid Defined Benefit Plan, Benefit Obligation, Benefits Paid Changes in Accumulated Other Comprehensive Loss by Component Schedule of Accumulated Other Comprehensive Income (Loss) [Table Text Block] Lease, Cost Lease, Cost [Table Text Block] Supplemental Balance Sheet Disclosures [Text Block] Supplemental Balance Sheet Disclosures [Text Block] Schedule Of Future Minimum Lease Payments For Operating And Capital Leases Table [Text Block] Schedule Of Future Minimum Lease Payments For Operating And Capital Leases Table [Text Block] Schedule of future minimum lease payments for operating and capital leases [Table Text Block]. Schedule of Future Minimum Rental Payments Receivable for Operating Leases [Table Text Block] Schedule of Future Minimum Rental Payments for Operating Leases [Table Text Block] Schedule of Property Subject to or Available for Operating Lease [Table Text Block] Schedule of Property Subject to or Available for Operating Lease [Table Text Block] Commitments and Contingencies Commitments and Contingencies Disclosure [Text Block] Net cash provided by operating activities included: Supplemental Cash Flow Information [Abstract] Interest paid (net of amounts capitalized) Interest Paid, Excluding Capitalized Interest, Operating Activities Net income taxes paid to taxing authorities Income Taxes Paid, Net Payments on operating leases Operating Lease, Payments Interest payments under finance lease obligations Finance Lease, Interest Payment on Liability Net cash provided by financing activities included: Principal payments under finance lease obligations Finance Lease, Principal Payments Non-cash investing and financing activities: Cash Flow, Noncash Investing and Financing Activities Disclosure [Abstract] Capital leases Lease Obligation Incurred Right of use assets obtained in exchange for new operating lease obligations Right-of-Use Asset Obtained in Exchange for Operating Lease Liability Right of use assets obtained in exchange for new finance lease obligations Right-of-Use Asset Obtained in Exchange for Finance Lease Liability Contribution of net assets to Capline LLC Contribution of net assets The value of assets contributed in noncash investing or financing activities. Recognition of Capline LLC equity method investment Fair Value of Assets Acquired Related Party Transactions Related Party Transactions Disclosure [Text Block] Scenario [Axis] Scenario [Axis] Scenario [Domain] Scenario [Domain] Forecast Forecast [Member] Stock repurchase program, remaining authorized repurchase amount Stock Repurchase Program, Remaining Authorized Repurchase Amount Capline Capline Pipeline LLC [Member] Capline Pipeline LLC [Member] Undivided joint interest, ownership percentage Undivided Joint Interest, Ownership Percentage Undivided Joint Interest, Ownership Percentage Dividends declared per share of common stock (in dollars per share) Common Stock, Dividends, Per Share, Declared Capacity Capacity Capacity Number of branded outlets Number of branded outlets Number of branded outlets Number of retail transportation fuel and convenience stores Number of retail transportation fuel and convenience stores Number of retail transportation fuel and convenience stores Number of direct dealer locations Number of direct dealer locations Number of direct dealer locations Accrued liabilities for remediation Accrual for Environmental Loss Contingencies Receivables for recoverable costs Recorded Third-Party Environmental Recoveries Receivable 2019 Operating Leases, Future Minimum Payments Receivable, Current 2020 Operating Leases, Future Minimum Payments Receivable, in Two Years 2021 Operating Leases, Future Minimum Payments Receivable, in Three Years 2022 Operating Leases, Future Minimum Payments Receivable, in Four Years 2023 Operating Leases, Future Minimum Payments Receivable, in Five Years 2024 and thereafter Operating Leases, Future Minimum Payments Receivable, Thereafter Total minimum future rentals Operating Leases, Future Minimum Payments Receivable Components of Net Periodic Benefit Costs Schedule of Net Benefit Costs [Table Text Block]