<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>473</ContextCount>
  <ElementCount>427</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>85</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="cdw-20251231.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-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.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>3</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.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>4</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.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>5</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.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>6</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.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>7</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.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>8</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952157 - Statement - Consolidated Statements of Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsofStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.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>10</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.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>11</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.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>12</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.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>13</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Property and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/PropertyandEquipment</Role>
      <ShortName>Property and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/GoodwillandOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952164 - 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>16</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952166 - 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>18</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/StockholdersEquity</Role>
      <ShortName>Stockholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Equity-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensation</Role>
      <ShortName>Equity-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9952171 - 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>23</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9952172 - Disclosure - Coworker Retirement and Other Compensation Benefits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/CoworkerRetirementandOtherCompensationBenefits</Role>
      <ShortName>Coworker Retirement and Other Compensation Benefits</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9952173 - 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>25</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9952174 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9952175 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.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>28</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995447 - Disclosure - Insider Trading Policies and Procedures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingPoliciesProc</Role>
      <ShortName>Insider Trading Policies and Procedures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995550 - Disclosure - Cybersecurity Risk Management and Strategy Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/cyd/role/CybersecurityRiskManagementAndStrategyDisclosure</Role>
      <ShortName>Cybersecurity Risk Management and Strategy Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.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>31</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.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>32</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Property and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/PropertyandEquipmentTables</Role>
      <ShortName>Property and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/PropertyandEquipment</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/GoodwillandOtherIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/GoodwillandOtherIntangibleAssets</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Inventory Financing Agreements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/InventoryFinancingAgreementsTables</Role>
      <ShortName>Inventory Financing Agreements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/InventoryFinancingAgreements</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955516 - 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>36</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/IncomeTaxes</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/Leases</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Equity-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensationTables</Role>
      <ShortName>Equity-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/EquityBasedCompensation</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955520 - 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>40</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955521 - 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>41</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesNarrativeDetails</Role>
      <ShortName>Description of Business and Summary of Significant Accounting Policies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesPolicies</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955523 - 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>43</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Accounts Receivable and Contract Balances - Accounts Receivable (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesAccountsReceivableDetails</Role>
      <ShortName>Accounts Receivable and Contract Balances - Accounts Receivable (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955525 - 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>45</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Accounts Receivable and Contract Balances - Allowance for Credit Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesAllowanceforCreditLossesDetails</Role>
      <ShortName>Accounts Receivable and Contract Balances - Allowance for Credit Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Accounts Receivable and Contract Balances - Schedule of Contract Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/AccountsReceivableandContractBalancesScheduleofContractAssetsandLiabilitiesDetails</Role>
      <ShortName>Accounts Receivable and Contract Balances - Schedule of Contract Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955528 - 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>48</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Property and Equipment - Schedule of Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/PropertyandEquipmentScheduleofPropertyandEquipmentDetails</Role>
      <ShortName>Property and Equipment - Schedule of Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Property and Equipment - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/PropertyandEquipmentNarrativeDetails</Role>
      <ShortName>Property and Equipment - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Goodwill and Other Intangible Assets - Schedule of Goodwill by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/GoodwillandOtherIntangibleAssetsScheduleofGoodwillbySegmentDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets - Schedule of Goodwill by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Goodwill and Other Intangible Assets - Intangible Assets by Asset Type (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/GoodwillandOtherIntangibleAssetsIntangibleAssetsbyAssetTypeDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets - Intangible Assets by Asset Type (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Goodwill and Other Intangible Assets - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/GoodwillandOtherIntangibleAssetsNarrativeDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Goodwill and Other Intangible Assets - Amortization of Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/GoodwillandOtherIntangibleAssetsAmortizationofIntangibleAssetsDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets - Amortization of Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Inventory Financing Agreements - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/InventoryFinancingAgreementsNarrativeDetails</Role>
      <ShortName>Inventory Financing Agreements - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Inventory Financing Agreements - Schedule of Inventory Financing Agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/InventoryFinancingAgreementsScheduleofInventoryFinancingAgreementsDetails</Role>
      <ShortName>Inventory Financing Agreements - Schedule of Inventory Financing Agreements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Debt - Debt Balances and Interest Rates (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DebtDebtBalancesandInterestRatesDetails</Role>
      <ShortName>Debt - Debt Balances and Interest Rates (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955538 - 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>58</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Debt - Long-Term Debt Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DebtLongTermDebtMaturitiesDetails</Role>
      <ShortName>Debt - Long-Term Debt Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Debt - Fair Value of Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DebtFairValueofLongTermDebtDetails</Role>
      <ShortName>Debt - Fair Value of Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955541 - 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>61</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Income Taxes - Income Before Income Tax (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesIncomeBeforeIncomeTaxDetails</Role>
      <ShortName>Income Taxes - Income Before Income Tax (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Income Taxes - Income Tax Expense by Component (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesIncomeTaxExpensebyComponentDetails</Role>
      <ShortName>Income Taxes - Income Tax Expense by Component (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Income Taxes - Effective Tax Rate Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesEffectiveTaxRateReconciliationDetails</Role>
      <ShortName>Income Taxes - Effective Tax Rate Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Income Taxes - Income Taxes Paid, Net Of Refunds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesIncomeTaxesPaidNetOfRefundsDetails</Role>
      <ShortName>Income Taxes - Income Taxes Paid, Net Of Refunds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Income Taxes - Deferred Tax Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesDeferredTaxAssetsandLiabilitiesDetails</Role>
      <ShortName>Income Taxes - Deferred Tax Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Income Taxes - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Income Taxes - Unrecognized Tax Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxesUnrecognizedTaxBenefitsDetails</Role>
      <ShortName>Income Taxes - Unrecognized Tax Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Leases - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LeasesNarrativeDetails</Role>
      <ShortName>Leases - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Leases - Supplemental Consolidated Balance Sheet information Related Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LeasesSupplementalConsolidatedBalanceSheetinformationRelatedOperatingLeasesDetails</Role>
      <ShortName>Leases - Supplemental Consolidated Balance Sheet information Related Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Leases - Maturities of Operating Lease Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LeasesMaturitiesofOperatingLeaseLiabilitiesDetails</Role>
      <ShortName>Leases - Maturities of Operating Lease Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Leases - Supplemental Cash Flow Information Related to Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LeasesSupplementalCashFlowInformationRelatedtoOperatingLeasesDetails</Role>
      <ShortName>Leases - Supplemental Cash Flow Information Related to Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Stockholders' Equity - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/StockholdersEquityNarrativeDetails</Role>
      <ShortName>Stockholders' Equity - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Equity-Based Compensation - Schedule of Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensationScheduleofCompensationExpenseDetails</Role>
      <ShortName>Equity-Based Compensation - Schedule of Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Equity-Based Compensation - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensationNarrativeDetails</Role>
      <ShortName>Equity-Based Compensation - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Equity-Based Compensation - Fair Value Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensationFairValueAssumptionsDetails</Role>
      <ShortName>Equity-Based Compensation - Fair Value Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Equity-Based Compensation - Option Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensationOptionActivityDetails</Role>
      <ShortName>Equity-Based Compensation - Option Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9955558 - Disclosure - Equity-Based Compensation - Restricted Stock Unit Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensationRestrictedStockUnitActivityDetails</Role>
      <ShortName>Equity-Based Compensation - Restricted Stock Unit Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9955559 - Disclosure - Equity-Based Compensation - Performance Share Unit Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/EquityBasedCompensationPerformanceShareUnitActivityDetails</Role>
      <ShortName>Equity-Based Compensation - Performance Share Unit Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9955560 - 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>80</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9955561 - Disclosure - Coworker Retirement and Other Compensation Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/CoworkerRetirementandOtherCompensationBenefitsDetails</Role>
      <ShortName>Coworker Retirement and Other Compensation Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/CoworkerRetirementandOtherCompensationBenefits</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9955562 - 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>82</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9955563 - 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>83</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9955564 - Disclosure - Segment Information - Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformationDisaggregationofRevenueDetails</Role>
      <ShortName>Segment Information - Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9955565 - Disclosure - Segment Information - Products and Services (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformationProductsandServicesDetails</Role>
      <ShortName>Segment Information - Products and Services (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="cdw-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9955566 - Disclosure - Subsequent Events (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SubsequentEventsDetails</Role>
      <ShortName>Subsequent Events (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/SubsequentEvents</ParentRole>
      <Position>86</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-K" isDefinitelyFs="true" isUsgaap="true" original="cdw-20251231.htm">cdw-20251231.htm</File>
    <File>cdw-20251231.xsd</File>
    <File>cdw-20251231_cal.xml</File>
    <File>cdw-20251231_def.xml</File>
    <File>cdw-20251231_lab.xml</File>
    <File>cdw-20251231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>cdw-20251231_g1.jpg</File>
    <File>cdw-20251231_g2.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1324">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="15">http://xbrl.sec.gov/cyd/2025</BaseTaxonomy>
    <BaseTaxonomy items="38">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="5">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
