<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.3</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>455</ContextCount>
  <ElementCount>199</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>51</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>9952151 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952152 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952153 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsofOperations</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952154 - Statement - Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsofComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952155 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952156 - Statement - Consolidated Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsofStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952157 - Statement - Consolidated Statements of Shareholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsofShareholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Shareholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Description of Business and Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPolicies</Role>
      <ShortName>Description of Business and Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/RecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/Acquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Accounts Receivable and Contract Balances</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalances</Role>
      <ShortName>Accounts Receivable and Contract Balances</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Inventory Financing Agreements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/InventoryFinancingAgreements</Role>
      <ShortName>Inventory Financing Agreements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Fair Value Measurements and Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/FairValueMeasurementsandFinancialInstruments</Role>
      <ShortName>Fair Value Measurements and Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EarningsPerShare</Role>
      <ShortName>Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Description of Business and Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Description of Business and Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.cdw.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPolicies</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Accounts Receivable and Contract Balances (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesTables</Role>
      <ShortName>Accounts Receivable and Contract Balances (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/AccountsReceivableandContractBalances</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/Debt</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EarningsPerShareTables</Role>
      <ShortName>Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/EarningsPerShare</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformationTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/SegmentInformation</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Description of Business and Summary of Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesDetails</Role>
      <ShortName>Description of Business and Summary of Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesPolicies</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Acquisitions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AcquisitionsDetails</Role>
      <ShortName>Acquisitions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/Acquisitions</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Accounts Receivable and Contract Balances - Schedule of Accounts Receivable (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesScheduleofAccountsReceivableDetails</Role>
      <ShortName>Accounts Receivable and Contract Balances - Schedule of Accounts Receivable (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Accounts Receivable and Contract Balances - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesNarrativeDetails</Role>
      <ShortName>Accounts Receivable and Contract Balances - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Accounts Receivable and Contract Balances - Schedule of Contract with Customer (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesScheduleofContractwithCustomerDetails</Role>
      <ShortName>Accounts Receivable and Contract Balances - Schedule of Contract with Customer (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Accounts Receivable and Contract Balances - Schedule of Remaining Performance Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesScheduleofRemainingPerformanceObligationsDetails</Role>
      <ShortName>Accounts Receivable and Contract Balances - Schedule of Remaining Performance Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Inventory Financing Agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/InventoryFinancingAgreementsDetails</Role>
      <ShortName>Inventory Financing Agreements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/InventoryFinancingAgreements</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Debt - Schedule of Long-term Debt Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DebtScheduleofLongtermDebtInstrumentsDetails</Role>
      <ShortName>Debt - Schedule of Long-term Debt Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DebtNarrativeDetails</Role>
      <ShortName>Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Debt - Schedule of Carrying Value of Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DebtScheduleofCarryingValueofLongTermDebtDetails</Role>
      <ShortName>Debt - Schedule of Carrying Value of Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Fair Value Measurements and Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/FairValueMeasurementsandFinancialInstrumentsDetails</Role>
      <ShortName>Fair Value Measurements and Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/FairValueMeasurementsandFinancialInstruments</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/IncomeTaxes</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Earnings Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EarningsPerShareDetails</Role>
      <ShortName>Earnings Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/EarningsPerShareTables</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Segment Information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformationNarrativeDetails</Role>
      <ShortName>Segment Information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Segment Information - Schedule of Segment Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformationScheduleofSegmentInformationDetails</Role>
      <ShortName>Segment Information - Schedule of Segment Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Segment Information - Schedule of Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformationScheduleofDisaggregationofRevenueDetails</Role>
      <ShortName>Segment Information - Schedule of Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="cdw-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Segment Information - Schedule of Products and Services (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformationScheduleofProductsandServicesDetails</Role>
      <ShortName>Segment Information - Schedule of Products and Services (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</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" isDefinitelyFs="true" isUsgaap="true" original="cdw-20250930.htm">cdw-20250930.htm</File>
    <File>cdw-20250930.xsd</File>
    <File>cdw-20250930_cal.xml</File>
    <File>cdw-20250930_def.xml</File>
    <File>cdw-20250930_lab.xml</File>
    <File>cdw-20250930_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>cdw-20250930_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1056">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
