<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.5.0.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>231</ContextCount>
  <ElementCount>352</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>85</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>12</UnitCount>
  <MyReports>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>101 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DocumentandEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>103 - Statement - Condensed Consolidated Balance Sheets (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/StatementOfFinancialPositionClassified</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>104 - Statement - Condensed Consolidated Balance Sheets (Unaudited) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/StatementOfFinancialPositionClassifiedParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Unaudited) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>105 - Statement - Condensed Consolidated Statements of Operations (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/StatementOfIncome</Role>
      <ShortName>Condensed Consolidated Statements of Operations (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>106 - Statement - Condensed Consolidated Statements of Comprehensive Income (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/StatementOfOtherComprehensiveIncome</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>107 - Statement - Condensed Consolidated Statements of Comprehensive Income (Unaudited) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/StatementOfOtherComprehensiveIncomeParenthetical</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income (Unaudited) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>108 - Statement - Condensed Consolidated Statements of Cash Flows (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/StatementOfCashFlowsIndirect</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>109 - Disclosure - Business and Organization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsOrganizationConsolidationAndPresentationOfFinancialStatementsDisclosureTextBlock</Role>
      <ShortName>Business and Organization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>110 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlock</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>111 - Disclosure - New Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsNewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock</Role>
      <ShortName>New Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>112 - Disclosure - Discontinued Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisposalGroupsIncludingDiscontinuedOperationsDisclosureTextBlock</Role>
      <ShortName>Discontinued Operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>113 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsMergersAcquisitionsAndDispositionsDisclosuresTextBlock</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>114 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlock</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>115 - Disclosure - Per Share Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsEarningsPerShareTextBlock</Role>
      <ShortName>Per Share Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>116 - Disclosure - Debt Obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlock</Role>
      <ShortName>Debt Obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>117 - Disclosure - Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock</Role>
      <ShortName>Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>118 - Disclosure - Equity-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock</Role>
      <ShortName>Equity-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>119 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlock</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>120 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlock</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>121 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSubsequentEventsTextBlock</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>122 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlock</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>123 - Disclosure - Discontinued Operations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisposalGroupsIncludingDiscontinuedOperationsDisclosureTextBlockTables</Role>
      <ShortName>Discontinued Operations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisposalGroupsIncludingDiscontinuedOperationsDisclosureTextBlock</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>124 - Disclosure - Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsMergersAcquisitionsAndDispositionsDisclosuresTextBlockTables</Role>
      <ShortName>Acquisitions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsMergersAcquisitionsAndDispositionsDisclosuresTextBlock</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>125 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlockTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlock</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>126 - Disclosure - Per Share Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsEarningsPerShareTextBlockTables</Role>
      <ShortName>Per Share Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsEarningsPerShareTextBlock</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>127 - Disclosure - Debt Obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlockTables</Role>
      <ShortName>Debt Obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlock</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>128 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlock</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>129 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlockTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlock</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>130 - Disclosure - Business and Organization - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureBusinessAndOrganizationAdditionalInformation</Role>
      <ShortName>Business and Organization - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>131 - Disclosure - Summary of Significant Accounting Policies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>132 - Disclosure - Summary of Significant Accounting Policies (Cash and Cash Equivalents) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesCashAndCashEquivalentsAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies (Cash and Cash Equivalents) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>133 - Disclosure - Summary of Significant Accounting Policies (Current and Long-Term Accounts and Notes Receivable and Allowance for Doubtful Accounts) - Additional Information (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesCurrentAndLongTermAccountsAndNotesReceivableAndAllowanceForDoubtfulAccountsAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies (Current and Long-Term Accounts and Notes Receivable and Allowance for Doubtful Accounts) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>134 - Disclosure - Summary of Significant Accounting Policies (Goodwill and Other Intangibles) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesGoodwillAndOtherIntangiblesAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies (Goodwill and Other Intangibles) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>135 - Disclosure - Summary of Significant Accounting Policies (Revenue Recognition) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesRevenueRecognitionAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies (Revenue Recognition) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>136 - Disclosure - Summary of Significant Accounting Policies (Income Taxes) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesIncomeTaxesAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies (Income Taxes) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>137 - Disclosure - Summary of Significant Accounting Policies (Self-Insurance) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesSelfInsuranceAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies (Self-Insurance) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>138 - Disclosure - Summary of Significant Accounting Policies (Stock-Based Compensation) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesStockBasedCompensationAdditionalInformation</Role>
      <ShortName>Summary of Significant Accounting Policies (Stock-Based Compensation) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsSignificantAccountingPoliciesTextBlockPolicies</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>139 - Disclosure - Discontinued Operations - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDiscontinuedOperationsAdditionalInformation</Role>
      <ShortName>Discontinued Operations - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>140 - Disclosure - Discontinued Operations - Summary of Financial Information for Fiber Optic Licensing Operations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDiscontinuedOperationsSummaryOfFinancialInformationForFiberOpticLicensingOperations</Role>
      <ShortName>Discontinued Operations - Summary of Financial Information for Fiber Optic Licensing Operations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>141 - Disclosure - Discontinued Operations - Reconciliation of Carrying Amounts of Major Classes of Current Liabilities of Fiber Optic Licensing Operations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDiscontinuedOperationsReconciliationOfCarryingAmountsOfMajorClassesOfCurrentLiabilitiesOfFiberOpticLicensingOperations</Role>
      <ShortName>Discontinued Operations - Reconciliation of Carrying Amounts of Major Classes of Current Liabilities of Fiber Optic Licensing Operations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>142 - Disclosure - Acquisitions (2016 Acquisitions) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureAcquisitions2016AcquisitionsAdditionalInformation</Role>
      <ShortName>Acquisitions (2016 Acquisitions) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsMergersAcquisitionsAndDispositionsDisclosuresTextBlockTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>143 - Disclosure - Acquisitions (2015 Acquisitions) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureAcquisitions2015AcquisitionsAdditionalInformation</Role>
      <ShortName>Acquisitions (2015 Acquisitions) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsMergersAcquisitionsAndDispositionsDisclosuresTextBlockTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>144 - Disclosure - Acquisitions (2016 and 2015 Acquisitions) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureAcquisitions2016And2015AcquisitionsAdditionalInformation</Role>
      <ShortName>Acquisitions (2016 and 2015 Acquisitions) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsMergersAcquisitionsAndDispositionsDisclosuresTextBlockTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>145 - Disclosure - Acquisitions - Business Acquisition Purchase Price Allocation Assets Acquired and Liabilities Assumed (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureAcquisitionsBusinessAcquisitionPurchasePriceAllocationAssetsAcquiredAndLiabilitiesAssumed</Role>
      <ShortName>Acquisitions - Business Acquisition Purchase Price Allocation Assets Acquired and Liabilities Assumed (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>146 - Disclosure - Acquisitions - Estimated Fair Values of Identifiable Intangible Assets and Related Weighted Average Amortization (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureAcquisitionsEstimatedFairValuesOfIdentifiableIntangibleAssetsAndRelatedWeightedAverageAmortization</Role>
      <ShortName>Acquisitions - Estimated Fair Values of Identifiable Intangible Assets and Related Weighted Average Amortization (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>147 - Disclosure - Acquisitions - Unaudited Supplemental ProForma Results of Operations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureAcquisitionsUnauditedSupplementalProFormaResultsOfOperations</Role>
      <ShortName>Acquisitions - Unaudited Supplemental ProForma Results of Operations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>148 - Disclosure - Goodwill and Other Intangible Assets - Summary of Changes in Quanta's Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsSummaryOfChangesInQuantasGoodwill</Role>
      <ShortName>Goodwill and Other Intangible Assets - Summary of Changes in Quanta's Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>149 - Disclosure - Goodwill and Other Intangible Assets - Other Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets - Other Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>150 - Disclosure - Goodwill and Other Intangible Assets - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsAdditionalInformation</Role>
      <ShortName>Goodwill and Other Intangible Assets - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>151 - Disclosure - Goodwill and Other Intangible Assets - Estimated Future Aggregate Amortization Expense of Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsEstimatedFutureAggregateAmortizationExpenseOfIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets - Estimated Future Aggregate Amortization Expense of Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>152 - Disclosure - Per Share Information - Basic and Diluted Earnings Per Share (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosurePerShareInformationBasicAndDilutedEarningsPerShare</Role>
      <ShortName>Per Share Information - Basic and Diluted Earnings Per Share (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>153 - Disclosure - Debt Obligations - Long-term Debt Obligations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDebtObligationsLongtermDebtObligations</Role>
      <ShortName>Debt Obligations - Long-term Debt Obligations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>154 - Disclosure - Debt Obligations - Long-term Debt Obligations (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDebtObligationsLongtermDebtObligationsParenthetical</Role>
      <ShortName>Debt Obligations - Long-term Debt Obligations (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>155 - Disclosure - Debt Obligations - Current Maturities of Long-Term Debt and Short-Term Borrowings (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDebtObligationsCurrentMaturitiesOfLongTermDebtAndShortTermBorrowings</Role>
      <ShortName>Debt Obligations - Current Maturities of Long-Term Debt and Short-Term Borrowings (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>156 - Disclosure - Debt Obligations (Credit Facility - Amended and Restated Credit Agreement) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDebtObligationsCreditFacilityAmendedAndRestatedCreditAgreementAdditionalInformation</Role>
      <ShortName>Debt Obligations (Credit Facility - Amended and Restated Credit Agreement) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlockTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>157 - Disclosure - Debt Obligations (Credit Facility - Current Borrowings) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDebtObligationsCreditFacilityCurrentBorrowingsAdditionalInformation</Role>
      <ShortName>Debt Obligations (Credit Facility - Current Borrowings) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlockTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>158 - Disclosure - Debt Obligations - Information on Borrowings under Current and Prior Credit Facility and Applicable Interest Rates (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDebtObligationsInformationOnBorrowingsUnderCurrentAndPriorCreditFacilityAndApplicableInterestRates</Role>
      <ShortName>Debt Obligations - Information on Borrowings under Current and Prior Credit Facility and Applicable Interest Rates (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>159 - Disclosure - Debt Obligations (Credit Facility - Terms under the Amended and Restated Credit Agreement) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureDebtObligationsCreditFacilityTermsUnderTheAmendedAndRestatedCreditAgreementAdditionalInformation</Role>
      <ShortName>Debt Obligations (Credit Facility - Terms under the Amended and Restated Credit Agreement) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlockTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>160 - Disclosure - Equity (Exchangeable Shares and Series F and Series G Preferred Stock) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureEquityExchangeableSharesAndSeriesFAndSeriesGPreferredStockAdditionalInformation</Role>
      <ShortName>Equity (Exchangeable Shares and Series F and Series G Preferred Stock) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>161 - Disclosure - Equity (Treasury Stock) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureEquityTreasuryStockAdditionalInformation</Role>
      <ShortName>Equity (Treasury Stock) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>162 - Disclosure - Equity (Non-controlling Interests) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureEquityNoncontrollingInterestsAdditionalInformation</Role>
      <ShortName>Equity (Non-controlling Interests) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>163 - Disclosure - Equity-Based Compensation (Stock Incentive Plans) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureEquityBasedCompensationStockIncentivePlansAdditionalInformation</Role>
      <ShortName>Equity-Based Compensation (Stock Incentive Plans) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>164 - Disclosure - Equity-Based Compensation (Restricted Stock and RSUs to be Settled in Common Stock) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureEquityBasedCompensationRestrictedStockAndRSUsToBeSettledInCommonStockAdditionalInformation</Role>
      <ShortName>Equity-Based Compensation (Restricted Stock and RSUs to be Settled in Common Stock) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>165 - Disclosure - Equity-Based Compensation (Performance Units to be Settled in Common Stock) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureEquityBasedCompensationPerformanceUnitsToBeSettledInCommonStockAdditionalInformation</Role>
      <ShortName>Equity-Based Compensation (Performance Units to be Settled in Common Stock) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>166 - Disclosure - Equity-Based Compensation (RSUs to be Settled in Cash) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureEquityBasedCompensationRSUsToBeSettledInCashAdditionalInformation</Role>
      <ShortName>Equity-Based Compensation (RSUs to be Settled in Cash) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>167 - Disclosure - Commitments and Contingencies (Investments in Affiliates and Other Entities) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesInvestmentsInAffiliatesAndOtherEntitiesAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Investments in Affiliates and Other Entities) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>168 - Disclosure - Commitments and Contingencies - Outstanding Capital Commitments Associated with Investments in Unconsolidated Affiliates (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesOutstandingCapitalCommitmentsAssociatedWithInvestmentsInUnconsolidatedAffiliates</Role>
      <ShortName>Commitments and Contingencies - Outstanding Capital Commitments Associated with Investments in Unconsolidated Affiliates (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>169 - Disclosure - Commitments and Contingencies - Outstanding Capital Commitments Associated with Investments in Unconsolidated Affiliates (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesOutstandingCapitalCommitmentsAssociatedWithInvestmentsInUnconsolidatedAffiliatesParenthetical</Role>
      <ShortName>Commitments and Contingencies - Outstanding Capital Commitments Associated with Investments in Unconsolidated Affiliates (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>170 - Disclosure - Commitments and Contingencies - Minimum Lease Payments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesMinimumLeasePayments</Role>
      <ShortName>Commitments and Contingencies - Minimum Lease Payments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>171 - Disclosure - Commitments and Contingencies (Leases) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesLeasesAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Leases) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>172 - Disclosure - Commitments and Contingencies (Committed Expenditures) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesCommittedExpendituresAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Committed Expenditures) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>173 - Disclosure - Commitments and Contingencies (Legal Proceedings) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesLegalProceedingsAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Legal Proceedings) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>174 - Disclosure - Commitments and Contingencies (Concentrations of Credit Risk) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesConcentrationsOfCreditRiskAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Concentrations of Credit Risk) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>175 - Disclosure - Commitments and Contingencies (Self-Insurance) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesSelfInsuranceAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Self-Insurance) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>176 - Disclosure - Commitments and Contingencies (Letters of Credit) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesLettersOfCreditAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Letters of Credit) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>177 - Disclosure - Commitments and Contingencies (Performance Bonds and Parent Guarantees) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesPerformanceBondsAndParentGuaranteesAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Performance Bonds and Parent Guarantees) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>178 - Disclosure - Commitments and Contingencies (Collective Bargaining Agreements) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesCollectiveBargainingAgreementsAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Collective Bargaining Agreements) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>179 - Disclosure - Commitments and Contingencies (Indemnities) - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureCommitmentsAndContingenciesIndemnitiesAdditionalInformation</Role>
      <ShortName>Commitments and Contingencies (Indemnities) - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>180 - Disclosure - Segment Information - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSegmentInformationAdditionalInformation</Role>
      <ShortName>Segment Information - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>181 - Disclosure - Segment Information - Summarized Financial Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSegmentInformationSummarizedFinancialInformation</Role>
      <ShortName>Segment Information - Summarized Financial Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="pwr-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>182 - Disclosure - Subsequent Events - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/taxonomy/role/DisclosureSubsequentEventsAdditionalInformation</Role>
      <ShortName>Subsequent Events - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>pwr-20160630.xml</File>
    <File>pwr-20160630.xsd</File>
    <File>pwr-20160630_cal.xml</File>
    <File>pwr-20160630_def.xml</File>
    <File>pwr-20160630_lab.xml</File>
    <File>pwr-20160630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies/>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
