<?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="mlm-20260811.xsd" xlink:type="simple"/>
    <context id="duration_2026-08-11_to_2026-08-11">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000916076</identifier>
        </entity>
        <period>
            <startDate>2026-08-11</startDate>
            <endDate>2026-08-11</endDate>
        </period>
    </context>
    <dei:EntityRegistrantName
      contextRef="duration_2026-08-11_to_2026-08-11"
      id="Hidden_dei_EntityRegistrantName">MARTIN MARIETTA MATERIALS INC</dei:EntityRegistrantName>
    <dei:AmendmentFlag contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-299">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-08-11_to_2026-08-11"
      id="Hidden_dei_EntityCentralIndexKey">0000916076</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-310">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-311">2026-08-11</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-312">NC</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-313">001-12744</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-314">56-1848578</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-315">4123 Parklake Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-316">Raleigh</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-317">NC</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-318">27612</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-319">919</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-320">781-4550</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-321">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-322">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-323">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-324">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-325">Common Stock, $0.01 par value per share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-326">MLM</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-327">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-08-11_to_2026-08-11" id="ixv-328">false</dei:EntityEmergingGrowthCompany>
</xbrl>
