<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="orly-20260601.xsd" xlink:type="simple"/>
    <context id="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000898173</identifier>
        </entity>
        <period>
            <startDate>2026-06-01</startDate>
            <endDate>2026-06-01</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Tc_Tt4QzHrjr0-mQof4c7043Q_2_2">0000898173</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Tc_8Vyn5MBTJkeFn1U98VNa9Q_3_2">false</dei:AmendmentFlag>
    <dei:EntityRegistrantName
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Hidden_7PFZOBPa2E6bRelP67XMDQ">O Reilly Automotive Inc</dei:EntityRegistrantName>
    <dei:DocumentType
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_3LamCfGQUUGuqliG85Y0-Q">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_FwximOCy5EWMQfaIXEb_vA">2026-06-01</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Tc_GXMA3w9m_0qIbhBnKySKOw_1_0">MO</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Tc_byurNnblPkemsP1SxdI6YQ_1_2">000-21318</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Tc_CGxuTosb1kq_rIirqR6Yug_1_4">27-4358837</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_4CHXOvKbXkyBKW6LsO_hmw">233 South Patterson Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_01XQbOH8bU6J1DaFS2BZyQ">Springfield</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_D0ZPSrKOzUGBHRGNQ5BT3w">MO</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_CCcgkmABwECLb5XUnMojrg">65802</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_BI502gdC0Ee3n_XUkbfMHA">417</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_sHKKhJkzaEqhsti7qRPv5Q">862-6708</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_hWuWXu9xgEC1eTkKEceHLg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_wVGG1NDrhUKOoBn7G3k_YA">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_676nSdg2SkqPBQDM3e9A9g">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_NHAhicGy8EC33pFQIw-haA">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_J7Eg6j1dt0aHSEqHhxQzVA">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Tc_pWfUUGTm0E-0WK5u3oVDLw_2_2">ORLY</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Tc_9H7bOIykmU2qgBvYprLo1g_2_4">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_6_1_2026_To_6_1_2026_J8W7O_PnXk6PiHjUWzw1Vg"
      id="Narr_R9xy9yhlRUGya-wXmkDcjw">false</dei:EntityEmergingGrowthCompany>
</xbrl>
