<?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-20260701.xsd" xlink:type="simple"/>
    <context id="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000898173</identifier>
        </entity>
        <period>
            <startDate>2026-07-01</startDate>
            <endDate>2026-07-01</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Tc_AFlG3BtKkUeyRtROh86EpA_2_2">0000898173</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Tc_qip7txlMf0CkjzEsqBLNsw_3_2">false</dei:AmendmentFlag>
    <dei:EntityRegistrantName
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Hidden_0ytcR1JwbkqFRu9iqEQYfg">O Reilly Automotive Inc</dei:EntityRegistrantName>
    <dei:DocumentType
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_LWAhPNYqa0O9DeTGBaRCbQ">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_Ge0zAMtXJ0Gy2pDBLdeP6A">2026-07-01</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Tc_ezieJjyXnUKFLyGmQK-YSg_1_0">MO</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Tc_gpB5LK_tJU6Yb_xlZmIoig_1_2">000-21318</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Tc_3YAaFnSY50ySsfCIKo0WcA_1_4">27-4358837</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_qqxHuPrFmUm-v0lpBJ80Zw">233 South Patterson Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_DOCFDA3n4kKkJC-8f6XmVg">Springfield</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr__s5R0SLaNEqX3iNjfuy4EQ">MO</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_I1M81B0LnkObCNaE0aK1Zg">65802</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_N2QThEEP_UiIEMFNGJXKnQ">417</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_g-wnUmMO9UqfpqBCpaaLoA">862-6708</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_NpmT1F38dUuDn6b-b8fKXg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_wHm-6efM906_MiUHf2OSYQ">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_7kp1uPnSJ0SBHWyVvaicZQ">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_8WaQXutrYk6Hao-cMxY20A">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_hV7Bp3iW9EStvhUaWQnraw">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Tc_XCppUPeu2kWuYc8qCLPnfw_2_2">ORLY</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Tc_P8CQMnYc6U6eaIed8Kawfw_2_4">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_7_1_2026_To_7_1_2026_NP-BeydWb0CiztLarWVKsA"
      id="Narr_nQsfuYRY3UKTu3STtesUkg">false</dei:EntityEmergingGrowthCompany>
</xbrl>
