<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="mgy-20261001.xsd" xlink:type="simple"/>
    <context id="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001698990</identifier>
        </entity>
        <period>
            <startDate>2026-10-01</startDate>
            <endDate>2026-10-01</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Tc_lgM3fCaMOUS1V05VfwGbdQ_2_1">0001698990</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Tc_t2qxI5mFTkioQmaJpEmRsA_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_CKV4cZ9RsU2p9L2U6E0YFA">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_rPTPA6uCOEyvBtcZ66zgng">2026-10-01</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_y67ENS8SvEaVLhOpKaOckQ">Magnolia Oil &amp; Gas Corp</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Tc_d2GjeTURc0yFeB2cxynvmg_4_0">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Tc_ltPqvgyw8USlMiCelObu-g_4_1">001-38083</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Tc_zNKf00hiPkaSpc8iSStONA_4_2">81-5365682</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_AZzeBr5jDUSz24w-Rvgu0w">Nine Greenway Plaza</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_DDJWvAC4UE2LgeZYn_0TsA">Suite 1300</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_qFI2nbvNOUyzFVuJpRlFGw">Houston</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_WTVeEAL8Rk2eNa6hBMiDXg">TX</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr__QHjgiyGLEiDPgQ4Gx26Xg">77046</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_dZaUTvCW3UidVGSHbpol1A">713</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_FbDJqiV6cUqM5iX3ac3sgA">842-9050</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_GpJktvnYSkuDFYaKCjoNJg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_0wAJWMZMQU-7YPKwjrj5-w">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_D6B3pksOVE6Pmdg3U_-AKg">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_b035NA6InUyGGr5IMQS0yA">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_yeoJoNBb5UqsWP8A4AtJmQ">Class A Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Tc_zlzBc8eXiUiKvv3ei5PDTg_5_1">MGY</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Tc_cmq_WGu7WkOW5wC3RTDEFg_5_2">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_10_1_2026_To_10_1_2026_bTNxaGgcj0OzZQUK2rEaxA"
      id="Narr_5aaQJvbaBEq8BmvXeMgC6Q">false</dei:EntityEmergingGrowthCompany>
</xbrl>
