<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.10.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>270</ContextCount>
  <ElementCount>358</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>105</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>12</UnitCount>
  <MyReports>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001000 - Statement - Condensed Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedBalanceSheets</Role>
      <ShortName>Condensed Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1001501 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1002000 - Statement - Condensed Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfOperations</Role>
      <ShortName>Condensed Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1003000 - Statement - Condensed Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1003501 - Statement - Condensed Consolidated Statements of Comprehensive Income (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfComprehensiveIncomeParenthetical</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1004000 - Statement - Condensed Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>2101100 - Disclosure - Business and Organization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/BusinessAndOrganization</Role>
      <ShortName>Business and Organization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2102100 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2103100 - Disclosure - New Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/NewAccountingPronouncements</Role>
      <ShortName>New Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2104100 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/Acquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Per Share Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformation</Role>
      <ShortName>Per Share Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2107100 - Disclosure - Debt Obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligations</Role>
      <ShortName>Debt Obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2108100 - Disclosure - Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/Equity</Role>
      <ShortName>Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2109100 - Disclosure - Equity-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensation</Role>
      <ShortName>Equity-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2110100 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2111100 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - Supplemental Cash Flow Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformation</Role>
      <ShortName>Supplemental Cash Flow Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Subsequent Event</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SubsequentEvent</Role>
      <ShortName>Subsequent Event</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2202201 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2302302 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2304301 - Disclosure - Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsTables</Role>
      <ShortName>Acquisitions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/Acquisitions</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssets</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2306301 - Disclosure - Per Share Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformationTables</Role>
      <ShortName>Per Share Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/PerShareInformation</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2307301 - Disclosure - Debt Obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsTables</Role>
      <ShortName>Debt Obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/DebtObligations</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2309301 - Disclosure - Equity-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationTables</Role>
      <ShortName>Equity-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/EquityBasedCompensation</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2310301 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/CommitmentsAndContingencies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2311301 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformationTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SegmentInformation</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2312301 - Disclosure - Supplemental Cash Flow Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationTables</Role>
      <ShortName>Supplemental Cash Flow Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SupplementalCashFlowInformation</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2401401 - Disclosure - Business and Organization (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/BusinessAndOrganizationDetail</Role>
      <ShortName>Business and Organization (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/BusinessAndOrganization</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2402403 - Disclosure - Summary of Significant Accounting Policies - Cash and Cash Equivalents (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesCashAndCashEquivalentsDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Cash and Cash Equivalents (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2402404 - Disclosure - Summary of Significant Accounting Policies - Current and Long-Term Accounts Receivable and Notes Receivable and Allowance for Doubtful Accounts (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesCurrentAndLongTermAccountsReceivableAndNotesReceivableAndAllowanceForDoubtfulAccountsDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Current and Long-Term Accounts Receivable and Notes Receivable and Allowance for Doubtful Accounts (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2402405 - Disclosure - Summary of Significant Accounting Policies - Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesGoodwillDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2402406 - Disclosure - Summary of Significant Accounting Policies - Significant Estimates Used by Management in Determining Fair Values of Customer Relationships Acquired (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesSignificantEstimatesUsedByManagementInDeterminingFairValuesOfCustomerRelationshipsAcquiredDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Significant Estimates Used by Management in Determining Fair Values of Customer Relationships Acquired (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2402407 - Disclosure - Summary of Significant Accounting Policies - Other Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesOtherIntangibleAssetsDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Other Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2402408 - Disclosure - Summary of Significant Accounting Policies - Investments in Affiliates and Other Entities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesInvestmentsInAffiliatesAndOtherEntitiesDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Investments in Affiliates and Other Entities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2402409 - Disclosure - Summary of Significant Accounting Policies - Revenue Recognition (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesRevenueRecognitionDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Revenue Recognition (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2402410 - Disclosure - Summary of Significant Accounting Policies - Performance Obligation (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesPerformanceObligationDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Performance Obligation (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2402411 - Disclosure - Summary of Significant Accounting Policies - Revenue Disaggregated by Geographic Location and Contract Type (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesRevenueDisaggregatedByGeographicLocationAndContractTypeDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Revenue Disaggregated by Geographic Location and Contract Type (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2402412 - Disclosure - Summary of Significant Accounting Policies - Contract Assets and Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesContractAssetsAndLiabilitiesDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Contract Assets and Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2402413 - Disclosure - Summary of Significant Accounting Policies - Income Taxes (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesIncomeTaxesDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Income Taxes (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2402414 - Disclosure - Summary of Significant Accounting Policies - Earnings Per Share (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesEarningsPerShareDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Earnings Per Share (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2402415 - Disclosure - Summary of Significant Accounting Policies - Insurance (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesInsuranceDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Insurance (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2402416 - Disclosure - Summary of Significant Accounting Policies - Stock-Based Compensation (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesStockBasedCompensationDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Stock-Based Compensation (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2402417 - Disclosure - Summary of Significant Accounting Policies - Fair Value Measurements (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesFairValueMeasurementsDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Fair Value Measurements (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2403401 - Disclosure - New Accounting Pronouncements (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/NewAccountingPronouncementsDetail</Role>
      <ShortName>New Accounting Pronouncements (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/NewAccountingPronouncements</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2404402 - Disclosure - Acquisitions (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsDetail</Role>
      <ShortName>Acquisitions (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/AcquisitionsTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2404403 - Disclosure - Acquisitions - Aggregate Consideration Paid or Payable and Allocation Net Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsAggregateConsiderationPaidOrPayableAndAllocationNetAssetsDetail</Role>
      <ShortName>Acquisitions - Aggregate Consideration Paid or Payable and Allocation Net Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2404404 - Disclosure - Acquisitions - Estimated Fair Values of Identifiable Intangible Assets and Related Weighted Average Amortization (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsEstimatedFairValuesOfIdentifiableIntangibleAssetsAndRelatedWeightedAverageAmortizationDetail</Role>
      <ShortName>Acquisitions - Estimated Fair Values of Identifiable Intangible Assets and Related Weighted Average Amortization (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2404405 - Disclosure - Acquisitions - Unaudited Supplemental Pro Forma Results of Operations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsUnauditedSupplementalProFormaResultsOfOperationsDetail</Role>
      <ShortName>Acquisitions - Unaudited Supplemental Pro Forma Results of Operations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Goodwill and Other Intangible Assets - Summary of Changes in Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsSummaryOfChangesInGoodwillDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets - Summary of Changes in Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Goodwill and Other Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2405404 - Disclosure - Goodwill and Other Intangible Assets - Other Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsOtherIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets - Other Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2405405 - Disclosure - Goodwill and Other Intangible Assets - Estimated Future Aggregate Amortization Expense of Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsEstimatedFutureAggregateAmortizationExpenseOfIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets - Estimated Future Aggregate Amortization Expense of Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Per Share Information - Basic and Diluted Earnings Per Share Attributable to Common Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformationBasicAndDilutedEarningsPerShareAttributableToCommonStockDetail</Role>
      <ShortName>Per Share Information - Basic and Diluted Earnings Per Share Attributable to Common Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Per Share Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformationDetail</Role>
      <ShortName>Per Share Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/PerShareInformationTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2407402 - Disclosure - Debt Obligations - Long-term Debt Obligations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsLongTermDebtObligationsDetail</Role>
      <ShortName>Debt Obligations - Long-term Debt Obligations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>2407403 - Disclosure - Debt Obligations - Current Maturities of Long-Term Debt and Short-Term Debt (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsCurrentMaturitiesOfLongTermDebtAndShortTermDebtDetail</Role>
      <ShortName>Debt Obligations - Current Maturities of Long-Term Debt and Short-Term Debt (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>2407404 - Disclosure - Debt Obligations - Senior Secured Credit Facility (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsSeniorSecuredCreditFacilityDetail</Role>
      <ShortName>Debt Obligations - Senior Secured Credit Facility (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>2407405 - Disclosure - Debt Obligations - Credit Facility Current Borrowings (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsCreditFacilityCurrentBorrowingsDetail</Role>
      <ShortName>Debt Obligations - Credit Facility Current Borrowings (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>2407406 - Disclosure - Debt Obligations - Borrowings under Current and Prior Credit Facility and Applicable Interest Rates (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsBorrowingsUnderCurrentAndPriorCreditFacilityAndApplicableInterestRatesDetail</Role>
      <ShortName>Debt Obligations - Borrowings under Current and Prior Credit Facility and Applicable Interest Rates (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>2407407 - Disclosure - Debt Obligations - Credit Facility Terms under the Amended and Restated Credit Agreement (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsCreditFacilityTermsUnderAmendedAndRestatedCreditAgreementDetail</Role>
      <ShortName>Debt Obligations - Credit Facility Terms under the Amended and Restated Credit Agreement (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>2407408 - Disclosure - Debt Obligations - Other Facilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsOtherFacilitiesDetails</Role>
      <ShortName>Debt Obligations - Other Facilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>2408401 - Disclosure - Equity - Exchangeable Shares and Preferred Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityExchangeableSharesAndPreferredStockDetail</Role>
      <ShortName>Equity - Exchangeable Shares and Preferred Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>2408402 - Disclosure - Equity - Treasury Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityTreasuryStockDetail</Role>
      <ShortName>Equity - Treasury Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>2408403 - Disclosure - Equity - Non-controlling Interests (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityNonControllingInterestsDetail</Role>
      <ShortName>Equity - Non-controlling Interests (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>2409402 - Disclosure - Equity-Based Compensation - Stock Incentive Plans (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationStockIncentivePlansDetail</Role>
      <ShortName>Equity-Based Compensation - Stock Incentive Plans (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>2409403 - Disclosure - Equity-Based Compensation - RSUs to be Settled in Common Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationRsusToBeSettledInCommonStockDetail</Role>
      <ShortName>Equity-Based Compensation - RSUs to be Settled in Common Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>2409404 - Disclosure - Equity-Based Compensation - Performance Units to be Settled in Common Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationPerformanceUnitsToBeSettledInCommonStockDetail</Role>
      <ShortName>Equity-Based Compensation - Performance Units to be Settled in Common Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>2409405 - Disclosure - Equity-Based Compensation - Grant Date Fair Value for Awards of Performance Units Inputs (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationGrantDateFairValueForAwardsOfPerformanceUnitsInputsDetail</Role>
      <ShortName>Equity-Based Compensation - Grant Date Fair Value for Awards of Performance Units Inputs (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>2409406 - Disclosure - Equity-Based Compensation - RSUs to be Settled in Cash (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationRsusToBeSettledInCashDetail</Role>
      <ShortName>Equity-Based Compensation - RSUs to be Settled in Cash (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>2410402 - Disclosure - Commitments and Contingencies - Investments in Affiliates and Other Entities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesInvestmentsInAffiliatesAndOtherEntitiesDetail</Role>
      <ShortName>Commitments and Contingencies - Investments in Affiliates and Other Entities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>2410403 - Disclosure - Commitments and Contingencies - Minimum Lease Payments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesMinimumLeasePaymentsDetail</Role>
      <ShortName>Commitments and Contingencies - Minimum Lease Payments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>2410404 - Disclosure - Commitments and Contingencies - Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesLeasesDetail</Role>
      <ShortName>Commitments and Contingencies - Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>2410405 - Disclosure - Commitments and Contingencies - Contingent Consideration Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesContingentConsiderationLiabilitiesDetail</Role>
      <ShortName>Commitments and Contingencies - Contingent Consideration Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>2410406 - Disclosure - Commitments and Contingencies - Committed Expenditures (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesCommittedExpendituresDetail</Role>
      <ShortName>Commitments and Contingencies - Committed Expenditures (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>2410407 - Disclosure - Commitments and Contingencies - Legal Proceedings (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesLegalProceedingsDetail</Role>
      <ShortName>Commitments and Contingencies - Legal Proceedings (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>2410408 - Disclosure - Commitments and Contingencies - Concentrations of Credit Risk (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesConcentrationsOfCreditRiskDetail</Role>
      <ShortName>Commitments and Contingencies - Concentrations of Credit Risk (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>2410409 - Disclosure - Commitments and Contingencies - Insurance (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesInsuranceDetail</Role>
      <ShortName>Commitments and Contingencies - Insurance (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>2410410 - Disclosure - Commitments and Contingencies - Letters of Credit (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesLettersOfCreditDetail</Role>
      <ShortName>Commitments and Contingencies - Letters of Credit (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>2410411 - Disclosure - Commitments and Contingencies - Performance Bonds and Parent Guarantees (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesPerformanceBondsAndParentGuaranteesDetail</Role>
      <ShortName>Commitments and Contingencies - Performance Bonds and Parent Guarantees (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>2410412 - Disclosure - Commitments and Contingencies - Indemnities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesIndemnitiesDetail</Role>
      <ShortName>Commitments and Contingencies - Indemnities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>2411402 - Disclosure - Segment Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformationDetail</Role>
      <ShortName>Segment Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SegmentInformationTables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>2411403 - Disclosure - Segment Information - Summarized Financial Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformationSummarizedFinancialInformationDetail</Role>
      <ShortName>Segment Information - Summarized Financial Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>2412402 - Disclosure - Supplemental Cash Flow Information - Net Effects of Changes in Operating Assets and Liabilities, Net, on Cash Flows from Operating Activities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationNetEffectsOfChangesInOperatingAssetsAndLiabilitiesNetOnCashFlowsFromOperatingActivitiesDetail</Role>
      <ShortName>Supplemental Cash Flow Information - Net Effects of Changes in Operating Assets and Liabilities, Net, on Cash Flows from Operating Activities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>2412403 - Disclosure - Supplemental Cash Flow Information - Reconciliation of Cash, Cash Equivalents, and Restricted Cash (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationReconciliationOfCashCashEquivalentsAndRestrictedCashDetails</Role>
      <ShortName>Supplemental Cash Flow Information - Reconciliation of Cash, Cash Equivalents, and Restricted Cash (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>2412404 - Disclosure - Supplemental Cash Flow Information - Additional Supplemental Cash Flow Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationAdditionalSupplementalCashFlowInformationDetail</Role>
      <ShortName>Supplemental Cash Flow Information - Additional Supplemental Cash Flow Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>2412405 - Disclosure - Supplemental Cash Flow Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationDetail</Role>
      <ShortName>Supplemental Cash Flow Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SupplementalCashFlowInformationTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="pwr9-30x201810xq.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>2413401 - Disclosure - Subsequent Event (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SubsequentEventDetails</Role>
      <ShortName>Subsequent Event (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SubsequentEvent</ParentRole>
      <Position>90</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="pwr9-30x201810xq.htm">pwr9-30x201810xq.htm</File>
    <File>pwr-20180930.xsd</File>
    <File>pwr-20180930_cal.xml</File>
    <File>pwr-20180930_def.xml</File>
    <File>pwr-20180930_lab.xml</File>
    <File>pwr-20180930_pre.xml</File>
    <File>pwr9-30x2018ex311.htm</File>
    <File>pwr9-30x2018ex312.htm</File>
    <File>pwr9-30x2018ex321.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/currency/2017-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2018-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2018-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/country/2017-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2018-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
