<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>155</ContextCount>
  <ElementCount>288</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>51</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>75000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>75010 - Statement - Consolidated Balance Sheets (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/StatementConsolidatedBalanceSheetsUnaudited</Role>
      <ShortName>Consolidated Balance Sheets (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>75020 - Statement - Consolidated Balance Sheets (Parenthetical) (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/StatementConsolidatedBalanceSheetsParentheticalUnaudited</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical) (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>75030 - Statement - Consolidated Statements of Earnings and Comprehensive Earnings (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_StatementConsolidatedStatementsOfEarningsAndComprehensiveEarningsUnaudited</Role>
      <ShortName>Consolidated Statements of Earnings and Comprehensive Earnings (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>75040 - Statement - Consolidated Statements of Cash Flows (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_StatementConsolidatedStatementsOfCashFlowsUnaudited</Role>
      <ShortName>Consolidated Statements of Cash Flows (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>75050 - Statement - Consolidated Statements of Total Equity (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_StatementConsolidatedStatementsOfTotalEquityUnaudited</Role>
      <ShortName>Consolidated Statements of Total Equity (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>75060 - Statement - Consolidated Statements of Total Equity (Parenthetical) (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_StatementConsolidatedStatementsOfTotalEquityParentheticalUnaudited</Role>
      <ShortName>Consolidated Statements of Total Equity (Parenthetical) (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995455 - Disclosure - Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPolicies</Role>
      <ShortName>Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995465 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSale</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995475 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995485 - Disclosure - Inventories, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureInventoriesNet</Role>
      <ShortName>Inventories, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995495 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureDebt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995505 - Disclosure - Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureFinancialInstruments</Role>
      <ShortName>Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995515 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995525 - Disclosure - Pension Benefits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosurePensionBenefits</Role>
      <ShortName>Pension Benefits</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995535 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995545 - Disclosure - Segments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSegments1</Role>
      <ShortName>Segments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995555 - Disclosure - Revenues and Gross Profit</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureRevenuesAndGrossProfit</Role>
      <ShortName>Revenues and Gross Profit</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995565 - Disclosure - Supplemental Cash Flow Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSupplementalCashFlowInformation</Role>
      <ShortName>Supplemental Cash Flow Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995575 - Disclosure - Subsequent Event</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSubsequentEvent</Role>
      <ShortName>Subsequent Event</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995585 - Disclosure - Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPolicies</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995595 - Disclosure - Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesTables</Role>
      <ShortName>Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPolicies</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>995605 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleTables</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSale</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>995615 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssets</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>995625 - Disclosure - Inventories, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureInventoriesNetTables</Role>
      <ShortName>Inventories, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureInventoriesNet</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>995635 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureDebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/DisclosureDebt</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995645 - Disclosure - Pension Benefits (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosurePensionBenefitsTables</Role>
      <ShortName>Pension Benefits (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/DisclosurePensionBenefits</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995655 - Disclosure - Segments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSegmentsTables</Role>
      <ShortName>Segments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSegments1</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>995665 - Disclosure - Revenues and Gross Profit (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureRevenuesAndGrossProfitTables</Role>
      <ShortName>Revenues and Gross Profit (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureRevenuesAndGrossProfit</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995675 - Disclosure - Supplemental Cash Flow Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSupplementalCashFlowInformationTables</Role>
      <ShortName>Supplemental Cash Flow Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSupplementalCashFlowInformation</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>995685 - Disclosure - Significant Accounting Policies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesAdditionalInformationDetail</Role>
      <ShortName>Significant Accounting Policies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>995695 - Disclosure - Significant Accounting Policies - Comprehensive Earnings Attributable to Martin Marietta Materials Incorporated (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSignificantAccountingPoliciesComprehensiveEarningsAttributableToMartinMariettaMaterialsIncorporatedDetail</Role>
      <ShortName>Significant Accounting Policies - Comprehensive Earnings Attributable to Martin Marietta Materials Incorporated (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>995705 - Disclosure - Significant Accounting Policies - Changes in Accumulated Other Comprehensive Earnings (Loss) Net of Tax (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSignificantAccountingPoliciesChangesInAccumulatedOtherComprehensiveEarningsLossNetOfTaxDetail</Role>
      <ShortName>Significant Accounting Policies - Changes in Accumulated Other Comprehensive Earnings (Loss) Net of Tax (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>995715 - Disclosure - Significant Accounting Policies - Noncurrent Deferred Tax Assets Recorded in Accumulated Other Comprehensive Earnings (Loss) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSignificantAccountingPoliciesNoncurrentDeferredTaxAssetsRecordedInAccumulatedOtherComprehensiveEarningsLossDetail</Role>
      <ShortName>Significant Accounting Policies - Noncurrent Deferred Tax Assets Recorded in Accumulated Other Comprehensive Earnings (Loss) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>995725 - Disclosure - Significant Accounting Policies - Reclassification Out of Accumulated Other Comprehensive Earnings (loss) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSignificantAccountingPoliciesReclassificationOutOfAccumulatedOtherComprehensiveEarningsLossDetail</Role>
      <ShortName>Significant Accounting Policies - Reclassification Out of Accumulated Other Comprehensive Earnings (loss) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>995735 - Disclosure - Significant Accounting Policies - Basic and Diluted Earnings from Continuing Operations Per Common Share (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesBasicAndDilutedEarningsFromContinuingOperationsPerCommonShareDetail</Role>
      <ShortName>Significant Accounting Policies - Basic and Diluted Earnings from Continuing Operations Per Common Share (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>995745 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleAdditionalInformationDetail</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>995755 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Preliminary Estimated Fair Values of Assets Acquired and Liabilities Assumed (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleSummaryOfPreliminaryEstimatedFairValuesOf</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Preliminary Estimated Fair Values of Assets Acquired and Liabilities Assumed (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>995765 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Preliminary Estimated Fair Values of Assets Acquired and Liabilities Assumed (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleSummaryOfPreliminaryEstimatedFairValuesOf1</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Preliminary Estimated Fair Values of Assets Acquired and Liabilities Assumed (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>995775 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Unaudited Pro Forma Financial Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleSummaryOfUnauditedProFormaFinancialInform</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Unaudited Pro Forma Financial Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>995785 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Discontinued Operations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleSummaryOfDiscontinuedOperationsDetail</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Discontinued Operations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>995805 - Disclosure - Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Assets and Liabilities held for Sale (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureBusinessCombinationsDivestituresDiscontinuedOperationsAndAssetsAndLiabilitiesHeldForSaleSummaryOfAssetsAndLiabilitiesHeldForSale</Role>
      <ShortName>Business Combinations, Divestitures, Discontinued Operations and Assets and Liabilities Held for Sale - Summary of Assets and Liabilities held for Sale (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>995835 - Disclosure - Goodwill and Other Intangible Assets - Changes in Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsChangesInGoodwillDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets - Changes in Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>995845 - Disclosure - Goodwill and Other Intangible Assets - Intangible Assets acquired (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsIntangibleAssetsAcquiredDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets - Intangible Assets acquired (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>995855 - Disclosure - Inventories, Net - Schedule of Inventories Net (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureInventoriesNetScheduleOfInventoriesNetDetail</Role>
      <ShortName>Inventories, Net - Schedule of Inventories Net (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>995865 - Disclosure - Debt - Long-Term Debt (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureDebtLongtermDebtDetail</Role>
      <ShortName>Debt - Long-Term Debt (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>995875 - Disclosure - Debt - Long-Term Debt (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureDebtLongtermDebtParentheticalDetail</Role>
      <ShortName>Debt - Long-Term Debt (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>995885 - Disclosure - Debt - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureDebtAdditionalInformationDetail</Role>
      <ShortName>Debt - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>995895 - Disclosure - Financial Instruments - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureFinancialInstrumentsAdditionalInformationDetail</Role>
      <ShortName>Financial Instruments - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>995905 - Disclosure - Income Taxes - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureIncomeTaxesAdditionalInformationDetail</Role>
      <ShortName>Income Taxes - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>995915 - Disclosure - Pension Benefits - Schedule of Components of Net Periodic Benefit Cost (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosurePensionBenefitsScheduleOfComponentsOfNetPeriodicBenefitCostDetail</Role>
      <ShortName>Pension Benefits - Schedule of Components of Net Periodic Benefit Cost (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>995925 - Disclosure - Commitments and Contingencies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesAdditionalInformationDetail</Role>
      <ShortName>Commitments and Contingencies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>995935 - Disclosure - Segments - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSegmentsAdditionalInformationDetail</Role>
      <ShortName>Segments - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>995945 - Disclosure - Segments - Schedule of Consolidated Earnings from Continuing Operations Before Income Tax Expense (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSegmentsScheduleOfConsolidatedEarningsFromContinuingOperationsBeforeIncomeTaxExpenseDetail</Role>
      <ShortName>Segments - Schedule of Consolidated Earnings from Continuing Operations Before Income Tax Expense (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>995955 - Disclosure - Segments - Financial Data for Continuing Operations for Company's Reportable Business Segments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSegmentsFinancialDataForContinuingOperationsForCompanysReportableBusinessSegmentsDetail</Role>
      <ShortName>Segments - Financial Data for Continuing Operations for Company's Reportable Business Segments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>995965 - Disclosure - Revenues and Gross Profit - Total Revenues and Gross Profit (Loss) by Product Line (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureRevenuesAndGrossProfitTotalRevenuesAndGrossProfitLossByProductLineDetail</Role>
      <ShortName>Revenues and Gross Profit - Total Revenues and Gross Profit (Loss) by Product Line (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>995975 - Disclosure - Revenues and Gross Profit - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureRevenuesAndGrossProfitAdditionalInformationDetail2</Role>
      <ShortName>Revenues and Gross Profit - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>995985 - Disclosure - Revenues and Gross Profit - Additional Information (Detail 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureRevenuesAndGrossProfitAdditionalInformationDetail1</Role>
      <ShortName>Revenues and Gross Profit - Additional Information (Detail 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>995995 - Disclosure - Supplemental Cash Flow Information - Schedule of Noncash Investing and Financing Activities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSupplementalCashFlowInformationScheduleOfNoncashInvestingAndFinancingActivitiesDetail</Role>
      <ShortName>Supplemental Cash Flow Information - Schedule of Noncash Investing and Financing Activities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>996005 - Disclosure - Supplemental Cash Flow Information - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSupplementalCashFlowInformationAdditionalInformationDetail</Role>
      <ShortName>Supplemental Cash Flow Information - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>996015 - Disclosure - Supplemental Cash Flow Information - Supplemental Disclosures of Cash Flow Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/Role_DisclosureSupplementalCashFlowInformationSupplementalDisclosuresOfCashFlowInformationDetail</Role>
      <ShortName>Supplemental Cash Flow Information - Supplemental Disclosures of Cash Flow Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="mlm-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>996025 - Disclosure - Subsequent Event - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://martinmarietta.com/20260331/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetail</Role>
      <ShortName>Subsequent Event - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="mlm-20260331.htm">mlm-20260331.htm</File>
    <File>mlm-20260331.xsd</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="689">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
