<?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-20261001.xsd" xlink:type="simple"/>
    <context id="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000898173</identifier>
        </entity>
        <period>
            <startDate>2026-10-01</startDate>
            <endDate>2026-10-01</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Tc_K2qMEIgc9UWF9XnWrIGc-Q_2_2">0000898173</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Tc_ihzTe7-Ik0W07nOhvRCpxg_3_2">false</dei:AmendmentFlag>
    <dei:EntityRegistrantName
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Hidden_07a_snyA-k21ibjMnkawXQ">O Reilly Automotive Inc</dei:EntityRegistrantName>
    <dei:DocumentType
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_nK9RtIz15kertBEZ_DXd_A">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_IhcXIbpne0GZHt6Lnz1YCw">2026-10-01</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Tc_DGok0t83KUmnSQDdlEQ0JA_1_0">MO</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Tc_rd9480XXpUC9MpNlKSA2_g_1_2">000-21318</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Tc_rfLa-ydOJk-8nTUtruTuiA_1_4">27-4358837</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_m2bKFP_iiUmYsfcrcaVvlQ">233 South Patterson Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_mPi_pLjfBE-8HaTCOJr3_A">Springfield</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_mtHRbdQ9AES70GIrpq4cqQ">MO</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_Oc7z-VLgzkyv5Jp5Yvacaw">65802</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_3vChFZ4430CLIPwkL0proA">417</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_DiEYkAp5OUKuVooIAFjHFg">862-6708</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_kKCvGFRJ4kKQTFSf3zvyRg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_AW_q_nPLWUaOX980x0TnJg">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_F7CMYo3FbUikUUHpQ1MC3A">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_w5wLjPLZrEWSGbgJ2rbvqA">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_JhcoE7hyUUG9L4j8GNHuWg">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Tc_M1gNvT73tk-AudMHuPPyYQ_2_2">ORLY</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Tc_CTXc_hEUR0m8ryOYMDfARg_2_4">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_10_1_2026_To_10_1_2026_MA7zPpIfd0WT8P_4vWbdbA"
      id="Narr_GGLNjXzMJU2oyR8AdCI-Ng">false</dei:EntityEmergingGrowthCompany>
</xbrl>
