Fair Value Disclosures [Abstract] 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 Goodwill and Intangible Assets Disclosure [Abstract] Schedule of Finite-Lived Intangible Assets [Table] Schedule of Finite-Lived Intangible Assets [Table] Segments [Axis] Segments [Axis] Segments [Domain] Segments [Domain] 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. Restatement [Axis] Restatement [Axis] Restatement [Domain] Restatement [Domain] Prior to change in reporting units Previously Reported [Member] Subsequent to change in reporting units Restatement Adjustment [Member] Valuation Approach and Technique [Axis] Valuation Approach and Technique [Axis] Valuation Approach and Technique [Domain] Valuation Approach and Technique [Domain] Income Approach Valuation, Income Approach [Member] Measurement Input Type [Axis] Measurement Input Type [Axis] Measurement Input Type [Domain] Measurement Input Type [Domain] Discount Rate Measurement Input, Discount Rate [Member] Statistical Measurement [Axis] Statistical Measurement [Axis] Statistical Measurement [Domain] Statistical Measurement [Domain] Minimum Minimum [Member] Maximum Maximum [Member] Finite-Lived Intangible Assets [Line Items] Finite-Lived Intangible Assets [Line Items] Impairment Goodwill, Impairment Loss Fair value inputs Fair Value Inputs Fair Value Inputs used in the annual goodwill impairment test Noncontrolling Interest [Abstract] Schedule of Business Acquisitions, by Acquisition [Table] Schedule of Business Acquisitions, by Acquisition [Table] Ownership [Axis] Ownership [Axis] Ownership [Domain] Ownership [Domain] MPLX MPLX LP [Member] MPLX LP [Member] Legal Entity [Axis] Legal Entity [Axis] Entity [Domain] Entity [Domain] MPC Marathon Petroleum Corporation [Member] Marathon petroleum corporation. Noncontrolling Interest [Line Items] Noncontrolling Interest [Line Items] MPC's partnership interest in MLPs (in percentage) Noncontrolling Interest, Ownership Percentage by Parent Debt Disclosure [Abstract] 2020 Long-term Debt, Maturities, Repayments of Principal in Next Twelve Months 2021 Long-term Debt, Maturities, Repayments of Principal in Year Two 2022 Long-term Debt, Maturities, Repayments of Principal in Year Three 2023 Long-term Debt, Maturities, Repayments of Principal in Year Four 2024 Long-term Debt, Maturities, Repayments of Principal in Year Five Defined Benefit Plans and Other Postretirement Benefit Plans Disclosures [Abstract] Defined Benefit Pension and Other Postretirement Plans Pension and Other Postretirement Benefits Disclosure [Text Block] Organization, Consolidation and Presentation of Financial Statements [Abstract] Description of the Business and Basis of Presentation Business Description and Basis of Presentation [Text Block] Equity Method Investments and Joint Ventures [Abstract] Equity method investment difference between carrying amount and underlying equity Equity Method Investment, Difference Between Carrying Amount and Underlying Equity Equity method investment difference between carrying amount and underlying equity, portion related to goodwill which is not being amortized Equity Method Investment Difference Between Carrying Amount And Underlying Equity Portion Related To Goodwill and Other Assets Not Amortized Equity method investment difference between carrying amount and underlying equity, portion related to goodwill and other assets which is not being amortized Dividends and partnership distributions received from equity method investees Proceeds from Equity Method Investment, Distribution Summarized Balance Sheet Information of VIEs Schedule of Variable Interest Entities [Table Text Block] Statement of Financial Position [Abstract] 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 Common stock: Common Stock, Number of Shares, Par Value and Other Disclosures [Abstract] Shares issued Common Stock, Shares, Issued Par value Common Stock, Par or Stated Value Per Share Shares authorized Common Stock, Shares Authorized Treasury stock Treasury Stock, Shares Statement of Comprehensive Income [Abstract] Net income Net Income (Loss), Including Portion Attributable to Noncontrolling Interest 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 ($40), $14 and $17, 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 ($17), $12 and ($16), 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 ($1), $1 and $0, respectively Other Comprehensive Income, Other, Net of Tax Other comprehensive income (loss) Other Comprehensive Income (Loss), Net of Tax 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 Master Limited Partnerships Noncontrolling Interest Disclosure [Text Block] Equity [Abstract] 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 Business Combinations [Abstract] Statement [Table] Statement [Table] Business Acquisition [Axis] Business Acquisition [Axis] Business Acquisition, Acquiree [Domain] Business Acquisition, Acquiree [Domain] Andeavor Andeavor [Member] Andeavor [Member] Previously Reported Restatement Adjustment Statement [Line Items] Statement [Line Items] 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 Goodwill Goodwill Net assets acquired Business Combination, Recognized Identifiable Assets Acquired, Goodwill, and Liabilities Assumed, Less Noncontrolling Interest Revenue from Contract with Customer [Abstract] 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] 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 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] Sales and other operating revenues, excluding consumer excise taxes Revenue from Contract with Customer, Excluding Assessed Tax Sales and other operating revenue, including excise taxes Revenue from Contract with Customer, Including Assessed Tax Leases [Abstract] 2020 Operating Leases, Future Minimum Payments Receivable, Current 2021 Operating Leases, Future Minimum Payments Receivable, in Two Years 2022 Operating Leases, Future Minimum Payments Receivable, in Three Years 2023 Operating Leases, Future Minimum Payments Receivable, in Four Years 2024 Operating Leases, Future Minimum Payments Receivable, in Five Years 2025 and thereafter Operating Leases, Future Minimum Payments Receivable, Thereafter Total minimum future rentals Operating Leases, Future Minimum Payments Receivable Lease Arrangement, Type [Axis] Lease Arrangement, Type [Axis] Lease Arrangement, Type [Domain] Lease Arrangement, Type [Domain] Finance Lease Finance Lease [Member] Finance Lease [Member] Operating leases Lessee, Operating Lease, Liability, Payment, Due [Abstract] Assets Assets [Abstract] Right of use assets Operating Lease, Right-of-Use Asset Liabilities Liabilities [Abstract] Operating lease liabilities Operating Lease, Liability, Current Long-term operating lease liabilities Operating Lease, Liability, Noncurrent Total operating lease liabilities Operating Lease, Liability 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 Finance Lease, Liability, Payment, Due [Abstract] Assets Assets, Noncurrent [Abstract] Property, plant and equipment, gross Property, Plant and Equipment, Gross Accumulated depreciation Accumulated Depreciation, Depletion and Amortization, Property, Plant, and Equipment Property, plant and equipment, net Property, Plant and Equipment, Net Liabilities Liabilities, Noncurrent [Abstract] Debt due within one year Debt, Current Long-term debt Long-term Debt and Lease Obligation Total finance lease liabilities Finance Lease, Liability 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 Share-based Payment Arrangement [Abstract] Share-based Payment Arrangement [Text Block] Share-based Payment Arrangement [Text Block] Commitments and Contingencies Disclosure [Abstract] Loss Contingencies [Table] Loss Contingencies [Table] Loss Contingency Nature [Axis] Loss Contingency Nature [Axis] Loss Contingency, Nature [Domain] Loss Contingency, Nature [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] Other Guarantees Guarantee Type, Other [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] 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 LLC [Member] 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] Debt Instrument [Axis] Debt Instrument [Axis] Debt Instrument, Name [Domain] Debt Instrument, Name [Domain] Crowley Term Loan Crowley Term Loan [Member] Crowley Term Loan [Member] Loss Contingencies [Line Items] Loss Contingencies [Line Items] Maximum potential undiscounted payments Guarantor Obligations, Maximum Exposure, Undiscounted Line of credit facility, maximum borrowing capacity Line of Credit Facility, Maximum Borrowing Capacity Equity method investments, ownership percentage Equity Method Investment, Ownership Percentage Schedule of Equity Method Investments [Table] Schedule of Equity Method Investments [Table] Capline LLC Capline Pipeline LLC [Member] Capline Pipeline LLC [Member] Schedule of Equity Method Investments [Line Items] Schedule of Equity Method Investments [Line Items] Undivided joint interest, ownership percentage Undivided Joint Interest, Ownership Percentage Undivided Joint Interest, Ownership Percentage Contribution of net assets Contribution of net assets The value of assets contributed in noncash investing or financing activities. Fair value of asset acquired Fair Value of Assets Acquired Equity method investment restructuring gains Gain on Exchange of Undivided Joint Interest for Equity Ownership Gain on exchange of undivided joint interest for equity ownership Schedule of Defined Benefit Plans Disclosures [Table] Schedule of Defined Benefit Plans Disclosures [Table] 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] LOOP LLC and Explorer Pipeline Loop Llc and Explorer Pipeline [Member] Loop Llc and Explorer Pipeline [Member] Defined Benefit Plan Disclosure [Line Items] Defined Benefit Plan Disclosure [Line Items] Change in benefit obligations: Defined Benefit Plan, Change in Benefit Obligation [Roll Forward] Benefit obligations at January 1 Defined Benefit Plan, Benefit Obligation Service cost Defined Benefit Plan, Service Cost Interest cost Defined Benefit Plan, Interest Cost Actuarial (gain) loss Defined Benefit Plan, Benefit Obligation, Actuarial Gain (Loss) Benefits paid Defined Benefit Plan, Benefit Obligation, Benefits Paid Plan amendments Defined Benefit Plan, Benefit Obligation, Increase (Decrease) for Plan Amendment Acquisitions Defined Benefit Plan, Benefit Obligation, Increase (Decrease) for Other Change Benefit obligations at December 31 Change in plan assets: Defined Benefit Plan, Change in Fair Value of Plan Assets [Roll Forward] Fair value of plan assets at January 1 Defined Benefit Plan, Plan Assets, Amount Actual return on plan assets Defined Benefit Plan, Plan Assets, Increase (Decrease) for Actual Return (Loss) Employer contributions Defined Benefit Plan, Plan Assets, Contributions by Employer Benefits paid from plan assets Defined Benefit Plan, Plan Assets, Benefits Paid Acquisitions Defined Benefit Plan, Benefit Obligation, Business Combination Fair value of plan assets at December 31 Funded status of plans at December 31 Defined Benefit Plan, Funded (Unfunded) Status of Plan Amounts recognized in the consolidated balance sheets: Defined Benefit Plan, Amounts for Asset (Liability) Recognized in Statement of Financial Position [Abstract] Current liabilities Liability, Defined Benefit Plan, Current Noncurrent liabilities Liability, Defined Benefit Plan, Noncurrent Accrued benefit cost Liability, Defined Benefit Plan Pretax amounts recognized in accumulated other comprehensive loss: Defined Benefit Plan, Accumulated Other Comprehensive (Income) Loss, before Tax [Abstract] Net actuarial loss Defined Benefit Plan, Accumulated Other Comprehensive Income (Loss), Gain (Loss), before Tax Prior service cost (credit) Defined Benefit Plan, Accumulated Other Comprehensive (Income) Loss, Prior Service Cost (Credit), before Tax Changes in Accumulated Other Comprehensive Loss by Component Schedule of Accumulated Other Comprehensive Income (Loss) [Table Text Block] Quarterly Financial Data [Abstract] Schedule Of Quarterly Financial Information Quarterly Financial Information [Table Text Block] Summary of Derivative Instruments [Abstract] Derivatives Derivative Instruments and Hedging Activities Disclosure [Text Block] Fair Value Measurements Fair Value Disclosures [Text Block] Defined Benefit Plan, Plan Assets, Level 3 Reconciliation [Table] Defined Benefit Plan, Plan Assets, Level 3 Reconciliation [Table] 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] Defined Benefit Plan, Plan Assets, Category [Axis] Defined Benefit Plan, Plan Assets, Category [Axis] Defined Benefit Plan, Plan Assets, Category [Domain] Defined Benefit Plan, Plan Assets, Category [Domain] Private equity Private Equity Funds [Member] Real estate Real Estate [Member] Other Fixed Income Corporate and Other Plan Assets [Member] Fixed Income Corporate and Other Plan Assets [Member] Defined Benefit Plan, Plan Assets, Level 3 Reconciliation [Line Items] Defined Benefit Plan, Plan Assets, Level 3 Reconciliation [Line Items] Actual return on plan assets: Defined Benefit Plan, Plan Assets Level 3 Reconciliation, Increase (Decrease) for Purchase, Sale, and Settlement [Abstract] Realized Defined Benefit Plan, Plan Assets Level 3 Reconciliation, Increase (Decrease) for Actual Return (Loss) on Plan Assets Sold Unrealized Defined Benefit Plan, Plan Assets Level 3 Reconciliation, Increase (Decrease) for Actual Return (Loss) on Plan Assets Still Held Purchases Defined Benefit Plan, Plan Assets Level 3 Reconciliation, Increase for Purchase Sales Defined Benefit Plan, Plan Assets Level 3 Reconciliation, Decrease for Sale Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table] Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table] Plan Name [Axis] Plan Name [Axis] Plan Name [Domain] Plan Name [Domain] MPC 2012 Plan Marathon Petroleum Corporation Two Thousand Twelve Plan [Member] Marathon Petroleum Corporation Two Thousand Twelve Plan [Member] MPC 2012 and 2011 Plans MPC 2012 and 2011 Plans [Member] MPC 2012 and 2011 Plans [Member] Award Type [Axis] Award Type [Axis] Award Type [Domain] Award Type [Domain] Awards Other Than Stock Options Or Stock Appreciation Rights Awards Other Than Stock Options Or Stock Appreciation Rights [Member] Awards Other Than Stock Options Or Stock Appreciation Rights [Member] Stock Options Share-based Payment Arrangement, Option [Member] Restricted Stock Awards and Restricted Stock Units Restricted Stock Awards and Restricted Stock Units [Member] Restricted stock awards and restricted stock units [Member] Performance Unit Awards Performance Shares [Member] Share-based Compensation Arrangement by Share-based Payment Award [Line Items] Share-based Compensation Arrangement by Share-based Payment Award [Line Items] Number of shares of common stock authorized to be delivered under the compensation plan Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Authorized Share-based compensation arrangement by share-based payment award, expiration period Share-based Compensation Arrangement by Share-based Payment Award, Expiration Period Vesting period of awards Share-based Compensation Arrangement by Share-based Payment Award, Award Vesting Period Restricted stock and restricted stock unit awards granted in 2012, additional holding period Share Based Compensation Arrangement By Share Based Payment Award Additional Required Holding Period Share Based Compensation Arrangement By Share Based Payment Award Additional Required Holding Period Target payout Share-based Compensation Arrangement by Share-based Payment Award, Target Payout Share-based Compensation Arrangement by Share-based Payment Award, Target Payout Actual payout Share-based Compensation Arrangement by Share-based Payment Award, Actual Payout Share-based Compensation Arrangement by Share-based Payment Award, Actual Payout Target payout percentage Share-based Compensation Arrangement by Share-based Payment Award, Target Payout Percentage Share-based Compensation Arrangement by Share-based Payment Award, Target Payout Percentage Pay-out percentage in MPC common stock (in percentage) Pay Out Shares Pay-out percentage in MPC Common stock shares Pay-out percentage in cash (in percentage) Pay Out Cash Pay-out percentage in cash Disclosure of Share-based Compensation Arrangements by Share-based Payment Award Disclosure of Share-based Compensation Arrangements by Share-based Payment Award [Table Text Block] Weighted Average Assumptions Used To Value Stock Options Awards Schedule of Share-based Payment Award, Stock Options, Valuation Assumptions [Table Text Block] Summary of Stock Option Award Activity Share-based Payment Arrangement, Option, Activity [Table Text Block] Summary of Restricted Stock Award Activity Share-based Payment Arrangement, Restricted Stock and Restricted Stock Unit, Activity [Table Text Block] Schedule of Share-based Compensation, Restricted Stock and Restricted Stock Units Activity, Vested And Unvested Schedule Of Share Based Compensation Restricted Stock And Restricted Stock Units Activity Vested And Unvested Table [Text Block] Schedule of Share-based Compensation, Restricted Stock and Restricted Stock Units Activity, Vested And Unvested [Table Text Block] Schedule of Performance Unit Awards Schedule of Nonvested Performance-based Units Activity [Table Text Block] Schedule of Share-based Compensation, Performance Unit Awards, Valuation Assumptions Schedule of Share-based Compensation, Performance Unit Awards, Valuation Assumptions [Table Text Block] Schedule of Share-based Compensation, Performance Unit Awards, Valuation Assumptions [Table Text Block] Statement of Stockholders' Equity [Abstract] Equity Components [Axis] Equity Components [Axis] Equity Component [Domain] Equity Component [Domain] Common Stock Common Stock [Member] Treasury Stock Treasury Stock [Member] Additional Paid-in Capital Additional Paid-in Capital [Member] Retained Earnings Retained Earnings [Member] Accumulated Other Comprehensive Income (Loss) AOCI Attributable to Parent [Member] Non-controlling Interests Noncontrolling Interest [Member] Cumulative effect of adopting new accounting standards Cumulative Effect of New Accounting Principle in Period of Adoption Increase (Decrease) in Stockholders' Equity [Roll Forward] Increase (Decrease) in Stockholders' Equity [Roll Forward] Beginning balance Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest Net income 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 Shares repurchased Treasury Stock, Value, Acquired, Cost Method Shares issued - stock based compensation Shares Issued, Value, Share-based Payment Arrangement, before Forfeiture Shares returned - stock based compensation Shares Issued, Value, Share-based Payment Arrangement, Forfeited Stock based compensation Shares Issued, Value, Share-based Payment Arrangement, after Forfeiture Equity transactions of MPLX & ANDX Impact of Subsidiary Equity Transactions Impact of Subsidiary Equity Transactions Issuance of shares for Andeavor acquisition Stock Issued During Period, Value, Acquisitions Noncontrolling interest acquired from Andeavor Noncontrolling Interest, Increase from Business Combination Ending balance Noncontrolling Interest [Table] Noncontrolling Interest [Table] 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] 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] Common units conversion ratio - ANDX to MPLX 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 Distributions declared, per unit Distribution Made to Limited Partner, Distributions Declared, Per Unit 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 Reporting [Abstract] Schedule of Revenue by Major Customers, by Reporting Segments [Table] Schedule of Revenue by Major Customers, by Reporting Segments [Table] Major Customers [Axis] Customer [Axis] Name of Major Customer [Domain] Customer [Domain] None None [Member] None [Member] Segment Reporting Information [Line Items] Segment Reporting Information [Line Items] Number of reportable segments Number of Reportable Segments Number of refineries Number of Refineries Number of Refineries Percent of annual revenues Concentration Risk, Percentage Weighted-average assumptions used to determine benefit obligation: Defined Benefit Plan, Weighted Average Assumptions Used in Calculating Benefit Obligation [Abstract] Discount rate Defined Benefit Plan, Assumptions Used Calculating Benefit Obligation, Discount Rate Rate of compensation increase Defined Benefit Plan, Assumptions Used Calculating Benefit Obligation, Rate of Compensation Increase Weighted-average assumptions used to determine net periodic benefit cost: Defined Benefit Plan, Weighted Average Assumptions Used in Calculating Net Periodic Benefit Cost [Abstract] Discount rate Defined Benefit Plan, Assumptions Used Calculating Net Periodic Benefit Cost, Discount Rate Expected long-term return on plan assets Defined Benefit Plan, Assumptions Used Calculating Net Periodic Benefit Cost, Expected Long-term Rate of Return on Plan Assets Rate of compensation increase Defined Benefit Plan, Assumptions Used Calculating Net Periodic Benefit Cost, Rate of Compensation Increase Share Repurchases Class of Treasury Stock [Table Text Block] MPLX & Enbridge Energy Partners MPLX & Enbridge Energy Partners [Member] MPLX & Enbridge Energy Partners [Member] MarEn Bakken Company LLC MarEn Bakken Company LLC [Member] MarEn Bakken Company LLC [Member] Cash paid to acquire equity method investments Payments to Acquire Equity Method Investments Percentage of ownership interest in joint venture acquired Percentage of Ownership Interest in Joint Venture Acquired Percentage of Ownership Interest in Joint Venture Acquired Schedule of Long-term Debt Instruments [Table] Schedule of Long-term Debt Instruments [Table] Consolidated Entities [Axis] Consolidated Entities [Axis] Consolidated Entities [Domain] Consolidated Entities [Domain] MPLX Subsidiaries [Member] MPLX revolving credit facility due July 2024 [Member] MPLX Revolving Credit Facility due July 2024 [Member] MPLX Revolving Credit Facility due July 2024 [Member] Credit Facility [Axis] Credit Facility [Axis] Credit Facility [Domain] Credit Facility [Domain] Letter of Credit Letter of Credit [Member] Bridge Loan Bridge Loan [Member] Debt Instrument [Line Items] Debt Instrument [Line Items] Total capacity Line of Credit Facility, Current Borrowing Capacity Line of credit facility additional borrowing capacity Line Of Credit Facility Additional Borrowing Capacity Line Of Credit Facility Additional Borrowing Capacity Debt instrument, description of variable rate basis Debt Instrument, Description of Variable Rate Basis 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 Mt. Airy Terminal Mt. Airy Terminal [Member] Mt. Airy Terminal [Member] Business Acquisition [Line Items] Business Acquisition [Line Items] Cash payment for acquisition Payments to Acquire Businesses, Gross Storage capacity Storage Capacity Storage Capacity Barrels handled Barrels Handled Barrels Handled Reconciliation of Operating Profit (Loss) from Segments to Consolidated [Table] Reconciliation of Operating Profit (Loss) from Segments to Consolidated [Table] Consolidation Items [Axis] Consolidation Items [Axis] Consolidation Items [Domain] Consolidation Items [Domain] Operating Segments Operating Segments [Member] Corporate and Other Corporate, Non-Segment [Member] 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] Income from operations Operating Income (Loss) Transaction-related costs Business Combination, Acquisition Related Costs Litigation Litigation Settlement, Expense Impairment 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 Acquisitions Business Combination Disclosure [Text Block] Earnings Per Share [Abstract] 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] Indefinite-lived intangible assets Indefinite-lived Intangible Assets (Excluding Goodwill) Amortization expense Amortization of Intangible Assets 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 Annual Report Document Annual 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 Well-known Seasoned Issuer Entity Well-known Seasoned Issuer Entity Voluntary Filers Entity Voluntary Filers 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 Public Float Entity Public Float Entity Common Stock, Shares Outstanding Entity Common Stock, Shares Outstanding Income Tax Disclosure [Abstract] Income Taxes Income Tax Disclosure [Text Block] Projected benefit obligations Defined Benefit Plan, Pension Plan with Accumulated Benefit Obligation in Excess of Plan Assets, Projected Benefit Obligation Accumulated benefit obligations Defined Benefit Plan, Plan with Accumulated Benefit Obligation in Excess of Plan Assets, Accumulated Benefit Obligation Fair value of plan assets Defined Benefit Plan, Plan with Accumulated Benefit Obligation in Excess of Plan Assets, Plan Assets Restricted Stock Restricted Stock [Member] Restricted Stock Units Restricted Stock Units (RSUs) [Member] Number of Shares Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward] Unvested, beginning balance Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number Granted Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Grants in Period Vested Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Vested in Period Forfeited Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Forfeited in Period Unvested, ending balance Weighted Average Grant Date Fair Value Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract] Unvested, beginning balance (in USD per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value Granted (in USD per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Grants in Period, Weighted Average Grant Date Fair Value Vested (in USD per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Vested in Period, Weighted Average Grant Date Fair Value Forfeited (in USD per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Forfeitures, Weighted Average Grant Date Fair Value Unvested, ending balance (in USD per share) New Accounting Pronouncements and Changes in Accounting Principles [Abstract] Recently Adopted Accounting Pronouncements New Accounting Pronouncements and Changes in Accounting Principles [Text Block] Not Yet Adopted Accounting Pronouncements Description of New Accounting Pronouncements Not yet Adopted [Text Block] Statement of Cash Flows [Abstract] Operating activities: Net Cash Provided by (Used in) Operating Activities [Abstract] 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 Impairment expense Asset Impairment Charges Depreciation and amortization Depreciation, Depletion and Amortization 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 Gain (Loss) on Disposition of Property Plant Equipment, Excluding Oil and Gas Property and Timber Property Income from equity method investments Income (Loss) from Equity Method Investments Distributions from equity method investments 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 Payments to Acquire 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] Commercial paper – issued Proceeds from Issuance of Commercial Paper Commercial paper - repayments Repayments of Commercial Paper 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 Issuance of MPLX LP common units Proceeds from Issuance of Common Limited Partners Units Distributions to noncontrolling interests Payments to Noncontrolling Interests Contributions from noncontrolling interests Proceeds from Noncontrolling Interests Contingent consideration payment Payment for Contingent Consideration Liability, Financing Activities 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, Restricted Cash and Restricted Cash Equivalents Cash, cash equivalents and restricted cash at end of period Intrinsic Value of Awards Vested During the Period (in millions) Share Based Compensation Arrangement By Share Based Payment Award Equity Instruments Other Than Options Vested In Period Total Intrinsic Value 1 Share Based Compensation Arrangement By Share Based Payment Award Equity Instruments Other Than Options Vested In Period Total Intrinsic Value1 Weighted Average Grant Date Fair Value of Awards Granted During the Period Unrecognized compensation cost Share-based Payment Arrangement, Nonvested Award, Cost Not yet Recognized, Amount Weighted average recognition period, in years Share-based Payment Arrangement, Nonvested Award, Cost Not yet Recognized, Period for Recognition Statutory rate applied to income before income taxes Effective Income Tax Rate Reconciliation, at Federal Statutory Income Tax Rate, Percent State and local income taxes, net of federal income tax effects Effective Income Tax Rate Reconciliation, State and Local Income Taxes, Percent Goodwill impairment Effective Income Tax Rate Reconciliation, Deduction, Other, Percent Noncontrolling interests Effective Income Tax Rate Reconciliation, Noncontrolling Interest Income (Loss), Percent TCJA legislation Effective Income Tax Rate Reconciliation, Change in Enacted Tax Rate, Percent Other Effective Income Tax Rate Reconciliation, Other Adjustments, Percent Provision for income taxes Effective Income Tax Rate Reconciliation, Percent Basic earnings per share: Earnings Per Share, Basic [Abstract] Net income attributable to MPC Net Income (Loss) Attributable to Parent Income allocated to participating securities, basic 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 Net income attributable to MPC per share – basic Earnings Per Share, Basic Diluted earnings per share: Earnings Per Share, Diluted [Abstract] Income allocated to participating securities, diluted 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 Net income attributable to MPC per share – diluted Earnings Per Share, Diluted Finite-Lived Intangible Assets by Major Class [Axis] Finite-Lived Intangible Assets by Major Class [Axis] Finite-Lived Intangible Assets, Major Class Name [Domain] Finite-Lived Intangible Assets, Major Class Name [Domain] Customer contracts and relationships Customer Relationships [Member] Common units conversion ratio Common Units Conversion Ratio Ratio applied to the conversion of Markwest shares to MPLX common units. Cash consideration to unitholders (per unit) Cash consideration to unitholders Cash payment per unit to unitholders for acquisition Common shares converted to cash, number of shares Business Combination Common Shares Converted To Cash Business Combination Common Shares Converted To Cash Shares converted, number of shares Conversion of Stock, Shares Converted Shares issued or issuable, number of shares Business Acquisition, Equity Interest Issued or Issuable, Number of Shares Fair value of converted equity awards Business Combination, Equity Interests Issued - Conversion of Equity Awards Business Combination, Equity Interests Issued - Conversion of Equity Awards Goodwill Goodwill, expected tax deductible amount Business Acquisition, Goodwill, Expected Tax Deductible Amount Finite-lived intangibles Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Finite-Lived Intangibles Acquired finite-lived intangible assets, weighted average useful life Acquired Finite-lived Intangible Assets, Weighted Average Useful Life Transaction costs Business Acquisition, Transaction Costs Sales and other operating revenues Business Combination, Pro Forma Information, Revenue of Acquiree since Acquisition Date, Actual Pro-forma, purchase accounting inventory effects and transaction-related costs effect on net income attributable to MPC Pro-Forma, Purchase Accounting Inventory Effects and Transaction-related Costs Effect on Net Income Attributable to MPC Pro-Forma, Purchase Accounting Inventory Effects and Transaction-related Costs Effect on Net Income Attributable to MPC Risk-free interest rate Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Risk Free Interest Rate Look-back period (in years) Sharebased Compensation Arrangement By Sharebased Payment Award Fair Value Assumptions Lookback Period Remaining performance period at the grant date. Expected volatility Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Volatility Rate Grant date fair value of performance units granted 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] Marathon Petroleum Corporation Parent Company [Member] Senior notes, 3.400% due December 2020 Senior Notes Due December 2020 [Member] Senior Notes Due December 2020 Senior notes, 5.125% due March 2021 Senior Notes Due March 2021 [Member] Senior Notes Due March 2021 Senior notes, 5.375% due October 2022 Senior Notes Due October 2022 [Member] Senior Notes Due October 2022 [Member] Senior notes, 4.750% due December 2023 Senior Notes Due December 2023 [Member] Senior Notes Due December 2023 [Member] Senior notes, 5.125% due April 2024 Senior Notes Due April 2024 [Member] Senior Notes Due April 2024 [Member] Senior notes, 3.625%, due September 2024 Senior Notes Due September 2024 [Member] Senior Notes Due September 2024 Senior notes, 5.125% due December 2026 Senior Notes Due December 2026 [Member] Senior Notes Due December 2026 [Member] Senior notes, 3.800% due April 2028 Senior Notes Due April 2028 [Member] Senior Notes Due April 2028 [Member] Senior notes, 6.500% due March 2041 Senior Notes Due March 2041 [Member] Senior Notes Due March 2041 Senior notes, 4.750% due September 2044 Senior Notes Due September 2044 [Member] Senior Notes Due September 2044 Senior notes, 5.850% due December 2045 Senior Notes Due December 2045 [Member] Senior Notes Due December 2045 Senior notes, 4.500% due April 2048 Senior Notes Due April 2048 [Member] Senior Notes Due April 2048 Andeavor senior notes, 3.800% - 5.375% due 2022 - 2048 Senior Notes Due 2022 - 2048 [Member] Senior Notes Due 2022 - 2048 Senior notes, 5.000%, due September 2054 Senior Notes Due September 2054 [Member] Senior Notes Due September 2054 Senior notes, 2.700% due December 2018 Senior Notes Due December 2018 [Member] Senior Notes Due December 2018 Long-term debt outstanding Long-term Debt, Gross Long-term debt acquired Repayments of long-term debt Repayments of Long-term Debt Make whole premium Make Whole Premium Make Whole Premium Current: Current Income Tax Expense (Benefit), Continuing Operations [Abstract] Federal Current Federal Tax Expense (Benefit) State and local Current State and Local Tax Expense (Benefit) Foreign Current Foreign Tax Expense (Benefit) Total current Current Income Tax Expense (Benefit) Deferred: Deferred Income Tax Expense (Benefit), Continuing Operations [Abstract] Federal Deferred Federal Income Tax Expense (Benefit) State and local Deferred State and Local Income Tax Expense (Benefit) Foreign Deferred Foreign Income Tax Expense (Benefit) Total deferred Income tax provision (benefit) Income Tax Expense (Benefit) Express Mart Express Mart [Member] Express Mart [Member] Number of stores Number of Stores Supplemental Cash Flow Elements [Abstract] Cash and cash equivalents Cash and Cash Equivalents, at Carrying Value Restricted cash Restricted Cash, Current Cash, cash equivalents and restricted cash Schedule of Segment Reporting Information, by Segment [Table] Schedule of Segment Reporting Information, by Segment [Table] Intersegment Eliminations Intersegment Eliminations [Member] Reportable Segment [Member] Reportable Segment [Member] Reportable Segment [Member] Segment 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. Crude 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 Operating lease revenue Operating Leases, Income Statement, Lease Revenue Sherwood Midstream Sherwood Midstream LLC [Member] Sherwood Midstream LLC Ohio Fractionation MarkWest Ohio Fractionation Company, L.L.C. [Member] MarkWest Ohio Fractionation Company, L.L.C. [Member] Sherwood Midstream Holdings Sherwood Midstream Holdings [Member] Sherwood Midstream Holdings [Member] Antero Midstream Partners L.P. Antero Midstream Partners L.P. [Member] Antero Midstream Partners L.P. [Member] Direct Ownership Interest Direct Ownership Interest [Member] Direct ownership interest [Member] Contribution of fixed assets to joint venture Contribution of Property Payments to acquire interest in joint venture Payments to Acquire Interest in Joint Venture Capacity Fair value of assets contributed Fair Value Of Assets Contributed The fair value of assets contributed to the Partnership in noncash investing or financing activities. Gain (loss) on disposition of assets Gain (Loss) on Disposition of Assets Derivative [Table] Derivative [Table] Derivative Instrument [Axis] Derivative Instrument [Axis] Derivative Contract [Domain] Derivative Contract [Domain] Commodity derivative instruments Commodity Contract [Member] 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] Gain (Loss) Derivative, Gain (Loss) on Derivative, Net MPC trade receivables securitization facility Trade Receivables Securitization Facility due July 2019 [Member] Trade Receivables Securitization Facility due July 2019 Noncontrolling Interest Consolidation, Less than Wholly Owned Subsidiary, Parent Ownership Interest, Effects of Changes, Net [Table Text Block] Schedule of Acquired Finite-Lived Intangible Asset by Major Class [Table] Schedule of Acquired Finite-Lived Intangible Asset by Major Class [Table] Brand rights and tradenames Trademarks and Trade Names [Member] Royalty agreements Royalty Agreements [Member] Other intangible assets Other Intangible Assets [Member] Acquired Finite-Lived Intangible Assets [Line Items] Acquired Finite-Lived Intangible Assets [Line Items] Gross Finite-Lived Intangible Assets, Gross Accumulated amortization Finite-Lived Intangible Assets, Accumulated Amortization Net Intangible Assets, Net (Excluding Goodwill) 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] Equity Stockholders' Equity Note Disclosure [Text Block] Defined Benefit Plans and Other Postretirement Benefit Plans Disclosures [Table] Defined Benefit Plans and Other Postretirement Benefit Plans Disclosures [Table] Defined Benefit Plans and Other Postretirement Benefit Plans Table Text Block [Line Items] Defined Benefit Plans and Other Postretirement Benefit Plans Table Text Block [Line Items] 2020 Defined Benefit Plan, Expected Future Benefit Payment, Next Twelve Months 2021 Defined Benefit Plan, Expected Future Benefit Payment, Year Two 2022 Defined Benefit Plan, Expected Future Benefit Payment, Year Three 2023 Defined Benefit Plan, Expected Future Benefit Payment, Year Four 2024 Defined Benefit Plan, Expected Future Benefit Payment, Year Five 2025 through 2029 Defined Benefit Plan, Expected Future Benefit Payment, Five Fiscal Years Thereafter Supplemental Cash Flow Information [Abstract] Net cash provided by operating activities included: Adjustments, Noncash Items, to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [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 assets Acquisition: Noncash or Part Noncash Acquisition, Net Nonmonetary Assets Acquired (Liabilities Assumed) [Abstract] Fair value of MPC shares issued Business Combination, Consideration Transferred, Equity Interests Issued and Issuable Beginning balance Number of shares repurchased Shares returned - stock-based compensation Shares Issued, Shares, Share-based Payment Arrangement, Forfeited Ending balance Defined benefit plan, plan assets, expected long-term rate-of-return, description Defined Benefit Plan, Plan Assets, Expected Long-term Rate-of-Return, Description Property, Plant and Equipment [Abstract] Schedule of Property, Plant and Equipment [Table] Property, Plant and Equipment [Table] Property, Plant and Equipment, Type [Axis] Property, Plant and Equipment, Type [Axis] Property, Plant and Equipment, Type [Domain] Property, Plant and Equipment, Type [Domain] Assets held under capital leases Assets Held under Capital Leases [Member] Construction in progress Construction in Progress [Member] Property, Plant and Equipment [Line Items] Property, Plant and Equipment [Line Items] Property, plant and equipment, accumulated depreciation Effect on total of service and interest cost components, 1-Percentage-Point-Increase Defined Benefit Plan, Effect of One Percentage Point Increase on Service and Interest Cost Components Effect on other postretirement benefit obligations, 1-Percentage-Point-Increase Defined Benefit Plan, Effect of One Percentage Point Increase on Accumulated Postretirement Benefit Obligation Effect on total of service and interest cost components, 1-Percentage-Point Decrease Defined Benefit Plan, Effect of One Percentage Point Decrease on Service and Interest Cost Components Effect on other postretirement benefit obligations, 1-Percentage-Point-Decrease Defined Benefit Plan, Effect of One Percentage Point Decrease on Accumulated Postretirement Benefit Obligation 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] 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 MarkWest MarkWest [Member] MarkWest [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] Senior notes, 6.250% due October 2022 Senior notes, 3.500% due December 2022 Senior Notes Due December 2022 [Member] Senior Notes Due December 2022 [Member] Senior notes, 3.375% due March 2023 Senior Notes Due March 2023 [Member] Senior Notes Due March 2023 Senior notes, 4.500% due July 2023 Senior Notes Due July 2023 [Member] Senior Notes Due July 2023 Senior notes, 6.375% due May 2024 Senior Notes Due May 2024 [Member] Senior Notes Due May 2024 [Member] Senior notes, 4.875% due December 2024 Senior Notes Due December 2024 [Member] Senior Notes Due December 2024 Senior notes, 5.250% due January 2025 Senior Notes Due January 2025 [Member] Senior Notes Due January 2025 [Member] Senior notes, 4.000% due February 2025 Senior Notes Due February 2025 [Member] Senior Notes Due February 2025 Senior notes, 4.875% due June 2025 Senior Notes Due June 2025 [Member] Senior Notes Due June 2025 MarkWest senior notes, 4.500% - 5.500% due 2023 - 2025 Senior Notes Due 2023 - 2025 [Member] Senior Notes Due 2023 - 2025 Senior notes, 4.125% due March 2027 Senior Notes Due March 2027 [Member] Senior Notes Due March 2027 [Member] Senior notes, 4.250% due December 2027 Senior Notes Due December 2027 [Member] Senior Notes Due December 2027 [Member] Senior notes, 4.000% due March 2028 Senior Notes Due March 2028 [Member] Senior Notes Due March 2028 Senior notes, 4.800% due February 2029 Senior Notes Due February 2029 [Member] Senior Notes Due February 2029 [Member] Senior notes, 4.500% due April 2038 Senior Notes Due April 2038 [Member] Senior Notes Due April 2038 Senior notes, 5.200% due March 2047 Senior Notes Due March 2047 [Member] Senior Notes Due March 2047 [Member] Senior notes, 5.200% due December 2047 Senior Notes Due December 2047 [Member] Senior Notes Due December 2047 [Member] ANDX senior notes, 3.500% - 6.375% due 2019 - 2047 Senior Notes Due 2019-2047 [Member] Senior Notes Due 2019-2047 [Member] Senior notes, 4.700% due April 2048 Senior notes, 5.500% due February 2049 Senior Notes Due February 2049 [Member] Senior Notes Due February 2049 [Member] Senior notes, 4.900% due April 2058 Senior Notes Due April 2058 [Member] Senior Notes Due April 2058 Senior notes, 5.500%, due October 2019 Senior Notes Due October 2019 [Member] Senior Notes Due October 2019 [Member] Senior notes, 5.500%, due February 2023 Senior Notes Due February 2023 [Member] Senior Notes Due February 2023 MPLX 364-day term loan MPLX 364-Day Term Loan [Member] MPLX 364-Day Term Loan Interest rate, effective percentage Debt Instrument, Interest Rate, Effective Percentage Interest costs incurred Interest Costs Incurred Redemption price, percentage Debt Instrument, Redemption Price, Percentage Loss on extinguishment of debt Gain (Loss) on Extinguishment of Debt Repayments of short-term debt Repayments of Short-term Debt Schedule of Goodwill [Table] Schedule of Goodwill [Table] Retail Speedway [Member] MPC's Speedway operating segment sells transportation fuels and convenience products in the retail market, primarily in the Midwest, through Speedway-branded convenience stores. Goodwill [Line Items] Goodwill [Line Items] Beginning balance Acquisitions Goodwill, Acquired During Period Dropdowns to MPLX Goodwill, Transfers Purchase price allocation adjustments Goodwill, Purchase Accounting Adjustments Impairments Dispositions Goodwill, Other Increase (Decrease) Ending balance Dividends declared per share of common stock (in dollars per share) Common Stock, Dividends, Per Share, Declared Variable Interest Entities Variable Interest Entity Disclosure [Text Block] 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] Carrying Value Reported Value Measurement [Member] Fair Value Estimate of Fair 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 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) Summary Of Property, Plant And Equipment Property, Plant and Equipment [Table Text Block] 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] Limited Partner Limited Partner [Member] General Partner General Partner [Member] Units issued, number of units Debt instrument, term Debt Instrument, Term Conversion of stock, shares issued Conversion of Stock, Shares Issued The Andersons Marathon Holdings LLC The Andersons Marathon Holdings LLC [Member] The Andersons Marathon Holdings LLC [Member] Watson Cogeneration Company Watson Cogeneration Company [Member] Watson Cogeneration Company [Member] PFJ Southeast PFJ Southeast LLC [Member] PFJ Southeast LLC [Member] Andeavor Logistics Rio Pipeline Andeavor Logistics Rio Pipeline [Member] Andeavor Logistics Rio Pipeline [Member] Centrahoma Processing LLC Centrahoma Processing LLC [Member] Centrahoma Processing LLC [Member] Explorer Pipeline [Member] Explorer Pipeline [Member] Explorer Pipeline [Member] Illinois Extension Pipeline Illinois Extension Pipeline Company LLC [Member] Illinois Extension Pipeline Company LLC [Member] LOOP Loop Llc [Member] LOOP LLC [Member] MarkWest EMG Jefferson Dry Gas MarkWest EMG Jefferson Dry Gas Gathering Company, L.L.C. [Member] MarkWest EMG Jefferson Dry Gas Gathering Company, L.L.C. [Member] MarkWest Utica EMG MarkWest Utica EMG [Member] MarkWest Utica EMG [Member] Minnesota Pipe Line Company, LLC [Member] Minnesota Pipe Line Company, LLC [Member] Minnesota Pipe Line Company, LLC [Member] Rendezvous Gas Services, L.L.C. Rendezvous Gas Services, L.L.C. [Member] Rendezvous Gas Services, L.L.C. [Member] Whistler Pipeline LLC Whistler Pipeline LLC [Member] Whistler Pipeline LLC [Member] Wink to Webster Pipeline LLC Wink to Webster Pipeline LLC [Member] Wink to Webster Pipeline LLC [Member] Crowley Coastal Partners, LLC Crowley Coastal Partners LLC [Member] Crowley Coastal Partners LLC [Member] Other equity method investees Other Equity Method Investees [Member] Other Equity Method Investees [Member] Equity method investments Equity Method Investments Non-cash gain on exchange of equity ownership interests Non-cash gain on exchange of equity ownership interests Non-cash gain on exchange of equity ownership interests Debt Debt Disclosure [Text Block] Accounting Policies [Abstract] Principles applied in consolidation Consolidation, Policy [Policy Text Block] Use of estimates Use of Estimates, Policy [Policy Text Block] Revenue recognition Revenue Recognition, Sales of Goods [Policy Text Block] Crude oil and refined product exchanges and matching buy/sell transactions Agricultural Cooperative Inventory, Policy [Policy Text Block] Cash and cash equivalents Cash and Cash Equivalents, Unrestricted Cash and Cash Equivalents, Policy [Policy Text Block] Restricted cash Cash and Cash Equivalents, Restricted Cash and Cash Equivalents, Policy [Policy Text Block] Accounts receivable and allowance for doubtful accounts Accounts Receivable [Policy Text Block] Inventories Inventory, Policy [Policy Text Block] Derivative instruments Derivatives, Policy [Policy Text Block] Property, plant and equipment Property, Plant and Equipment, Policy [Policy Text Block] Goodwill and intangible assets Goodwill and Intangible Assets, Goodwill, Policy [Policy Text Block] Major maintenance activities Property, Plant and Equipment, Planned Major Maintenance Activities, Policy [Policy Text Block] Environmental costs Environmental Costs, Policy [Policy Text Block] Asset retirement obligations Asset Retirement Obligation [Policy Text Block] Income taxes Income Tax, Policy [Policy Text Block] Stock-based compensation arrangements Share-based Payment Arrangement [Policy Text Block] Business combinations Business Combinations Policy [Policy Text Block] Environmental credits and obligations Emission Credits or Allowances, Policy [Policy 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] Schedule of Notional Amounts of Outstanding Derivative Positions [Table Text Block] Schedule of Notional Amounts of Outstanding Derivative Positions [Table Text Block] Effect of Commodity Derivative Instruments in Statements of Income Derivative Instruments, Gain (Loss) [Table Text Block] Operating Operating Leases, Future Minimum Payments Due, Fiscal Year Maturity [Abstract] Due next twelve months Operating Leases, Future Minimum Payments Due, Next Twelve Months Due year two Lessee, Operating Lease, Liability, Payments, Due Year Two Due year three Lessee, Operating Lease, Liability, Payments, Due Year Three Due year four Lessee, Operating Lease, Liability, Payments, Due Year Four Due year five Lessee, Operating Lease, Liability, Payments, Due Year Five Due after year five 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