<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.20.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>249</ContextCount>
  <ElementCount>258</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>55</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001000 - 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-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001000 - 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-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1001001 - Statement - Consolidated Balance Sheets (Parentheticals)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedBalanceSheetsParentheticals</Role>
      <ShortName>Consolidated Balance Sheets (Parentheticals)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1003000 - Statement - Consolidated Statements Of Operations (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsOfOperationsUnaudited</Role>
      <ShortName>Consolidated Statements Of Operations (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1004000 - Statement - Consolidated Statements Of Comprehensive Income (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsOfComprehensiveIncomeUnaudited</Role>
      <ShortName>Consolidated Statements Of Comprehensive Income (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1006000 - Statement - Consolidated Statement of Shareholders' Equity (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementOfShareholdersEquityUnaudited</Role>
      <ShortName>Consolidated Statement of Shareholders' Equity (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1006001 - Statement - Consolidated Statements of Shareholders' Equity (Unaudited) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsOfShareholdersEquityUnauditedParenthetical</Role>
      <ShortName>Consolidated Statements of Shareholders' Equity (Unaudited) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>1007000 - Statement - Consolidated Statements of Cash Flows (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ConsolidatedStatementsOfCashFlowsUnaudited</Role>
      <ShortName>Consolidated Statements of Cash Flows (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2101100 - 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-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2102100 - 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-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2104100 - 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>11</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Contract Liabilities and Performance Obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ContractLiabilitiesAndPerformanceObligations</Role>
      <ShortName>Contract Liabilities and Performance Obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/FinancialInstruments</Role>
      <ShortName>Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2107100 - Disclosure - Long-Term Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LongTermDebt</Role>
      <ShortName>Long-Term Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2108100 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2110100 - 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>16</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2111100 - 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>17</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/SubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2201201 - 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>20</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2301302 - Disclosure - Description of Business and Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/DescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Description of Business and Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/DescriptionOfBusinessAndSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2304301 - 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>22</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Contract Liabilities and Performance Obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ContractLiabilitiesAndPerformanceObligationsTables</Role>
      <ShortName>Contract Liabilities and Performance Obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/ContractLiabilitiesAndPerformanceObligations</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2307301 - Disclosure - Long-Term Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LongTermDebtTables</Role>
      <ShortName>Long-Term Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cdw.com/role/LongTermDebt</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2310301 - 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>25</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2312301 - 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>26</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2401403 - 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/DescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2404402 - 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/InventoryFinancingAgreementsTables</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Contract Liabilities and Performance Obligations - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ContractLiabilitiesAndPerformanceObligationsNarrativeDetails</Role>
      <ShortName>Contract Liabilities and Performance Obligations - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cdw.com/role/ContractLiabilitiesAndPerformanceObligationsTables</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Contract Liabilities and Performance Obligations - Schedule of Remaining Performance Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/ContractLiabilitiesAndPerformanceObligationsScheduleOfRemainingPerformanceObligationsDetails</Role>
      <ShortName>Contract Liabilities and Performance Obligations - Schedule of Remaining Performance Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Financial Instruments - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/FinancialInstrumentsNarrativeDetails</Role>
      <ShortName>Financial Instruments - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2407402 - Disclosure - Long-Term Debt - Debt Balances and Interest Rates (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LongTermDebtDebtBalancesAndInterestRatesDetails</Role>
      <ShortName>Long-Term Debt - Debt Balances and Interest Rates (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2407403 - Disclosure - Long-Term Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LongTermDebtNarrativeDetails</Role>
      <ShortName>Long-Term Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2407404 - Disclosure - Long-Term Debt - Fair Value of Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cdw.com/role/LongTermDebtFairValueOfLongTermDebtDetails</Role>
      <ShortName>Long-Term Debt - Fair Value of Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2408401 - 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>35</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2410402 - 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>36</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2412402 - 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>37</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2412403 - 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>38</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2412404 - 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>39</Position>
    </Report>
    <Report instance="cdw-2020331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2413401 - 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>40</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="cdw-2020331x10q.htm">cdw-2020331x10q.htm</File>
    <File>cdw-20200331.xsd</File>
    <File>cdw-20200331_cal.xml</File>
    <File>cdw-20200331_def.xml</File>
    <File>cdw-20200331_lab.xml</File>
    <File>cdw-20200331_pre.xml</File>
    <File>cdw-2020331x10qxex101.htm</File>
    <File>cdw-2020331x10qxex102.htm</File>
    <File>cdw-2020331x10qxex221.htm</File>
    <File>cdw-2020331x10qxex311.htm</File>
    <File>cdw-2020331x10qxex312.htm</File>
    <File>cdw-2020331x10qxex321.htm</File>
    <File>cdw-2020331x10qxex322.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/srt/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/country/2017-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2019-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
