<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.20.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>105</ContextCount>
  <ElementCount>302</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>42</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>5</UnitCount>
  <MyReports>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - Condensed Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/StatementCondensedConsolidatedBalanceSheets</Role>
      <ShortName>Condensed Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - Condensed Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/StatementCondensedConsolidatedStatementsOfIncome</Role>
      <ShortName>Condensed Consolidated Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00300 - Statement - Condensed Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/StatementCondensedConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00400 - Statement - Condensed Consolidated Statements of Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/StatementCondensedConsolidatedStatementsOfShareholdersEquity</Role>
      <ShortName>Condensed Consolidated Statements of Shareholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00500 - Statement - Condensed Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/StatementCondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureBasisOfPresentation</Role>
      <ShortName>Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Business Combination</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureBusinessCombination</Role>
      <ShortName>Business Combination</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Allowance for Doubtful Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureAllowanceForDoubtfulAccounts</Role>
      <ShortName>Allowance for Doubtful Accounts</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureLeases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Financing</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFinancing</Role>
      <ShortName>Financing</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Warranties</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureWarranties</Role>
      <ShortName>Warranties</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Share Repurchase Program</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareRepurchaseProgram</Role>
      <ShortName>Share Repurchase Program</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>10901 - Disclosure - Accumulated Other Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureAccumulatedOtherComprehensiveIncomeLoss</Role>
      <ShortName>Accumulated Other Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureRevenue</Role>
      <ShortName>Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>11101 - Disclosure - Share-Based Compensation and Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlans</Role>
      <ShortName>Share-Based Compensation and Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>11201 - Disclosure - Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureEarningsPerShare</Role>
      <ShortName>Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>11301 - Disclosure - Legal Matters</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureLegalMatters</Role>
      <ShortName>Legal Matters</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>11401 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureRecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>20101 - Disclosure - Basis of Presentation (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureBasisOfPresentationPolicies</Role>
      <ShortName>Basis of Presentation (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>20301 - Disclosure - Fair Value Measurements (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsPolicies</Role>
      <ShortName>Fair Value Measurements (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>20402 - Disclosure - Allowance For Doubtful Accounts (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureAllowanceForDoubtfulAccountsPolicies</Role>
      <ShortName>Allowance For Doubtful Accounts (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>20703 - Disclosure - Warranties (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureWarrantiesPolicies</Role>
      <ShortName>Warranties (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>21404 - Disclosure - Recent Accounting Pronouncements (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureRecentAccountingPronouncementsPolicies</Role>
      <ShortName>Recent Accounting Pronouncements (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>30303 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFairValueMeasurements</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>30403 - Disclosure - Allowance For Doubtful Accounts (Loss) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureAllowanceForDoubtfulAccountsLossTables</Role>
      <ShortName>Allowance For Doubtful Accounts (Loss) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureLeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureLeases</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>30603 - Disclosure - Financing (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFinancingTables</Role>
      <ShortName>Financing (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFinancing</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>30703 - Disclosure - Warranties (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureWarrantiesTables</Role>
      <ShortName>Warranties (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureWarranties</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>30803 - Disclosure - Share Repurchase Program (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareRepurchaseProgramTables</Role>
      <ShortName>Share Repurchase Program (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareRepurchaseProgram</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>30903 - Disclosure - Accumulated Other Comprehensive Income (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureAccumulatedOtherComprehensiveIncomeTables</Role>
      <ShortName>Accumulated Other Comprehensive Income (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureAccumulatedOtherComprehensiveIncomeLoss</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>31003 - Disclosure - Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureRevenueTables</Role>
      <ShortName>Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRevenue</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>31103 - Disclosure - Share-Based Compensation and Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlans</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>31203 - Disclosure - Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureEarningsPerShareTables</Role>
      <ShortName>Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureEarningsPerShare</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Basis of Presentation (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureBasisOfPresentationNarrativeDetails</Role>
      <ShortName>Basis of Presentation (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureBasisOfPresentationPolicies</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>40201 - Disclosure - Business Combination (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureBusinessCombinationNarrativeDetails</Role>
      <ShortName>Business Combination (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureBusinessCombination</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Fair Value Measurements (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsNarrativeDetails</Role>
      <ShortName>Fair Value Measurements (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>40302 - Disclosure - Fair Value Measurements (Fair Value of Marketable Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsFairValueOfMarketableSecuritiesDetails</Role>
      <ShortName>Fair Value Measurements (Fair Value of Marketable Securities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>40303 - Disclosure - Fair Value Measurements (Fair Value of Senior Notes) (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsFairValueOfSeniorNotesDetails</Role>
      <ShortName>Fair Value Measurements (Fair Value of Senior Notes) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Allowance for Doubtful Accounts (Changes in Allowance for Doubtful Accounts) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureAllowanceForDoubtfulAccountsChangesInAllowanceForDoubtfulAccountsDetails</Role>
      <ShortName>Allowance for Doubtful Accounts (Changes in Allowance for Doubtful Accounts) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureAllowanceForDoubtfulAccounts</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Leases (Summary of Total Lease Cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureLeasesSummaryOfTotalLeaseCostDetails</Role>
      <ShortName>Leases (Summary of Total Lease Cost) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureLeasesTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>40502 - Disclosure - Leases (Supplemental Cash Flow Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureLeasesSupplementalCashFlowInformationDetails</Role>
      <ShortName>Leases (Supplemental Cash Flow Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureLeasesTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Financing (Unsecured Revolving Credit Facility) (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFinancingUnsecuredRevolvingCreditFacilityNarrativeDetails</Role>
      <ShortName>Financing (Unsecured Revolving Credit Facility) (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFinancingTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>40602 - Disclosure - Financing (Senior Notes) (Narrative) (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFinancingSeniorNotesNarrativeDetails</Role>
      <ShortName>Financing (Senior Notes) (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFinancingTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>40603 - Disclosure - Financing (Outstanding Financing Facilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureFinancingOutstandingFinancingFacilitiesDetails</Role>
      <ShortName>Financing (Outstanding Financing Facilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureFinancingTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Warranties (Product Warranty Liabilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureWarrantiesProductWarrantyLiabilitiesDetails</Role>
      <ShortName>Warranties (Product Warranty Liabilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureWarrantiesTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Share Repurchase Program (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareRepurchaseProgramNarrativeDetails</Role>
      <ShortName>Share Repurchase Program (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareRepurchaseProgramTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Share Repurchase Program (Schedule of Shares Repurchased) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareRepurchaseProgramScheduleOfSharesRepurchasedDetails</Role>
      <ShortName>Share Repurchase Program (Schedule of Shares Repurchased) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareRepurchaseProgramTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>40901 - Disclosure - Accumulated Other Comprehensive Income (Loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureAccumulatedOtherComprehensiveIncomeLossDetails</Role>
      <ShortName>Accumulated Other Comprehensive Income (Loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureAccumulatedOtherComprehensiveIncomeTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>41001 - Disclosure - Revenue (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureRevenueNarrativeDetails</Role>
      <ShortName>Revenue (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRevenueTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>41002 - Disclosure - Revenue (Disaggregation of Revenue) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureRevenueDisaggregationOfRevenueDetails</Role>
      <ShortName>Revenue (Disaggregation of Revenue) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureRevenueTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>41101 - Disclosure - Share-Based Compensation and Benefit Plans (Stock Option) (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansStockOptionNarrativeDetails</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Stock Option) (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>41103 - Disclosure - Share-Based Compensation and Benefit Plans (Profit Sharing and Savings Plan) (Narrative) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansProfitSharingAndSavingsPlanNarrativeDetail</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Profit Sharing and Savings Plan) (Narrative) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>41104 - Disclosure - Share-Based Compensation and Benefit Plans (Nonqualified Deferred Compensation Plan) (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansNonqualifiedDeferredCompensationPlanNarrativeDetails</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Nonqualified Deferred Compensation Plan) (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>41105 - Disclosure - Share-Based Compensation and Benefit Plans (Stock Appreciation Rights) (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansStockAppreciationRightsNarrativeDetails</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Stock Appreciation Rights) (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>41106 - Disclosure - Share-Based Compensation and Benefit Plans (Summary of Stock Options) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansSummaryOfStockOptionsDetails</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Summary of Stock Options) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>41107 - Disclosure - Share-Based Compensation and Benefit Plans (Black-Scholes Option Pricing Model) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansBlackScholesOptionPricingModelDetails</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Black-Scholes Option Pricing Model) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>41108 - Disclosure - Share-Based Compensation and Benefit Plans (Stock Option Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansStockOptionActivityDetails</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Stock Option Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>41109 - Disclosure - Share-Based Compensation and Benefit Plans (Other Share-Based Compensation Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansOtherShareBasedCompensationActivityDetails</Role>
      <ShortName>Share-Based Compensation and Benefit Plans (Other Share-Based Compensation Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureShareBasedCompensationAndBenefitPlansTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="orly-20200331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>41201 - Disclosure - Earnings Per Share (Computation of Basic and Diluted Earnings Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oreillyauto.com/role/DisclosureEarningsPerShareComputationOfBasicAndDilutedEarningsPerShareDetails</Role>
      <ShortName>Earnings Per Share (Computation of Basic and Diluted Earnings Per Share) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oreillyauto.com/role/DisclosureEarningsPerShareTables</ParentRole>
      <Position>62</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" original="orly-20200331x10q.htm">orly-20200331x10q.htm</File>
    <File>orly-20200331.xsd</File>
    <File>orly-20200331_cal.xml</File>
    <File>orly-20200331_def.xml</File>
    <File>orly-20200331_lab.xml</File>
    <File>orly-20200331_pre.xml</File>
    <File>orly-20200331ex3116780f8.htm</File>
    <File>orly-20200331ex3123dd2e2.htm</File>
    <File>orly-20200331ex32103c808.htm</File>
    <File>orly-20200331ex322ef2b5e.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/us-gaap/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2019-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
