<?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="orly-20260514.xsd" xlink:type="simple"/>
    <context id="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000898173</identifier>
        </entity>
        <period>
            <startDate>2026-05-14</startDate>
            <endDate>2026-05-14</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Tc_yShQtfaoCkqjt9qPX6qW0w_2_2">0000898173</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Tc_PTUrEU5g9U2b2mQFfb_Mdg_3_2">false</dei:AmendmentFlag>
    <dei:EntityRegistrantName
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Hidden__qC388Pln0G1aRxPF9pOrQ">O Reilly Automotive Inc</dei:EntityRegistrantName>
    <dei:DocumentType
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_fy9MTsct4UKogSR3wsKrDg">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_LK7VnX7p6UiGHlMLkVPLcw">2026-05-14</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Tc_wi5cHmMYHEG8uvKdt-ESkQ_1_0">MO</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Tc_c6i1OzfuqUa60HofnCabpA_1_2">000-21318</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Tc_zEeirZpjFUygpa8n5BLnsA_1_4">27-4358837</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_jiYI9nBVKUyTd6UNIVaCGw">233 South Patterson Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr__XdQg6omzkmCFk_kJYvxeA">Springfield</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_RjuhaP42hkKlnFktXkKpsw">MO</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_wIOv5hPtYUSKufqjlfj9Ow">65802</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_124AEPvvpk6j8QNbbRN1Rg">417</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_PZl6U6wXT0yJc_y4nCHjkQ">862-6708</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_9sDWabQv9U-rls7UpoDxgw">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_sGbf7rPBlUmxF8oO1ZMzsg">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_U78z_3bcFkeckUnzL6Gbog">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_03sGtL63AU2Tg5GYUVq6Dw">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_GS1vkFE61k2f7hwVb-S-vQ">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Tc_b3bgEyKU6EiGeBKfRTG5eQ_2_2">ORLY</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Tc_8Yo9gX1IDk2y6bk4FiViOA_2_4">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_5_14_2026_To_5_14_2026_7eTU1SaVYU2SJLb3-5XXDw"
      id="Narr_SE9rX1rvWEWHlvt9gISdHg">false</dei:EntityEmergingGrowthCompany>
</xbrl>
