<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2022"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="mdgl-20221219.xsd" xlink:type="simple"/>
    <context id="duration_2022-12-19_to_2022-12-19">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-12-19</startDate>
            <endDate>2022-12-19</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="duration_2022-12-19_to_2022-12-19">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2022-12-19_to_2022-12-19"
      id="Hidden_dei_EntityCentralIndexKey">0001157601</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2022-12-19_to_2022-12-19">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2022-12-19_to_2022-12-19">2022-12-19</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="duration_2022-12-19_to_2022-12-19">MADRIGAL PHARMACEUTICALS, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2022-12-19_to_2022-12-19">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2022-12-19_to_2022-12-19">001-33277</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2022-12-19_to_2022-12-19">04-3508648</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2022-12-19_to_2022-12-19">Four Tower Bridge</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="duration_2022-12-19_to_2022-12-19">200 Barr Harbor Drive</dei:EntityAddressAddressLine2>
    <dei:EntityAddressAddressLine3 contextRef="duration_2022-12-19_to_2022-12-19">Suite 200</dei:EntityAddressAddressLine3>
    <dei:EntityAddressCityOrTown contextRef="duration_2022-12-19_to_2022-12-19">West Conshohocken</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2022-12-19_to_2022-12-19">PA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2022-12-19_to_2022-12-19">19428</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2022-12-19_to_2022-12-19">(267)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2022-12-19_to_2022-12-19">824-2827</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2022-12-19_to_2022-12-19">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2022-12-19_to_2022-12-19">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2022-12-19_to_2022-12-19">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2022-12-19_to_2022-12-19">false</dei:PreCommencementIssuerTenderOffer>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2022-12-19_to_2022-12-19">false</dei:EntityEmergingGrowthCompany>
    <dei:Security12bTitle contextRef="duration_2022-12-19_to_2022-12-19">Common Stock, $0.0001 Par Value Per Share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2022-12-19_to_2022-12-19">MDGL</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2022-12-19_to_2022-12-19">NASDAQ</dei:SecurityExchangeName>
</xbrl>
